Skip to content

EIP-7976 + EIP-7981: calldata floor increase and access-list data cost - #2877

Open
anvacaru wants to merge 2 commits into
amsterdam-foundationfrom
eip-7976-7981
Open

EIP-7976 + EIP-7981: calldata floor increase and access-list data cost#2877
anvacaru wants to merge 2 commits into
amsterdam-foundationfrom
eip-7976-7981

Conversation

@anvacaru

Copy link
Copy Markdown
Contributor

Implements the two Scheduled Amsterdam data-pricing EIPs. EIP-7976 raises the calldata floor to a flat 64 gas per byte, and EIP-7981 closes the access-list loophole by charging access lists for their data footprint at the same rate, so they can no longer be used to bypass floor pricing.

Changes:

  • Gtxdatafloor < AMSTERDAM > => 16, and a Ghaseip7976-gated Ctxfloor rule whose token count is 4 * len(data) — EIP-7976 redefines the floor tokens from EIP-7623's zero + 4*nonzero, so the bump alone is not sufficient.
  • Ghaseip7981-gated access-list data cost of 64 gas per byte (1280 per address, 2048 per storage key), applied in the three places the reference implementation requires it: the floor (new Ctxfloor token argument fed by #accessListFloorTokens), the per-entry <callGas> deduction in #loadAccessListAux, and the intrinsic side of the transaction admission check via #accessListDataCost.
  • The EIP-2930 per-entry prices (Gaccesslistaddress 2400, Gaccessliststoragekey 1900) are deliberately unchanged, as EIP-7981 specifies. The higher Amsterdam values belong to EIP-8038, which is currently not confirmed as part of the Glamsterdam hardfork (current status is Considered for Inclusion).

The for_amsterdam/amsterdam/eip7976_* sub-cases that remain masked are dependent on EIP-2780, not on this implementation. Those fixtures encode the 7976 floor on top of the 2780-decomposed transaction base, so a 2780-less branch computes a higher floor and rejects transactions that the fixtures expect to succeed. Concretely, for full_gas_consumption[exact_gas-type_0_protected] (1042 non-zero calldata bytes, gasLimit 81688), the floor here is 21000 + 16*4168 = 87688, above the gas limit, while with 2780's Gtxbase = 12000 it is 78688 and the transaction is valid.

anvacaru and others added 2 commits July 27, 2026 13:57
… eip-7981 access-list data cost

EIP-7976 raises the calldata floor to a flat 64 gas/byte: Gtxdatafloor
becomes 16 at Amsterdam and the floor token count changes from
EIP-7623's zero + 4*nonzero to 4*len(data), gated on Ghaseip7976.

EIP-7981 charges access lists for their data footprint at the same
64 gas/byte rate (1280 per address, 2048 per storage key): the tokens
join the floor via a new Ctxfloor argument, and the equivalent surcharge
is deducted per entry in #loadAccessListAux and required by the
transaction admission check, gated on Ghaseip7981. The EIP-2930 per-entry
prices are unchanged, as the EIP specifies.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant