reth/
lib.rs

1//! Rust Ethereum (reth) binary executable.
2//!
3//! ## Feature Flags
4//!
5//! - `jemalloc`: Uses [jemallocator](https://github.com/tikv/jemallocator) as the global allocator.
6//!   This is **not recommended on Windows**. See [here](https://rust-lang.github.io/rfcs/1974-global-allocators.html#jemalloc)
7//!   for more info.
8//! - `jemalloc-prof`: Enables [jemallocator's](https://github.com/tikv/jemallocator) heap profiling
9//!   and leak detection functionality. See [jemalloc's opt.prof](https://jemalloc.net/jemalloc.3.html#opt.prof)
10//!   documentation for usage details. This is **not recommended on Windows**. See [here](https://rust-lang.github.io/rfcs/1974-global-allocators.html#jemalloc)
11//!   for more info.
12//! - `asm-keccak`: replaces the default, pure-Rust implementation of Keccak256 with one implemented
13//!   in assembly; see [the `keccak-asm` crate](https://github.com/DaniPopes/keccak-asm) for more
14//!   details and supported targets
15//! - `min-error-logs`: Disables all logs below `error` level.
16//! - `min-warn-logs`: Disables all logs below `warn` level.
17//! - `min-info-logs`: Disables all logs below `info` level. This can speed up the node, since fewer
18//!   calls to the logging component are made.
19//! - `min-debug-logs`: Disables all logs below `debug` level.
20//! - `min-trace-logs`: Disables all logs below `trace` level.
21
22#![doc(
23    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
24    html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
25    issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
26)]
27#![cfg_attr(not(test), warn(unused_crate_dependencies))]
28#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
29
30pub mod cli;
31pub mod commands;
32
33/// Re-exported utils.
34pub mod utils {
35    pub use reth_db::open_db_read_only;
36
37    /// Re-exported from `reth_node_core`, also to prevent a breaking change. See the comment
38    /// on the `reth_node_core::args` re-export for more details.
39    pub use reth_node_core::utils::*;
40}
41
42/// Re-exported payload related types
43pub mod payload {
44    pub use reth_ethereum_payload_builder::EthereumExecutionPayloadValidator;
45    pub use reth_payload_builder::*;
46    pub use reth_payload_primitives::*;
47}
48
49/// Re-exported from `reth_node_api`.
50pub mod api {
51    pub use reth_node_api::*;
52}
53
54/// Re-exported from `reth_node_core`.
55pub mod core {
56    pub use reth_node_core::*;
57}
58
59/// Re-exported from `reth_node_metrics`.
60pub mod prometheus_exporter {
61    pub use reth_node_metrics::recorder::*;
62}
63
64/// Re-export of the `reth_node_core` types specifically in the `args` module.
65///
66/// This is re-exported because the types in `reth_node_core::args` originally existed in
67/// `reth::args` but were moved to the `reth_node_core` crate. This re-export avoids a breaking
68/// change.
69pub mod args {
70    pub use reth_node_core::args::*;
71}
72
73/// Re-exported from `reth_node_core`, also to prevent a breaking change. See the comment on
74/// the `reth_node_core::args` re-export for more details.
75pub mod version {
76    pub use reth_node_core::version::*;
77}
78
79/// Re-exported from `reth_node_builder`
80pub mod builder {
81    pub use reth_node_builder::*;
82}
83
84/// Re-exported from `reth_node_core`, also to prevent a breaking change. See the comment on
85/// the `reth_node_core::args` re-export for more details.
86pub mod dirs {
87    pub use reth_node_core::dirs::*;
88}
89
90/// Re-exported from `reth_chainspec`
91pub mod chainspec {
92    pub use reth_chainspec::*;
93    pub use reth_ethereum_cli::chainspec::*;
94}
95
96/// Re-exported from `reth_provider`.
97pub mod providers {
98    pub use reth_provider::*;
99}
100
101/// Re-exported from `reth_primitives`.
102pub mod primitives {
103    pub use reth_primitives::*;
104}
105
106/// Re-exported from `reth_ethereum_consensus`.
107pub mod beacon_consensus {
108    pub use reth_node_ethereum::consensus::*;
109}
110
111/// Re-exported from `reth_consensus`.
112pub mod consensus {
113    pub use reth_consensus::*;
114}
115
116/// Re-exported from `reth_consensus_common`.
117pub mod consensus_common {
118    pub use reth_consensus_common::*;
119}
120
121/// Re-exported from `reth_revm`.
122pub mod revm {
123    pub use reth_revm::*;
124}
125
126/// Re-exported from `reth_tasks`.
127pub mod tasks {
128    pub use reth_tasks::*;
129}
130
131/// Re-exported from `reth_network`.
132pub mod network {
133    pub use reth_network::*;
134    pub use reth_network_api::{
135        noop, test_utils::PeersHandleProvider, NetworkInfo, Peers, PeersInfo,
136    };
137}
138
139/// Re-exported from `reth_transaction_pool`.
140pub mod transaction_pool {
141    pub use reth_transaction_pool::*;
142}
143
144/// Re-export of `reth_rpc_*` crates.
145pub mod rpc {
146    /// Re-exported from `reth_rpc_builder`.
147    pub mod builder {
148        pub use reth_rpc_builder::*;
149    }
150
151    /// Re-exported from `alloy_rpc_types`.
152    pub mod types {
153        pub use alloy_rpc_types::*;
154    }
155
156    /// Re-exported from `reth_rpc_server_types`.
157    pub mod server_types {
158        pub use reth_rpc_server_types::*;
159        /// Re-exported from `reth_rpc_eth_types`.
160        pub mod eth {
161            pub use reth_rpc_eth_types::*;
162        }
163    }
164
165    /// Re-exported from `reth_rpc_api`.
166    pub mod api {
167        pub use reth_rpc_api::*;
168    }
169    /// Re-exported from `reth_rpc::eth`.
170    pub mod eth {
171        pub use reth_rpc::eth::*;
172    }
173
174    /// Re-exported from `reth_rpc::rpc`.
175    pub mod result {
176        pub use reth_rpc_server_types::result::*;
177    }
178
179    /// Re-exported from `reth_rpc_types_compat`.
180    pub mod compat {
181        pub use reth_rpc_types_compat::*;
182    }
183}
184
185/// Ress subprotocol installation.
186pub mod ress;
187
188// re-export for convenience
189#[doc(inline)]
190pub use reth_cli_runner::{tokio_runtime, CliContext, CliRunner};
191
192// for rendering diagrams
193use aquamarine as _;