revm_primitives/constants.rs
1use alloy_primitives::{address, Address};
2
3/// Number of block hashes that EVM can access in the past (pre-Prague)
4pub const BLOCK_HASH_HISTORY: u64 = 256;
5
6/// EIP-2935: Serve historical block hashes from state
7///
8/// Number of block hashes the EVM can access in the past (Prague).
9///
10/// # Note
11/// This is named `HISTORY_SERVE_WINDOW` in the EIP.
12pub const BLOCKHASH_SERVE_WINDOW: usize = 8192;
13
14/// EIP-2935: Serve historical block hashes from state
15///
16/// The address where historical blockhashes are available.
17///
18/// # Note
19/// This is named `HISTORY_STORAGE_ADDRESS` in the EIP.
20pub const BLOCKHASH_STORAGE_ADDRESS: Address = address!("0F792be4B0c0cb4DAE440Ef133E90C0eCD48CCCC");
21
22/// The address of precompile 3, which is handled specially in a few places
23pub const PRECOMPILE3: Address =
24 Address::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3]);