referrerpolicy=no-referrer-when-downgrade
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.

Modules§

ed25519
Ed25519 keys.

Macros§

build_multiaddr
Easy way for a user to create a Multiaddr.

Structs§

FullNetworkConfiguration
Full network configuration.
IncomingRequest
A single request received by a peer on a request-response protocol.
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.
OutgoingResponse
Response for an incoming request to be send by a request protocol handler.
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.
RequestResponseConfig
Configuration for a single request-response protocol.
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.
ProtocolName
The protocol name transmitted on the wire.
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.

Constants§

DEFAULT_IDLE_CONNECTION_TIMEOUT
Default timeout for idle connections of 10 seconds is good enough for most networks. It doesn’t make sense to expose it as a CLI parameter on individual nodes, but customizations are possible in custom nodes through NetworkConfiguration.
DEFAULT_KADEMLIA_REPLICATION_FACTOR
Default value for Kademlia replication factor which determines to how many closest peers a record is replicated to.
KADEMLIA_MAX_PROVIDER_KEYS
Maximum number of locally kept Kademlia provider keys.
KADEMLIA_PROVIDER_RECORD_TTL
Time to keep Kademlia content provider records.
KADEMLIA_PROVIDER_REPUBLISH_INTERVAL
Interval of republishing Kademlia provider records.

Traits§

ExHashT
Minimum Requirements for a Hash within Networking
NotificationConfig
Trait defining the required functionality from a notification protocol configuration.
NotificationService
Notification service
PeerStore
Trait defining required functionality from PeerStore.
PeerStoreProvider
Trait providing peer reputation management and connection candidates.

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.