Crate reth_network_api

Source
Expand description

Reth interface definitions and commonly used types for the reth-network crate.

Provides abstractions for the reth-network crate.

§Feature Flags

  • serde (default): Enable serde support

Re-exports§

pub use downloaders::BlockDownloaderProvider;
pub use error::NetworkError;
pub use events::DiscoveredEvent;
pub use events::DiscoveryEvent;
pub use events::NetworkEvent;
pub use events::NetworkEventListenerProvider;
pub use events::PeerRequest;
pub use events::PeerRequestSender;

Modules§

downloaders
API related to syncing blocks.
error
Network Error
events
API related to listening for network events.
noop
Implementation of network traits for that does nothing. A network implementation that does nothing.
test_utils
API for integration testing network components.

Structs§

EthProtocolInfo
Represents a short summary of the eth sub-protocol metadata known about the host peer.
NetworkStatus
The status of the network being ran by the local node.
PeerInfo
Info about an active peer session.

Enums§

Direction
The direction of the connection.
PeerKind
Represents the kind of peer
ReputationChangeKind
Various kinds of reputation changes.

Traits§

BlockClient
Helper trait that unifies network behaviour needed for fetching entire blocks.
FullNetwork
Helper trait that unifies network API needed to launch node.
NetworkInfo
Provides general purpose information about the network.
Peers
Provides an API for managing the peers of the network.
PeersInfo
Provides general purpose information about Peers in the network.

Type Aliases§

PeerId
The PeerId type.
Reputation
The type that tracks the reputation score.