revm_primitives/eip8037.rs
1//! EIP-8037: State Creation Gas Cost Increase
2//!
3//! Introduces a reservoir model that separates *state gas* (storage/code/account
4//! creation) from *regular* execution gas. State-gas charges are expressed as
5//! a number of "state bytes" that get multiplied by `cost_per_state_byte` (CPSB).
6//! In Glamsterdam, CPSB is fixed at `1530`.
7
8/// State bytes charged per SSTORE 0→non-zero.
9pub const SSTORE_SET_BYTES: u64 = 64;
10
11/// State bytes charged when creating a new account.
12pub const NEW_ACCOUNT_BYTES: u64 = 120;
13
14/// State bytes charged per EIP-7702 authorization base cost.
15pub const AUTH_BASE_BYTES: u64 = 23;
16
17/// State bytes charged per byte of deployed code.
18pub const CODE_DEPOSIT_PER_BYTE: u64 = 1;
19
20/// Cost per state byte (CPSB) for Glamsterdam.
21///
22/// Reference: [EIP-8037: State Creation Gas Cost Increase](https://eips.ethereum.org/EIPS/eip-8037).
23pub const CPSB_GLAMSTERDAM: u64 = 1530;