reth_primitives_traits/constants/
mod.rs

1//! Ethereum protocol-related constants
2
3/// Gas units, for example [`GIGAGAS`].
4pub mod gas_units;
5pub use gas_units::{GIGAGAS, KILOGAS, MEGAGAS};
6
7/// The client version: `reth/v{major}.{minor}.{patch}`
8pub const RETH_CLIENT_VERSION: &str = concat!("reth/v", env!("CARGO_PKG_VERSION"));
9
10/// Minimum gas limit allowed for transactions.
11pub const MINIMUM_GAS_LIMIT: u64 = 5000;
12
13/// Maximum gas limit allowed for block.
14/// In hex this number is `0x7fffffffffffffff`
15pub const MAXIMUM_GAS_LIMIT_BLOCK: u64 = 2u64.pow(63) - 1;
16
17/// The bound divisor of the gas limit, used in update calculations.
18pub const GAS_LIMIT_BOUND_DIVISOR: u64 = 1024;
19
20/// The number of blocks to unwind during a reorg that already became a part of canonical chain.
21///
22/// In reality, the node can end up in this particular situation very rarely. It would happen only
23/// if the node process is abruptly terminated during ongoing reorg and doesn't boot back up for
24/// long period of time.
25///
26/// Unwind depth of `3` blocks significantly reduces the chance that the reorged block is kept in
27/// the database.
28pub const BEACON_CONSENSUS_REORG_UNWIND_DEPTH: u64 = 3;