mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
* feat(consensus): Signer recovery and tx validation * Signature hash and use seckp256k1 over k256 * use deref_more for transactions * cleanup and fix for eip1559 hash * fix hash calculation on decoding
27 lines
1.0 KiB
Rust
27 lines
1.0 KiB
Rust
//! Reth block execution/validation configuration and constants
|
|
use reth_primitives::BlockNumber;
|
|
|
|
/// Initial base fee as defined in: https://eips.ethereum.org/EIPS/eip-1559
|
|
pub const EIP1559_INITIAL_BASE_FEE: u64 = 1_000_000_000;
|
|
/// Base fee max change denominator as defined in: https://eips.ethereum.org/EIPS/eip-1559
|
|
pub const EIP1559_BASE_FEE_MAX_CHANGE_DENOMINATOR: u64 = 8;
|
|
/// Elasticity multiplier as defined in: https://eips.ethereum.org/EIPS/eip-1559
|
|
pub const EIP1559_ELASTICITY_MULTIPLIER: u64 = 2;
|
|
|
|
/// Configuration for consensus
|
|
#[derive(Debug, Clone)]
|
|
pub struct Config {
|
|
/// EIP-1559 hard fork number
|
|
pub london_hard_fork_block: BlockNumber,
|
|
/// The Merge/Paris hard fork block number
|
|
pub paris_hard_fork_block: BlockNumber,
|
|
/// Blockchain identifier introduced in EIP-155: Simple replay attack protection
|
|
pub chain_id: u64,
|
|
}
|
|
|
|
impl Default for Config {
|
|
fn default() -> Self {
|
|
Self { london_hard_fork_block: 12965000, paris_hard_fork_block: 15537394, chain_id: 1 }
|
|
}
|
|
}
|