Test Fork Transition¶
Documentation for tests/amsterdam/eip7981_increase_access_list_cost/test_fork_transition.py@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7981_increase_access_list_cost/test_fork_transition.py --fork Amsterdam
Fork-transition tests for EIP-7981: Increase Access List Cost.
EIP-7981 adds a data-footprint surcharge for access list bytes at the Amsterdam fork boundary. These tests send identical access-list transactions in a pre-fork block and a post-fork block (straddling the transition timestamp) and pin the per-transaction gas paid on each side, plus the validity flip for gas limits inside the uplift gap.
The post-fork intrinsic composes three repricings; the hand-derived expectations below keep each term explicit so the EIP-7981 surcharge is individually visible:
- EIP-2780 decomposes the flat pre-fork
TX_BASEinto the lowered base plus theCOLD_ACCOUNT_ACCESSrecipient charge. - EIP-8038 reprices the per-address and per-storage-key access list charges to the fork's cold access costs.
- EIP-7981 adds four floor tokens per access list byte, charged at
TX_DATA_TOKEN_FLOORin the intrinsic and counted in the floor.
Test Functions Overview¶
| Name | Type | Cases (Amsterdam) | Description |
|---|---|---|---|
test_access_list_floor_across_amsterdam_transition |
blockchain_test | 1 | Pin access list bytes entering the calldata floor at the boundary. |
test_access_list_intrinsic_across_amsterdam_transition |
blockchain_test | 3 | Pin the access list intrinsic change across the Amsterdam boundary. |
test_access_list_validity_across_amsterdam_transition |
blockchain_test | 1 | Pin the intrinsic-validity flip across the Amsterdam boundary. |