Skip to content

Test Access List Gas

Documentation for tests/amsterdam/eip8038_state_access_gas_cost_increase/test_access_list_gas.py@c74f1a67.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/amsterdam/eip8038_state_access_gas_cost_increase/test_access_list_gas.py --fork Amsterdam

Tests for EIP-8038: State Access Gas Cost Increase.

Covers the EIP-8038 access-list repricing:

  • The intrinsic surcharge per access-list entry is TX_ACCESS_LIST_ADDRESS (3000) per address and TX_ACCESS_LIST_STORAGE_KEY (3000) per storage key, isolated from the EIP-7981 calldata-floor tokens that the Amsterdam intrinsic calculator also charges on access-list bytes.
  • A storage slot named in the access list is warm on its first runtime access (SLOAD/SSTORE pays WARM_SLOAD rather than the cold cost).
  • Warmth is scoped to (address, slot): listing slot s of account A does not warm slot s of account B.

Test Functions Overview

Name Type Cases (Amsterdam) Description
test_access_list_duplicate_address_key_intrinsic_and_warmth state_test 1 A duplicated (address, storage_key) access-list entry is billed
test_access_list_intrinsic_surcharge state_test 5 Assert the per-entry intrinsic access-list surcharge.
test_access_list_slot_warmth_is_address_scoped state_test 1 Access-list slot warmth is scoped to (address, slot).
test_access_list_warms_storage_slot state_test 2 A storage slot named in the access list is warm on first access.