Expand description
Network logic
Modules§
- behaviours
- networking behaviours wrapping libp2p’s behaviours
- cbor
- Forked
cbor
codec with altered request/response sizes - def 🔒
- defines the swarm and network definition (internal)
- node 🔒
- functionality of a libp2p network node
- transport
- Alternative Libp2p transport implementations
Structs§
- Gossip
Config - Configuration for Libp2p’s Gossipsub
- Network
Def - Overarching network behaviour performing:
- Network
Node - Network definition
- Network
Node Config - describe the configuration of the network
- Network
Node Config Builder - Builder for
NetworkNodeConfig
. - Network
Node Handle - A handle containing:
- Network
Node Receiver - internal network node receiver
- Request
Response Config - Configuration for Libp2p’s request-response
Enums§
- Client
Request - Actions to send from the client to the swarm
- Network
Event - events generated by the swarm that we wish to relay to the client
- Network
Event Internal - internal representation of the network events only used for event processing before relaying to client
- Network
Node Config Builder Error - Error type for NetworkNodeConfigBuilder
Constants§
- DEFAULT_
REPLICATION_ FACTOR - The default Kademlia replication factor
Functions§
- gen_
multiaddr - Bind all interfaces on port
port
NOTE we may want something more general in the fture. - gen_
transport - Generates an authenticated transport checked against the stake table. If the stake table or authentication message is not provided, the transport will not participate in stake table authentication.
- spawn_
network_ node - Spawn a network node task task and return the handle and the receiver for it
Type Aliases§
- Boxed
Transport 🔒 BoxedTransport
is a type alias for a boxed tuple containing aPeerId
and aStreamMuxerBox
.