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 // TODO: seismic
24 html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
25 html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
26 issue_tracker_base_url = "https://github.com/SeismicSystems/seismic-reth/issues/"
27)]
28#![cfg_attr(not(test), warn(unused_crate_dependencies))]
29#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
30
31pub mod cli;
32pub mod commands;
33
34/// Re-exported utils.
35pub mod utils {
36 pub use reth_db::open_db_read_only;
37
38 /// Re-exported from `reth_node_core`, also to prevent a breaking change. See the comment
39 /// on the `reth_node_core::args` re-export for more details.
40 pub use reth_node_core::utils::*;
41}
42
43/// Re-exported payload related types
44pub mod payload {
45 pub use reth_payload_builder::*;
46 pub use reth_payload_primitives::*;
47 pub use reth_payload_validator::ExecutionPayloadValidator;
48}
49
50/// Re-exported from `reth_node_api`.
51pub mod api {
52 pub use reth_node_api::*;
53}
54
55/// Re-exported from `reth_node_core`.
56pub mod core {
57 pub use reth_node_core::*;
58}
59
60/// Re-exported from `reth_node_metrics`.
61pub mod prometheus_exporter {
62 pub use reth_node_metrics::recorder::*;
63}
64
65/// Re-export of the `reth_node_core` types specifically in the `args` module.
66///
67/// This is re-exported because the types in `reth_node_core::args` originally existed in
68/// `reth::args` but were moved to the `reth_node_core` crate. This re-export avoids a breaking
69/// change.
70pub mod args {
71 pub use reth_node_core::args::*;
72}
73
74/// Re-exported from `reth_node_core`, also to prevent a breaking change. See the comment on
75/// the `reth_node_core::args` re-export for more details.
76pub mod version {
77 pub use reth_node_core::version::*;
78}
79
80/// Re-exported from `reth_node_builder`
81pub mod builder {
82 pub use reth_node_builder::*;
83}
84
85/// Re-exported from `reth_node_core`, also to prevent a breaking change. See the comment on
86/// the `reth_node_core::args` re-export for more details.
87pub mod dirs {
88 pub use reth_node_core::dirs::*;
89}
90
91/// Re-exported from `reth_chainspec`
92pub mod chainspec {
93 pub use reth_chainspec::*;
94 pub use reth_ethereum_cli::chainspec::*;
95}
96
97/// Re-exported from `reth_provider`.
98pub mod providers {
99 pub use reth_provider::*;
100}
101
102/// Re-exported from `reth_primitives`.
103pub mod primitives {
104 pub use reth_primitives::*;
105}
106
107/// Re-exported from `reth_beacon_consensus`.
108pub mod beacon_consensus {
109 pub use reth_beacon_consensus::*;
110}
111/// Re-exported from `reth_blockchain_tree`.
112pub mod blockchain_tree {
113 pub use reth_blockchain_tree::*;
114}
115
116/// Re-exported from `reth_consensus`.
117pub mod consensus {
118 pub use reth_consensus::*;
119}
120
121/// Re-exported from `reth_consensus_common`.
122pub mod consensus_common {
123 pub use reth_consensus_common::*;
124}
125
126/// Re-exported from `reth_revm`.
127pub mod revm {
128 pub use reth_revm::*;
129}
130
131/// Re-exported from `reth_tasks`.
132pub mod tasks {
133 pub use reth_tasks::*;
134}
135
136/// Re-exported from `reth_network`.
137pub mod network {
138 pub use reth_network::*;
139 pub use reth_network_api::{
140 noop, test_utils::PeersHandleProvider, NetworkInfo, Peers, PeersInfo,
141 };
142}
143
144/// Re-exported from `reth_transaction_pool`.
145pub mod transaction_pool {
146 pub use reth_transaction_pool::*;
147}
148
149/// Re-export of `reth_rpc_*` crates.
150pub mod rpc {
151 /// Re-exported from `reth_rpc_builder`.
152 pub mod builder {
153 pub use reth_rpc_builder::*;
154 }
155
156 /// Re-exported from `alloy_rpc_types`.
157 pub mod types {
158 pub use alloy_rpc_types::*;
159 }
160
161 /// Re-exported from `reth_rpc_server_types`.
162 pub mod server_types {
163 pub use reth_rpc_server_types::*;
164 /// Re-exported from `reth_rpc_eth_types`.
165 pub mod eth {
166 pub use reth_rpc_eth_types::*;
167 }
168 }
169
170 /// Re-exported from `reth_rpc_api`.
171 pub mod api {
172 pub use reth_rpc_api::*;
173 }
174 /// Re-exported from `reth_rpc::eth`.
175 pub mod eth {
176 pub use reth_rpc::eth::*;
177 }
178
179 /// Re-exported from `reth_rpc::rpc`.
180 pub mod result {
181 pub use reth_rpc_server_types::result::*;
182 }
183
184 /// Re-exported from `reth_rpc_types_compat`.
185 pub mod compat {
186 pub use reth_rpc_types_compat::*;
187 }
188}
189
190// re-export for convenience
191#[doc(inline)]
192pub use reth_cli_runner::{tokio_runtime, CliContext, CliRunner};
193
194// for rendering diagrams
195use aquamarine as _;