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.
- Reputation score
- 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.
- 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.
- 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.
Enums§
- Message variants an active session can produce and send back to the
SessionManager
- The direction of the connection.
- RLPx disconnect reason.
- Events produced by the
Discovery
manager. - (Non-exhaustive) Events emitted by the network that are of interest for subscribers.
- Represents the kind of peer
- 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
Traits§
- 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.
- 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
..