revm_primitives/
constants.rs

1use crate::eip170;
2use alloy_primitives::{b256, Address, B256};
3
4/// Number of block hashes that EVM can access in the past (pre-Prague)
5pub const BLOCK_HASH_HISTORY: u64 = 256;
6
7/// The address of precompile 3, which is handled specially in a few places
8pub const PRECOMPILE3: Address =
9    Address::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3]);
10
11/// EVM interpreter stack limit
12pub const STACK_LIMIT: usize = 1024;
13
14/// EIP-3860: Limit and meter initcode
15///
16/// Limit of maximum initcode size is `2 * MAX_CODE_SIZE`.
17pub const MAX_INITCODE_SIZE: usize = 2 * eip170::MAX_CODE_SIZE;
18
19/// EVM call stack limit
20pub const CALL_STACK_LIMIT: u64 = 1024;
21
22/// The Keccak-256 hash of the empty string `""`.
23pub const KECCAK_EMPTY: B256 =
24    b256!("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470");