Expand description
Modules§
- ed25519
- Ed25519 keys.
Macros§
- build_
multiaddr - Easy way for a user to create a
Multiaddr
.
Structs§
- Full
Network Configuration - Full network configuration.
- Incoming
Request - A single request received by a peer on a request-response protocol.
- Multiaddr
With Peer Id - Address of a node, including its identity.
- Network
Configuration - Network service configuration.
- NonDefault
SetConfig - Extension to
SetConfig
for sets that aren’t the default set. - Notification
Handshake - Custom handshake for the notification protocol
- Notification
Metrics - Notification metrics.
- Notifications
Sink - Sink connected directly to the node background task. Allows sending notifications to the peer.
- Outgoing
Response - Response for an incoming request to be send by a request protocol handler.
- Params
- Network initialization parameters.
- Protocol
Handle Pair - Channel pair which allows
Notifications
to interact with a protocol. - Protocol
Id - 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. - Request
Response Config - Configuration for a single request-response protocol.
- Roles
- Bitmask of the roles that a node fulfills.
- SetConfig
- Configuration for a set of nodes.
Enums§
- Network
Backend Type - Network backend type.
- Node
KeyConfig - 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.
- NonReserved
Peer Mode - The policy for connections to non-reserved peers.
- Parse
Err - Error that can be generated by
parse_str_addr
. - Protocol
Name - The protocol name transmitted on the wire.
- Role
- Role of the local node.
- Secret
- The configuration options for obtaining a secret key
K
. - Sync
Mode - Sync operation mode.
- Transport
Config - 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
- Notification
Config - Trait defining the required functionality from a notification protocol configuration.
- Notification
Service - Notification service
- Peer
Store - Trait defining required functionality from
PeerStore
. - Peer
Store Provider - 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§
- Ed25519
Secret - The options for obtaining a Ed25519 secret key.