Module config

Source
Expand description

Configuration of the networking layer.

The Params struct is the struct that must be passed in order to initialize the networking. See the documentation of Params.

Re-exports§

pub use crate::discovery::DEFAULT_KADEMLIA_REPLICATION_FACTOR;
pub use crate::peer_store::PeerStoreProvider;
pub use crate::request_responses::IncomingRequest;
pub use crate::request_responses::OutgoingResponse;
pub use crate::request_responses::ProtocolConfig as RequestResponseConfig;
pub use crate::service::traits::NotificationConfig;
pub use crate::service::traits::NotificationService;
pub use crate::service::traits::PeerStore;
pub use crate::types::ProtocolName;

Modules§

ed25519
Ed25519 keys.

Macros§

build_multiaddr
Easy way for a user to create a Multiaddr.

Structs§

FullNetworkConfiguration
Full network configuration.
MultiaddrWithPeerId
Address of a node, including its identity.
NetworkConfiguration
Network service configuration.
NonDefaultSetConfig
Extension to SetConfig for sets that aren’t the default set.
NotificationHandshake
Custom handshake for the notification protocol
NotificationMetrics
Notification metrics.
NotificationsSink
Sink connected directly to the node background task. Allows sending notifications to the peer.
Params
Network initialization parameters.
ProtocolHandlePair
Channel pair which allows Notifications to interact with a protocol.
ProtocolId
Protocol name prefix, transmitted on the wire for legacy protocol names. I.e., dot in /dot/sync/2. Should be unique for each chain. Always UTF-8. Deprecated in favour of genesis hash & fork ID based protocol names.
Roles
Bitmask of the roles that a node fulfills.
SetConfig
Configuration for a set of nodes.

Enums§

NetworkBackendType
Network backend type.
NodeKeyConfig
The configuration of a node’s secret key, describing the type of key and how it is obtained. A node’s identity keypair is the result of the evaluation of the node key configuration.
NonReservedPeerMode
The policy for connections to non-reserved peers.
ParseErr
Error that can be generated by parse_str_addr.
Role
Role of the local node.
Secret
The configuration options for obtaining a secret key K.
SyncMode
Sync operation mode.
TransportConfig
Configuration for the transport layer.

Traits§

ExHashT
Minimum Requirements for a Hash within Networking

Functions§

notification_service
Create new (protocol, notification) handle pair.
parse_addr
Splits a Multiaddress into a Multiaddress and PeerId.
parse_str_addr
Parses a string address and splits it into Multiaddress and PeerId, if valid.

Type Aliases§

Ed25519Secret
The options for obtaining a Ed25519 secret key.