repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/genesis-builder/src/error.rs
crates/genesis-builder/src/error.rs
use std::path::PathBuf; use thiserror::Error; use toml::de::Error as TomlError; /// Errors that can occur during genesis building #[derive(Debug, Error)] pub enum BuilderError { /// Manifest not found #[error("Manifest not found: {}", .0.display())] ManifestNotFound(PathBuf), /// No contracts defined i...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/genesis-builder/src/types.rs
crates/genesis-builder/src/types.rs
use alloy_primitives::{Address, Bytes}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; /// Default base URL for the manifest which will be /// used if a base URL is not provided explicitly pub const DEFAULT_BASE_URL: &str = "https://raw.githubusercontent.com/SeismicSystems/seismic-contracts/ma...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/banlist/src/lib.rs
crates/net/banlist/src/lib.rs
//! Support for banning peers. #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/SeismicSystems/seismic-reth/issues/" )] #![cfg_at...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/backoff.rs
crates/net/network-types/src/backoff.rs
/// Describes the type of backoff should be applied. #[derive(Debug, Clone, PartialEq, Eq)] pub enum BackoffKind { /// Use the lowest configured backoff duration. /// /// This applies to connection problems where there is a chance that they will be resolved /// after the short duration. Low, ///...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/lib.rs
crates/net/network-types/src/lib.rs
//! Commonly used networking types. //! //! ## Feature Flags //! //! - `serde` (default): Enable serde support #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/session/config.rs
crates/net/network-types/src/session/config.rs
//! Configuration types for peer sessions manager. use crate::peers::config::{DEFAULT_MAX_COUNT_PEERS_INBOUND, DEFAULT_MAX_COUNT_PEERS_OUTBOUND}; use std::time::Duration; /// Default request timeout for a single request. /// /// This represents the amount of time we wait for a response until we consider it timed out....
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/session/mod.rs
crates/net/network-types/src/session/mod.rs
//! Peer sessions configuration. pub mod config; pub use config::{SessionLimits, SessionsConfig};
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/peers/config.rs
crates/net/network-types/src/peers/config.rs
//! Configuration for peering. use std::{ collections::HashSet, io::{self, ErrorKind}, path::Path, time::Duration, }; use reth_net_banlist::BanList; use reth_network_peers::{NodeRecord, TrustedPeer}; use tracing::info; use crate::{BackoffKind, ReputationChangeWeights}; /// Maximum number of availabl...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/peers/state.rs
crates/net/network-types/src/peers/state.rs
//! State of connection to a peer. /// Represents the kind of connection established to the peer, if any #[derive(Debug, Clone, Copy, Default, Eq, PartialEq)] pub enum PeerConnectionState { /// Not connected currently. #[default] Idle, /// Disconnect of an incoming connection in progress Disconnect...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/peers/kind.rs
crates/net/network-types/src/peers/kind.rs
//! Classification of a peer based on trust. /// Represents the kind of peer #[derive(Debug, Clone, Copy, Default, Eq, PartialEq)] pub enum PeerKind { /// Basic peer kind. #[default] Basic, /// Static peer, added via JSON-RPC. Static, /// Trusted peer. Trusted, } impl PeerKind { /// Re...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/peers/mod.rs
crates/net/network-types/src/peers/mod.rs
pub mod addr; pub mod config; pub mod kind; pub mod reputation; pub mod state; pub use config::{ConnectionsConfig, PeersConfig}; pub use reputation::{Reputation, ReputationChange, ReputationChangeKind, ReputationChangeWeights}; use alloy_eip2124::ForkId; use tracing::trace; use crate::{ is_banned_reputation, Pee...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/peers/addr.rs
crates/net/network-types/src/peers/addr.rs
//! `RLPx` (TCP) and `Discovery` (UDP) sockets of a peer. use std::net::{IpAddr, SocketAddr}; /// Represents a peer's address information. /// /// # Fields /// /// - `tcp`: A `SocketAddr` representing the peer's data transfer address. /// - `udp`: An optional `SocketAddr` representing the peer's discover address. `No...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-types/src/peers/reputation.rs
crates/net/network-types/src/peers/reputation.rs
//! Peer reputation management /// The default reputation of a peer pub const DEFAULT_REPUTATION: Reputation = 0; /// The minimal unit we're measuring reputation const REPUTATION_UNIT: i32 = -1024; /// The reputation value below which new connection from/to peers are rejected. pub const BANNED_REPUTATION: i32 = 50 *...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/file_client.rs
crates/net/downloaders/src/file_client.rs
use alloy_consensus::BlockHeader; use alloy_eips::BlockHashOrNumber; use alloy_primitives::{BlockHash, BlockNumber, Sealable, B256}; use futures::Future; use itertools::Either; use reth_consensus::{Consensus, ConsensusError}; use reth_network_p2p::{ bodies::client::{BodiesClient, BodiesFut}, download::DownloadC...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/lib.rs
crates/net/downloaders/src/lib.rs
//! Implements the downloader algorithms. //! //! ## Feature Flags //! //! - `test-utils`: Export utilities for testing #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/receipt_file_client.rs
crates/net/downloaders/src/receipt_file_client.rs
use std::{fmt, io}; use futures::Future; use tokio::io::AsyncReadExt; use tokio_stream::StreamExt; use tokio_util::codec::{Decoder, FramedRead}; use tracing::{trace, warn}; use crate::{DecodedFileChunk, FileClientError}; /// Helper trait implemented for [`Decoder`] that decodes the receipt type. pub trait ReceiptDec...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/file_codec.rs
crates/net/downloaders/src/file_codec.rs
//! Codec for reading raw block bodies from a file. use crate::file_client::FileClientError; use alloy_primitives::bytes::{Buf, BytesMut}; use alloy_rlp::{Decodable, Encodable}; use tokio_util::codec::{Decoder, Encoder}; /// Codec for reading raw block bodies from a file. /// /// If using with [`FramedRead`](tokio_ut...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/metrics.rs
crates/net/downloaders/src/metrics.rs
use reth_metrics::{ metrics::{Counter, Gauge}, Metrics, }; use reth_network_p2p::error::DownloadError; /// Common body downloader metrics. /// /// These metrics will be initialized with the `downloaders.bodies` scope. /// ``` /// use reth_downloaders::metrics::BodyDownloaderMetrics; /// use reth_network_p2p::e...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/bodies/noop.rs
crates/net/downloaders/src/bodies/noop.rs
use alloy_primitives::BlockNumber; use futures::Stream; use reth_network_p2p::{ bodies::{downloader::BodyDownloader, response::BlockResponse}, error::{DownloadError, DownloadResult}, }; use reth_primitives_traits::Block; use std::{fmt::Debug, ops::RangeInclusive}; /// A [`BodyDownloader`] implementation that d...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/bodies/test_utils.rs
crates/net/downloaders/src/bodies/test_utils.rs
//! Test helper impls for generating bodies #![allow(dead_code)] use alloy_consensus::BlockHeader; use alloy_primitives::B256; use reth_db::DatabaseEnv; use reth_db_api::{database::Database, tables, transaction::DbTxMut}; use reth_ethereum_primitives::BlockBody; use reth_network_p2p::bodies::response::BlockResponse; ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/bodies/bodies.rs
crates/net/downloaders/src/bodies/bodies.rs
use super::queue::BodiesRequestQueue; use crate::{bodies::task::TaskDownloader, metrics::BodyDownloaderMetrics}; use alloy_consensus::BlockHeader; use alloy_primitives::BlockNumber; use futures::Stream; use futures_util::StreamExt; use reth_config::BodiesConfig; use reth_consensus::{Consensus, ConsensusError}; use reth...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/bodies/mod.rs
crates/net/downloaders/src/bodies/mod.rs
/// A naive concurrent downloader. #[expect(clippy::module_inception)] pub mod bodies; /// A body downloader that does nothing. Useful to build unwind-only pipelines. pub mod noop; /// A downloader implementation that spawns a downloader to a task pub mod task; mod queue; mod request; #[cfg(any(test, feature = "tes...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/bodies/task.rs
crates/net/downloaders/src/bodies/task.rs
use alloy_primitives::BlockNumber; use futures::Stream; use futures_util::{FutureExt, StreamExt}; use pin_project::pin_project; use reth_network_p2p::{ bodies::downloader::{BodyDownloader, BodyDownloaderResult}, error::DownloadResult, }; use reth_primitives_traits::Block; use reth_tasks::{TaskSpawner, TokioTask...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/bodies/request.rs
crates/net/downloaders/src/bodies/request.rs
use crate::metrics::{BodyDownloaderMetrics, ResponseMetrics}; use alloy_consensus::BlockHeader; use alloy_primitives::B256; use futures::{Future, FutureExt}; use reth_consensus::{Consensus, ConsensusError}; use reth_network_p2p::{ bodies::{client::BodiesClient, response::BlockResponse}, error::{DownloadError, D...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/bodies/queue.rs
crates/net/downloaders/src/bodies/queue.rs
use super::request::BodiesRequestFuture; use crate::metrics::BodyDownloaderMetrics; use alloy_consensus::BlockHeader; use alloy_primitives::BlockNumber; use futures::{stream::FuturesUnordered, Stream}; use futures_util::StreamExt; use reth_consensus::{Consensus, ConsensusError}; use reth_network_p2p::{ bodies::{cli...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/headers/noop.rs
crates/net/downloaders/src/headers/noop.rs
use alloy_primitives::Sealable; use futures::Stream; use reth_network_p2p::headers::{ downloader::{HeaderDownloader, SyncTarget}, error::HeadersDownloaderError, }; use reth_primitives_traits::SealedHeader; use std::fmt::Debug; /// A [`HeaderDownloader`] implementation that does nothing. #[derive(Debug, Default...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/headers/reverse_headers.rs
crates/net/downloaders/src/headers/reverse_headers.rs
//! A headers downloader that can handle multiple requests concurrently. use super::task::TaskDownloader; use crate::metrics::HeaderDownloaderMetrics; use alloy_consensus::BlockHeader; use alloy_eips::BlockHashOrNumber; use alloy_primitives::{BlockNumber, Sealable, B256}; use futures::{stream::Stream, FutureExt}; use ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/headers/test_utils.rs
crates/net/downloaders/src/headers/test_utils.rs
//! Test helper impls for generating bodies #![allow(dead_code)] use reth_primitives_traits::SealedHeader; /// Returns a new [`SealedHeader`] that's the child header of the given `parent`. pub(crate) fn child_header(parent: &SealedHeader) -> SealedHeader { let mut child = parent.as_ref().clone(); child.numbe...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/headers/mod.rs
crates/net/downloaders/src/headers/mod.rs
/// A Linear downloader implementation. pub mod reverse_headers; /// A header downloader that does nothing. Useful to build unwind-only pipelines. pub mod noop; /// A downloader implementation that spawns a downloader to a task pub mod task; #[cfg(any(test, feature = "test-utils"))] pub mod test_utils;
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/headers/task.rs
crates/net/downloaders/src/headers/task.rs
use alloy_primitives::Sealable; use futures::{FutureExt, Stream}; use futures_util::StreamExt; use pin_project::pin_project; use reth_network_p2p::headers::{ downloader::{HeaderDownloader, SyncTarget}, error::HeadersDownloaderResult, }; use reth_primitives_traits::SealedHeader; use reth_tasks::{TaskSpawner, Tok...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/test_utils/bodies_client.rs
crates/net/downloaders/src/test_utils/bodies_client.rs
use alloy_primitives::B256; use reth_ethereum_primitives::BlockBody; use reth_network_p2p::{ bodies::client::{BodiesClient, BodiesFut}, download::DownloadClient, priority::Priority, }; use reth_network_peers::PeerId; use std::{ collections::HashMap, fmt::Debug, ops::RangeInclusive, sync::{ ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/downloaders/src/test_utils/mod.rs
crates/net/downloaders/src/test_utils/mod.rs
//! Test helper impls. #![allow(dead_code)] use crate::{bodies::test_utils::create_raw_bodies, file_codec::BlockFileCodec}; use alloy_primitives::B256; use futures::SinkExt; use reth_ethereum_primitives::BlockBody; use reth_testing_utils::generators::{self, random_block_range, BlockRangeParams}; use std::{collections...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/lib.rs
crates/net/eth-wire/src/lib.rs
//! Implementation of the `eth` wire protocol. //! //! ## Feature Flags //! //! - `serde` (default): Enable serde support //! - `arbitrary`: Adds `proptest` and `arbitrary` support for wire types. #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", html_favic...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/multiplex.rs
crates/net/eth-wire/src/multiplex.rs
//! Rlpx protocol multiplexer and satellite stream //! //! A Satellite is a Stream that primarily drives a single `RLPx` subprotocol but can also handle //! additional subprotocols. //! //! Most of other subprotocols are "dependent satellite" protocols of "eth" and not a fully standalone protocol, for example "snap", S...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/disconnect.rs
crates/net/eth-wire/src/disconnect.rs
//! Disconnect use std::{future::Future, pin::Pin}; use futures::{Sink, SinkExt}; use reth_ecies::stream::ECIESStream; use reth_eth_wire_types::DisconnectReason; use tokio::io::AsyncWrite; use tokio_util::codec::{Encoder, Framed}; type DisconnectResult<E> = Result<(), E>; /// This trait is meant to allow higher lev...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/test_utils.rs
crates/net/eth-wire/src/test_utils.rs
//! Utilities for testing p2p protocol. #![allow(missing_docs)] use crate::{ hello::DEFAULT_TCP_PORT, EthVersion, HelloMessageWithProtocols, P2PStream, ProtocolVersion, Status, StatusMessage, UnauthedP2PStream, UnifiedStatus, }; use alloy_chains::Chain; use alloy_primitives::{B256, U256}; use reth_ethereum_fo...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/hello.rs
crates/net/eth-wire/src/hello.rs
use crate::{Capability, EthVersion, ProtocolVersion}; use alloy_rlp::{RlpDecodable, RlpEncodable}; use reth_codecs::add_arbitrary_tests; use reth_network_peers::PeerId; use reth_primitives_traits::constants::RETH_CLIENT_VERSION; /// The default tcp port for p2p. /// /// Note: this is the same as discovery port: `DEFAU...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/ethstream.rs
crates/net/eth-wire/src/ethstream.rs
//! Ethereum protocol stream implementations. //! //! Provides stream types for the Ethereum wire protocol. //! It separates protocol logic [`EthStreamInner`] from transport concerns [`EthStream`]. //! Handles handshaking, message processing, and RLP serialization. use crate::{ errors::{EthHandshakeError, EthStrea...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/eth_snap_stream.rs
crates/net/eth-wire/src/eth_snap_stream.rs
//! Ethereum and snap combined protocol stream implementation. //! //! A stream type for handling both eth and snap protocol messages over a single `RLPx` connection. //! Provides message encoding/decoding, ID multiplexing, and protocol message processing. use super::message::MAX_MESSAGE_SIZE; use crate::{ message...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/p2pstream.rs
crates/net/eth-wire/src/p2pstream.rs
use crate::{ capability::SharedCapabilities, disconnect::CanDisconnect, errors::{P2PHandshakeError, P2PStreamError}, pinger::{Pinger, PingerEvent}, DisconnectReason, HelloMessage, HelloMessageWithProtocols, }; use alloy_primitives::{ bytes::{Buf, BufMut, Bytes, BytesMut}, hex, }; use alloy_r...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/handshake.rs
crates/net/eth-wire/src/handshake.rs
use crate::{ errors::{EthHandshakeError, EthStreamError, P2PStreamError}, ethstream::MAX_STATUS_SIZE, CanDisconnect, }; use bytes::{Bytes, BytesMut}; use futures::{Sink, SinkExt, Stream}; use reth_eth_wire_types::{ DisconnectReason, EthMessage, EthNetworkPrimitives, ProtocolMessage, StatusMessage, U...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/pinger.rs
crates/net/eth-wire/src/pinger.rs
use crate::errors::PingerError; use std::{ pin::Pin, task::{Context, Poll}, time::Duration, }; use tokio::time::{Instant, Interval, Sleep}; use tokio_stream::Stream; /// The pinger is a state machine that is created with a maximum number of pongs that can be /// missed. #[derive(Debug)] pub(crate) struct P...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/protocol.rs
crates/net/eth-wire/src/protocol.rs
//! A Protocol defines a P2P subprotocol in an `RLPx` connection use crate::{Capability, EthMessageID, EthVersion}; /// Type that represents a [Capability] and the number of messages it uses. /// /// Only the [Capability] is shared with the remote peer, assuming both parties know the number of /// messages used by th...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/capability.rs
crates/net/eth-wire/src/capability.rs
//! All capability related types use crate::{ errors::{P2PHandshakeError, P2PStreamError}, p2pstream::MAX_RESERVED_MESSAGE_ID, protocol::{ProtoVersion, Protocol}, version::ParseVersionError, Capability, EthMessageID, EthVersion, }; use derive_more::{Deref, DerefMut}; use std::{ borrow::Cow, ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/errors/eth.rs
crates/net/eth-wire/src/errors/eth.rs
//! Error handling for (`EthStream`)[`crate::EthStream`] use crate::{ errors::P2PStreamError, message::MessageError, version::ParseVersionError, DisconnectReason, }; use alloy_chains::Chain; use alloy_primitives::B256; use reth_eth_wire_types::EthVersion; use reth_ethereum_forks::ValidationError; use reth_primitiv...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/errors/mod.rs
crates/net/eth-wire/src/errors/mod.rs
//! Error types for stream variants mod eth; mod p2p; pub use eth::*; pub use p2p::*;
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/src/errors/p2p.rs
crates/net/eth-wire/src/errors/p2p.rs
//! Error handling for [`P2PStream`](crate::P2PStream). use std::io; use reth_eth_wire_types::{DisconnectReason, UnknownDisconnectReason}; use reth_primitives_traits::GotExpected; use crate::{capability::SharedCapabilityError, ProtocolVersion}; /// Errors when sending/receiving p2p messages. These should result in ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/tests/fuzz_roundtrip.rs
crates/net/eth-wire/tests/fuzz_roundtrip.rs
//! Round-trip encoding fuzzing for the `eth-wire` crate. use alloy_rlp::{Decodable, Encodable}; use serde::Serialize; use std::fmt::Debug; /// Creates a fuzz test for a type that should be [`Encodable`](alloy_rlp::Encodable) and /// [`Decodable`](alloy_rlp::Decodable). /// /// The test will create a random instance ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/tests/new_pooled_transactions.rs
crates/net/eth-wire/tests/new_pooled_transactions.rs
//! Decoding tests for [`NewPooledTransactions`] use alloy_primitives::hex; use alloy_rlp::Decodable; use reth_eth_wire::NewPooledTransactionHashes66; use std::{fs, path::PathBuf}; #[test] fn decode_new_pooled_transaction_hashes_network() { let network_data_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")) ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/tests/pooled_transactions.rs
crates/net/eth-wire/tests/pooled_transactions.rs
//! Decoding tests for [`PooledTransactions`] use alloy_consensus::transaction::PooledTransaction; use alloy_eips::eip2718::Decodable2718; use alloy_primitives::hex; use alloy_rlp::{Decodable, Encodable}; use reth_eth_wire::{EthNetworkPrimitives, EthVersion, PooledTransactions, ProtocolMessage}; use std::{fs, path::Pa...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/eth-wire/tests/new_block.rs
crates/net/eth-wire/tests/new_block.rs
//! Decoding tests for [`NewBlock`] use alloy_primitives::hex; use alloy_rlp::Decodable; use reth_eth_wire::NewBlock; use std::{fs, path::PathBuf}; #[test] fn decode_new_block_network() { let network_data_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("testdata/new_block_network_rlp"); let data...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/discv4/src/config.rs
crates/net/discv4/src/config.rs
//! A set of configuration parameters to tune the discovery protocol. //! //! This basis of this file has been taken from the discv5 codebase: //! <https://github.com/sigp/discv5> use alloy_primitives::bytes::Bytes; use alloy_rlp::Encodable; use reth_net_banlist::BanList; use reth_net_nat::{NatResolver, ResolveNatInte...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/discv4/src/node.rs
crates/net/discv4/src/node.rs
use alloy_primitives::keccak256; use generic_array::GenericArray; use reth_network_peers::{NodeRecord, PeerId}; /// The key type for the table. #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub(crate) struct NodeKey(pub(crate) PeerId); impl From<PeerId> for NodeKey { fn from(value: PeerId) -> Self { Self(v...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/discv4/src/lib.rs
crates/net/discv4/src/lib.rs
//! Discovery v4 implementation: <https://github.com/ethereum/devp2p/blob/master/discv4.md> //! //! Discv4 employs a kademlia-like routing table to store and manage discovered peers and topics. //! The protocol allows for external IP discovery in NAT environments through regular PING/PONG's //! with discovered nodes. N...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/discv4/src/table.rs
crates/net/discv4/src/table.rs
//! Additional support for tracking nodes. use reth_network_peers::PeerId; use std::{collections::HashMap, net::IpAddr, time::Instant}; /// Keeps track of nodes from which we have received a `Pong` message. #[derive(Debug, Clone, Default)] pub(crate) struct PongTable { /// The nodes we have received a `Pong` from...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/discv4/src/test_utils.rs
crates/net/discv4/src/test_utils.rs
//! Mock discovery support // TODO(rand): update ::random calls after rand_09 migration use crate::{ proto::{FindNode, Message, Neighbours, NodeEndpoint, Packet, Ping, Pong}, receive_loop, send_loop, Discv4, Discv4Config, Discv4Service, EgressSender, IngressEvent, IngressReceiver, PeerId, SAFE_MAX_DATAGRA...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/discv4/src/error.rs
crates/net/discv4/src/error.rs
//! Error types that can occur in this crate. use tokio::sync::{mpsc::error::SendError, oneshot::error::RecvError}; /// Error thrown when decoding a UDP packet. #[derive(Debug, thiserror::Error)] pub enum DecodePacketError { /// Failed to RLP decode the packet. #[error("failed to rlp decode: {0}")] /// In...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/discv4/src/proto.rs
crates/net/discv4/src/proto.rs
//! Discovery v4 protocol implementation. use crate::{error::DecodePacketError, MAX_PACKET_SIZE, MIN_PACKET_SIZE}; use alloy_primitives::{ bytes::{Buf, BufMut, Bytes, BytesMut}, keccak256, B256, }; use alloy_rlp::{ Decodable, Encodable, Error as RlpError, Header, RlpDecodable, RlpEncodable, RlpEncodabl...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/ecies/src/stream.rs
crates/net/ecies/src/stream.rs
//! The ECIES Stream implementation which wraps over [`AsyncRead`] and [`AsyncWrite`]. use crate::{ codec::ECIESCodec, error::ECIESErrorImpl, ECIESError, EgressECIESValue, IngressECIESValue, }; use alloy_primitives::{ bytes::{Bytes, BytesMut}, B512 as PeerId, }; use futures::{ready, Sink, SinkExt}; use sec...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/ecies/src/lib.rs
crates/net/ecies/src/lib.rs
//! `RLPx` ECIES framed transport protocol. #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/SeismicSystems/seismic-reth/issues/"...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/ecies/src/algorithm.rs
crates/net/ecies/src/algorithm.rs
#![allow(missing_docs)] use crate::{ error::ECIESErrorImpl, mac::{HeaderBytes, MAC}, util::{hmac_sha256, sha256}, ECIESError, }; use aes::{cipher::StreamCipher, Aes128, Aes256}; use alloy_primitives::{ bytes::{BufMut, Bytes, BytesMut}, B128, B256, B512 as PeerId, }; use alloy_rlp::{Encodable, R...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/ecies/src/codec.rs
crates/net/ecies/src/codec.rs
//! This contains the main codec for `RLPx` ECIES messages use crate::{algorithm::ECIES, ECIESError, ECIESErrorImpl, EgressECIESValue, IngressECIESValue}; use alloy_primitives::{bytes::BytesMut, B512 as PeerId}; use secp256k1::SecretKey; use std::{fmt::Debug, io}; use tokio_util::codec::{Decoder, Encoder}; use tracing...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/ecies/src/error.rs
crates/net/ecies/src/error.rs
use crate::IngressECIESValue; use std::fmt; use thiserror::Error; /// An error that occurs while reading or writing to an ECIES stream. #[derive(Debug, Error)] pub struct ECIESError { inner: Box<ECIESErrorImpl>, } impl ECIESError { /// Consumes the type and returns the error enum pub fn into_inner(self) -...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/ecies/src/util.rs
crates/net/ecies/src/util.rs
//! Utility functions for hashing and encoding. use alloy_primitives::B256; use hmac::{Hmac, Mac}; use sha2::{Digest, Sha256}; /// Hashes the input data with SHA256 - <https://en.wikipedia.org/wiki/SHA-2> pub(crate) fn sha256(data: &[u8]) -> B256 { B256::from(Sha256::digest(data).as_ref()) } /// Produces a `HMAC...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/ecies/src/mac.rs
crates/net/ecies/src/mac.rs
//! # Ethereum MAC Module //! //! This module provides the implementation of the Ethereum MAC (Message Authentication Code) //! construction, as specified in the Ethereum `RLPx` protocol. //! //! The Ethereum MAC is a nonstandard MAC construction that utilizes AES-256 (as a block cipher) //! and Keccak-256. It is speci...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-api/src/lib.rs
crates/net/network-api/src/lib.rs
//! 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 #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.p...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-api/src/noop.rs
crates/net/network-api/src/noop.rs
//! A network implementation that does nothing. //! //! This is useful for wiring components together that don't require network but still need to be //! generic over it. use core::{fmt, marker::PhantomData}; use std::net::{IpAddr, SocketAddr}; use crate::{ events::{NetworkPeersEvents, PeerEventStream}, test_...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-api/src/downloaders.rs
crates/net/network-api/src/downloaders.rs
//! API related to syncing blocks. use std::fmt::Debug; use futures::Future; use reth_network_p2p::BlockClient; use tokio::sync::oneshot; /// Provides client for downloading blocks. #[auto_impl::auto_impl(&, Arc)] pub trait BlockDownloaderProvider { /// The client this type can provide. type Client: BlockCli...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-api/src/error.rs
crates/net/network-api/src/error.rs
use thiserror::Error; use tokio::sync::{mpsc, oneshot}; /// Network Errors #[derive(Error, Debug, Clone, PartialEq, Eq)] pub enum NetworkError { /// Indicates that the sender has been dropped. #[error("sender has been dropped")] ChannelClosed, } impl<T> From<mpsc::error::SendError<T>> for NetworkError { ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-api/src/events.rs
crates/net/network-api/src/events.rs
//! API related to listening for network events. use reth_eth_wire_types::{ message::RequestPair, BlockBodies, BlockHeaders, Capabilities, DisconnectReason, EthMessage, EthNetworkPrimitives, EthVersion, GetBlockBodies, GetBlockHeaders, GetNodeData, GetPooledTransactions, GetReceipts, NetworkPrimitives, Nod...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-api/src/test_utils/mod.rs
crates/net/network-api/src/test_utils/mod.rs
//! API for integration testing network components. pub mod peers_manager; pub use peers_manager::{PeerCommand, PeersHandle, PeersHandleProvider};
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network-api/src/test_utils/peers_manager.rs
crates/net/network-api/src/test_utils/peers_manager.rs
//! Interaction with `reth_network::PeersManager`, for integration testing. Otherwise //! `reth_network::NetworkManager` manages `reth_network::PeersManager`. use std::net::SocketAddr; use derive_more::Constructor; use reth_network_peers::{NodeRecord, PeerId}; use reth_network_types::{Peer, ReputationChangeKind}; use...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/dns/src/config.rs
crates/net/dns/src/config.rs
use crate::tree::LinkEntry; use std::{ collections::HashSet, num::{NonZeroU32, NonZeroUsize}, time::Duration, }; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; /// Settings for the [`DnsDiscoveryService`](crate::DnsDiscoveryService). #[derive(Debug, Clone)] #[cfg_attr(feature = "serde", de...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/dns/src/lib.rs
crates/net/dns/src/lib.rs
//! Implementation of [EIP-1459](https://eips.ethereum.org/EIPS/eip-1459) Node Discovery via DNS. //! //! ## Feature Flags //! //! - `serde` (default): Enable serde support //! - `test-utils`: Export utilities for testing #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/dns/src/sync.rs
crates/net/dns/src/sync.rs
use crate::tree::{LinkEntry, TreeRootEntry}; use enr::EnrKeyUnambiguous; use linked_hash_set::LinkedHashSet; use secp256k1::SecretKey; use std::{ collections::HashMap, time::{Duration, Instant}, }; /// A sync-able tree pub(crate) struct SyncTree<K: EnrKeyUnambiguous = SecretKey> { /// Root of the tree ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/dns/src/tree.rs
crates/net/dns/src/tree.rs
//! Support for the [EIP-1459 DNS Record Structure](https://eips.ethereum.org/EIPS/eip-1459#dns-record-structure) //! //! The nodes in a list are encoded as a merkle tree for distribution via the DNS protocol. Entries //! of the merkle tree are contained in DNS TXT records. The root of the tree is a TXT record with //!...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/dns/src/error.rs
crates/net/dns/src/error.rs
use crate::tree::TreeRootEntry; /// Alias for a parse result pub(crate) type ParseEntryResult<T> = Result<T, ParseDnsEntryError>; /// Alias for lookup results pub(crate) type LookupResult<T> = Result<T, LookupError>; /// Error while parsing a [`DnsEntry`](crate::tree::DnsEntry) #[derive(thiserror::Error, Debug)] pub...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/dns/src/resolver.rs
crates/net/dns/src/resolver.rs
//! Perform DNS lookups use hickory_resolver::name_server::ConnectionProvider; pub use hickory_resolver::{ResolveError, TokioResolver}; use parking_lot::RwLock; use std::{collections::HashMap, future::Future}; use tracing::trace; /// A type that can lookup DNS entries pub trait Resolver: Send + Sync + Unpin + 'static...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/dns/src/query.rs
crates/net/dns/src/query.rs
//! Handles query execution use crate::{ error::{LookupError, LookupResult}, resolver::Resolver, sync::ResolveKind, tree::{DnsEntry, LinkEntry, TreeRootEntry}, }; use enr::EnrKeyUnambiguous; use reth_tokio_util::ratelimit::{Rate, RateLimit}; use std::{ collections::VecDeque, future::Future, ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/config.rs
crates/net/network/src/config.rs
//! Network config support use crate::{ error::NetworkError, import::{BlockImport, ProofOfStakeBlockImport}, transactions::TransactionsManagerConfig, NetworkHandle, NetworkManager, }; use reth_chainspec::{ChainSpecProvider, EthChainSpec, Hardforks}; use reth_discv4::{Discv4Config, Discv4ConfigBuilder, ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/discovery.rs
crates/net/network/src/discovery.rs
//! Discovery support for the network. use crate::{ cache::LruMap, error::{NetworkError, ServiceKind}, }; use enr::Enr; use futures::StreamExt; use reth_discv4::{DiscoveryUpdate, Discv4, Discv4Config}; use reth_discv5::{DiscoveredPeer, Discv5}; use reth_dns_discovery::{ DnsDiscoveryConfig, DnsDiscoveryHand...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/builder.rs
crates/net/network/src/builder.rs
//! Builder support for configuring the entire setup. use std::fmt::Debug; use crate::{ eth_requests::EthRequestHandler, transactions::{ config::{StrictEthAnnouncementFilter, TransactionPropagationKind}, policy::NetworkPolicies, TransactionPropagationPolicy, TransactionsManager, Transa...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/lib.rs
crates/net/network/src/lib.rs
//! reth P2P networking. //! //! Ethereum's networking protocol is specified in [devp2p](https://github.com/ethereum/devp2p). //! //! In order for a node to join the ethereum p2p network it needs to know what nodes are already //! part of that network. This includes public identities (public key) and addresses (where t...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/trusted_peers_resolver.rs
crates/net/network/src/trusted_peers_resolver.rs
//! Periodically resolves DNS records for a set of trusted peers and emits updates as they complete use futures::{future::BoxFuture, ready, stream::FuturesUnordered, FutureExt, StreamExt}; use reth_network_peers::{NodeRecord, PeerId, TrustedPeer}; use std::{ io, task::{Context, Poll}, }; use tokio::time::Inter...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/network.rs
crates/net/network/src/network.rs
use crate::{ config::NetworkMode, message::PeerMessage, protocol::RlpxSubProtocol, swarm::NetworkConnectionState, transactions::TransactionsHandle, FetchClient, }; use alloy_primitives::B256; use enr::Enr; use futures::StreamExt; use parking_lot::Mutex; use reth_discv4::{Discv4, NatResolver}; use reth_discv5::D...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/manager.rs
crates/net/network/src/manager.rs
//! High level network management. //! //! The [`NetworkManager`] contains the state of the network as a whole. It controls how connections //! are handled and keeps track of connections to peers. //! //! ## Capabilities //! //! The network manages peers depending on their announced capabilities via their `RLPx` sessio...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/state.rs
crates/net/network/src/state.rs
//! Keeps track of the state of the network. use crate::{ cache::LruCache, discovery::Discovery, fetch::{BlockResponseOutcome, FetchAction, StateFetcher}, message::{BlockRequest, NewBlockMessage, PeerResponse, PeerResponseResult}, peers::{PeerAction, PeersManager}, session::BlockRangeInfo, ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/listener.rs
crates/net/network/src/listener.rs
//! Contains connection-oriented interfaces. use futures::{ready, Stream, StreamExt}; use std::{ io, net::SocketAddr, pin::Pin, task::{Context, Poll}, }; use tokio::net::{TcpListener, TcpStream}; /// A tcp connection listener. /// /// Listens for incoming connections. #[must_use = "Transport does noth...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/error.rs
crates/net/network/src/error.rs
//! Possible errors when interacting with the network. use crate::session::PendingSessionHandshakeError; use reth_dns_discovery::resolver::ResolveError; use reth_ecies::ECIESErrorImpl; use reth_eth_wire::{ errors::{EthHandshakeError, EthStreamError, P2PHandshakeError, P2PStreamError}, DisconnectReason, }; use ...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/flattened_response.rs
crates/net/network/src/flattened_response.rs
use futures::Future; use pin_project::pin_project; use std::{ pin::Pin, task::{Context, Poll}, }; use tokio::sync::oneshot::{error::RecvError, Receiver}; /// Flatten a [Receiver] message in order to get rid of the [`RecvError`] result #[derive(Debug)] #[pin_project] pub struct FlattenedResponse<T> { #[pin]...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/peers.rs
crates/net/network/src/peers.rs
//! Peer related implementations use crate::{ error::SessionError, session::{Direction, PendingSessionHandshakeError}, swarm::NetworkConnectionState, trusted_peers_resolver::TrustedPeersResolver, }; use futures::StreamExt; use reth_eth_wire::{errors::EthStreamError, DisconnectReason}; use reth_ethereu...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
true
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/swarm.rs
crates/net/network/src/swarm.rs
use crate::{ listener::{ConnectionListener, ListenerEvent}, message::PeerMessage, peers::InboundConnectionError, protocol::IntoRlpxSubProtocol, session::{Direction, PendingSessionHandshakeError, SessionEvent, SessionId, SessionManager}, state::{NetworkState, StateAction}, }; use futures::Stream;...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/protocol.rs
crates/net/network/src/protocol.rs
//! Support for handling additional RLPx-based application-level protocols. //! //! See also <https://github.com/ethereum/devp2p/blob/master/README.md> use alloy_primitives::bytes::BytesMut; use futures::Stream; use reth_eth_wire::{ capability::SharedCapabilities, multiplex::ProtocolConnection, protocol::Protocol,...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/metrics.rs
crates/net/network/src/metrics.rs
use metrics::Histogram; use reth_eth_wire::DisconnectReason; use reth_ethereum_primitives::TxType; use reth_metrics::{ metrics::{Counter, Gauge}, Metrics, }; /// Scope for monitoring transactions sent from the manager to the tx manager pub(crate) const NETWORK_POOL_TRANSACTIONS_SCOPE: &str = "network.pool.tran...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/import.rs
crates/net/network/src/import.rs
//! This module provides an abstraction over block import in the form of the `BlockImport` trait. use crate::message::NewBlockMessage; use reth_eth_wire::NewBlock; use reth_eth_wire_types::broadcast::NewBlockHashes; use reth_network_peers::PeerId; use std::{ error::Error, task::{Context, Poll}, }; /// Abstrac...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/cache.rs
crates/net/network/src/cache.rs
//! Network cache support use alloy_primitives::map::DefaultHashBuilder; use core::hash::BuildHasher; use derive_more::{Deref, DerefMut}; use itertools::Itertools; use schnellru::{ByLength, Limiter, Unlimited}; use std::{fmt, hash::Hash}; /// A minimal LRU cache based on a [`LruMap`](schnellru::LruMap) with limited c...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/message.rs
crates/net/network/src/message.rs
//! Capability messaging //! //! An `RLPx` stream is multiplexed via the prepended message-id of a framed message. //! Capabilities are exchanged via the `RLPx` `Hello` message as pairs of `(id, version)`, <https://github.com/ethereum/devp2p/blob/master/rlpx.md#capability-messaging> use crate::types::Receipts69; use a...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/eth_requests.rs
crates/net/network/src/eth_requests.rs
//! Blocks/Headers management for the p2p network. use crate::{ budget::DEFAULT_BUDGET_TRY_DRAIN_DOWNLOADERS, metered_poll_nested_stream_with_budget, metrics::EthRequestHandlerMetrics, }; use alloy_consensus::{BlockHeader, ReceiptWithBloom}; use alloy_eips::BlockHashOrNumber; use alloy_rlp::Encodable; use futu...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/budget.rs
crates/net/network/src/budget.rs
/// Default budget to try and drain streams. /// /// Default is 10 iterations. pub const DEFAULT_BUDGET_TRY_DRAIN_STREAM: u32 = 10; /// Default budget to try and drain headers and bodies download streams. /// /// Default is 2 iterations. pub const DEFAULT_BUDGET_TRY_DRAIN_DOWNLOADERS: u32 = 2; /// Default budget to t...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false
SeismicSystems/seismic-reth
https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/crates/net/network/src/session/conn.rs
crates/net/network/src/session/conn.rs
//! Connection types for a session use futures::{Sink, Stream}; use reth_ecies::stream::ECIESStream; use reth_eth_wire::{ errors::EthStreamError, message::EthBroadcastMessage, multiplex::{ProtocolProxy, RlpxSatelliteStream}, EthMessage, EthNetworkPrimitives, EthStream, EthVersion, NetworkPrimitives, P2...
rust
Apache-2.0
62834bd8deb86513778624a3ba33f55f4d6a1471
2026-01-04T20:20:17.218210Z
false