Skip to content

Spec

Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/spec.py@b314d18e.

Defines EIP-8037 specification constants and functions.

Spec dataclass

Constants and helpers for the EIP-8037 State Creation Gas Cost Increase tests.

Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/spec.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@dataclass(frozen=True)
class Spec:
    """
    Constants and helpers for the EIP-8037 State Creation Gas Cost
    Increase tests.
    """

    # EIP-7825 transaction gas limit cap
    TX_MAX_GAS_LIMIT = 2**24  # 16,777,216

    # CPSB is a fixed parameter derived from a 150M reference block
    # gas limit and a 120 GiB/year target state growth.
    COST_PER_STATE_BYTE = 1530

    # State bytes per operation
    STATE_BYTES_PER_NEW_ACCOUNT = 120
    STATE_BYTES_PER_STORAGE_SET = 64
    STATE_BYTES_PER_AUTH_BASE = 23

    # Regular gas constants (EIP-8037 replaces old combined costs)
    REGULAR_GAS_CREATE = 9000
    PER_AUTH_BASE_COST = 7500
    GAS_COLD_STORAGE_WRITE = 5000