Crate subspace_networking

Source
Expand description

Networking functionality of Subspace Network, primarily used for DSN (Distributed Storage Network).

Re-exports§

pub use utils::multihash::Multihash;
pub use utils::PeerAddress;
pub use libp2p;

Modules§

protocols
Custom libp2p protocols
utils
Miscellaneous utilities for networking.

Structs§

Config
Node configuration.
KeyWithDistance
Helper structure. It wraps Kademlia distance to a given peer for heap-metrics.
KnownPeersManager
Handles networking parameters. It manages network parameters set and its persistence.
KnownPeersManagerConfig
Configuration for KnownPeersManager.
Node
Implementation of a network node on Subspace Network.
NodeRunner
Runner for the Node.
PeerAddressRemovedEvent
Defines the event triggered when the peer address is removed from the permanent storage.
TopicSubscription
Topic subscription, will unsubscribe when last instance is dropped for a particular topic.
WeakNode
Weak counterpart of Node

Enums§

CreationError
Errors that might happen during network creation.
GetClosestPeersError
Defines errors for get-closest-peers operation.
KademliaMode
Defines Kademlia mode
KnownPeersManagerPersistenceError
Networking parameters persistence errors.
PeerDiscovered
Represents Kademlia events (RoutablePeer, PendingRoutablePeer, UnroutablePeer).
SendRequestError
Defines errors for send-request operation.
SubscribeError
Defines errors for subscribe operation.

Traits§

KnownPeersRegistry
Defines operations with the networking parameters.

Functions§

construct
Create a new network node and node runner instances.
peer_id
Converts public key from keypair to PeerId. It serves as the shared PeerId generating algorithm.