execution: implement EIP-7981 - Access List Data Gas#20631
Open
Sahil-4555 wants to merge 8 commits intoerigontech:mainfrom
Open
execution: implement EIP-7981 - Access List Data Gas#20631Sahil-4555 wants to merge 8 commits intoerigontech:mainfrom
Sahil-4555 wants to merge 8 commits intoerigontech:mainfrom
Conversation
Raise the calldata floor cost from 10/40 (EIP-7623) to a uniform 64 gas per byte, activated with the Amsterdam (Glamsterdam) fork. This reduces the maximum possible block size by ~37% with minimal user impact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move to gitignored agentspecs/ directory instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Avoid calling p.isAmsterdam() twice per iteration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Avoid calling p.isAmsterdam() three times; use a single local variable. Co-Authored-By: Claude Opus 4.6 (1M context) <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 EIP-7981 which prices access lists for their data footprint, preventing circumvention of the EIP-7623/7976 floor pricing. Activated with the Amsterdam fork. Builds on top of the EIP 7976 PR and refactors its floor gas logic to incorporate access list tokens.
EIP-7976 changes (refactor)
if dataLen > 0so that access list tokens (EIP-7981) apply even when calldata is emptyif IsEIP7623 && !IsEIP7976— pre-Amsterdam floor (unchanged formula)if IsEIP7976— Amsterdam floor with access list tokens (new block)Access list cost (intrinsic gas)
Per the spec,
access_list_costnow includes a data component:20 × 64 = 1280gas (on top of base 2400)32 × 64 = 2048gas (on top of base 1900)Floor gas (access list tokens)
Access list entries contribute
floor_tokens_in_access_listto the EIP-7976 floor calculation:20 × 4 = 80tokens32 × 4 = 128tokensdata_floor_gas_cost = 21000 + 16 × total_floor_data_tokensChanges
params/protocol.go: AddTxTokenPerNonZeroByte = 4constantmdgas/intrinsic_gas.go: Refactor EIP-7976 floor, add EIP-7981 logicmdgas/intrinsic_gas_test.go: Add tests for intrinsic gas, floor gas, and pre-Amsterdam no-effect behaviorDependent: #20613
Closes: #20544