reth_eth_wire/
lib.rs

1//! Implementation of the `eth` wire protocol.
2//!
3//! ## Feature Flags
4//!
5//! - `serde` (default): Enable serde support
6//! - `arbitrary`: Adds `proptest` and `arbitrary` support for wire types.
7
8#![doc(
9    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
10    html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
11    issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
12)]
13#![cfg_attr(not(test), warn(unused_crate_dependencies))]
14#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
15
16pub mod capability;
17mod disconnect;
18pub mod errors;
19pub mod eth_snap_stream;
20mod ethstream;
21mod hello;
22pub mod multiplex;
23mod p2pstream;
24mod pinger;
25pub mod protocol;
26
27/// Handshake logic
28pub mod handshake;
29
30#[cfg(test)]
31pub mod test_utils;
32
33#[cfg(test)]
34pub use tokio_util::codec::{
35    LengthDelimitedCodec as PassthroughCodec, LengthDelimitedCodecError as PassthroughCodecError,
36};
37
38pub use crate::{
39    disconnect::CanDisconnect,
40    ethstream::{EthStream, EthStreamInner, UnauthedEthStream, MAX_MESSAGE_SIZE},
41    hello::{HelloMessage, HelloMessageBuilder, HelloMessageWithProtocols},
42    p2pstream::{
43        DisconnectP2P, P2PMessage, P2PMessageID, P2PStream, UnauthedP2PStream, HANDSHAKE_TIMEOUT,
44        MAX_RESERVED_MESSAGE_ID,
45    },
46    Capability, ProtocolVersion,
47};
48
49// Re-export wire types
50#[doc(inline)]
51pub use reth_eth_wire_types::*;