EIP-7976 + EIP-7981: calldata floor increase and access-list data cost - #2877
Open
anvacaru wants to merge 2 commits into
Open
EIP-7976 + EIP-7981: calldata floor increase and access-list data cost#2877anvacaru wants to merge 2 commits into
anvacaru wants to merge 2 commits into
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 aGhaseip7976-gatedCtxfloorrule whose token count is4 * len(data)— EIP-7976 redefines the floor tokens from EIP-7623'szero + 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 (newCtxfloortoken argument fed by#accessListFloorTokens), the per-entry<callGas>deduction in#loadAccessListAux, and the intrinsic side of the transaction admission check via#accessListDataCost.Gaccesslistaddress2400,Gaccessliststoragekey1900) 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, forfull_gas_consumption[exact_gas-type_0_protected](1042 non-zero calldata bytes,gasLimit81688), the floor here is21000 + 16*4168 = 87688, above the gas limit, while with 2780'sGtxbase = 12000it is 78688 and the transaction is valid.