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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 | class Spec:
"""
Constants and helpers for the EIP-8037 State Creation Gas Cost
Increase tests.
"""
# State reservoir sizing for each protocol system call.
SYSTEM_MAX_SSTORES_PER_CALL = 16
# 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
# Execution gas constants. EIP-8037 separated state from execution gas;
# EIP-8038 then repriced them.
EXECUTION_GAS_CREATE = 12000
# Total execution intrinsic per EIP-7702 authorization:
# ACCOUNT_WRITE + EXECUTION_PER_AUTH_BASE_COST.
PER_AUTH_BASE_COST = 16816
GAS_COLD_STORAGE_WRITE = 12100
|