Expand description
Re-exported from reth_network
.
Modules§
- Network cache support
- Network config support
- Possible errors when interacting with the network.
- Blocks/Headers management for the p2p network.
- This module provides an abstraction over block import in the form of the
BlockImport
trait. - Capability messaging
- Implementation of network traits for that does nothing. A network implementation that does nothing.
- Peer related implementations
- Support for handling additional RLPx-based application-level protocols.
- test_
utils test-utils
Common helpers for network testing. Common helpers for network testing. - Transactions management for the p2p network.
Macros§
- Measures the duration of executing the given code block. The duration is added to the given accumulator value passed as a mutable reference.
- Metered poll of the given stream. Breaks with
true
if there maybe is more work. - Polls the given stream. Breaks with
true
if there maybe is more work.
Structs§
- An established session with a remote peer.
- An abstraction over the configured discovery protocol.
- Front-end API for fetching data from the network.
- Flatten a [Receiver] message in order to get rid of the [RecvError] result
- This is a superset of
HelloMessage
that provides additional protocol Protocol information about the number of messages used by each capability in order to do proper message ID multiplexing. - Wrapper for types that implement
FilterAnnouncement
. The definition of a valid announcement is network dependent. For example, different networks support differentTxType
s, and differentTxType
s have different transaction size constraints. Defaults toEthMessageFilter
. - A builder that can configure all components of the network.
- All network related initialization settings.
- Builder for
NetworkConfig
. - A shareable network frontend. Used to interact with the network.
- Manages the entire state of the network.
- Info about an active peer session.
- A Cloneable connection for sending requests directly to the session of a peer.
- Config type for initiating a
PeersManager
instance. - A handler attached to a peer session that’s not authenticated yet, pending Handshake and hello message which exchanges the
capabilities
of the peer. - Internal identifier for active sessions.
- Manages a set of sessions.
- Configuration options for peer session management.
- Counts the number of transactions by their type in a block or collection.
Enums§
- Message variants an active session can produce and send back to the
SessionManager
- The direction of the connection.
- RLPx disconnect reason.
- Represents events related to peer discovery in the network.
- Events produced by the
Discovery
manager. - Connection types that support the ETH protocol.
- Represents the state of the connection of the node. If shutting down, new connections won’t be established. When in hibernation mode, the node will not initiate new outbound connections. This is beneficial for sync stages that do not require a network connection.
- (Non-exhaustive) Events emitted by the network that are of interest for subscribers.
- Protocol related request messages that expect a response
- Events a pending session can produce.
- Errors that can occur during handshaking/authenticating the underlying streams.
- Commands that can be sent to the spawned session.
- Events produced by the
SessionManager
- The state the network is currently in when it comes to synchronization.
Traits§
- Provides client for downloading blocks.
- Filters valid entries in
NewPooledTransactionHashes68
andNewPooledTransactionHashes66
in place, and flags misbehaving peers. - Provides event subscription for the network.
- Provides general purpose information about the network.
- Provides access to modify the network’s additional protocol handlers.
- An updater for updating the SyncState and status of the network.
- Provides an API for managing the peers of the network.
- Provides an API for managing the peers of the network.
- Provides general purpose information about Peers in the network.
- Interface for validating a
(ty, size, hash)
tuple from aNewPooledTransactionHashes68
..