refactor(spec-specs): clarify the EIP-7981 data surcharge - #3536
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3536 +/- ##
===================================================
- Coverage 94.44% 94.44% -0.01%
===================================================
Files 624 624
Lines 36929 36928 -1
Branches 3326 3326
===================================================
- Hits 34876 34875 -1
Misses 1450 1450
Partials 603 603
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Keep the access-list data surcharge separate from entry charges and calldata tokens in EELS so both sides of the gas-used maximum directly reflect the specification. Return gas cost instead of floor tokens from the testing helper and update the corresponding test wording. Both callers already used the same floor gas constant. This changes neither the gas schedule nor test expectations; the reference pin is unchanged. Runtime test improvements are in a separate PR. Validation: just static and all 367 original EIP-7981 EELS fill cases pass with this refactor alone.
Align the test-local helper with the testing-fork helper by returning gas cost instead of floor tokens. Pass the active fork explicitly and update the runtime and transition callers, using the post-fork rate where the surcharge first applies. Keep explicit expected token counts in the token-calculation test and convert those independently to gas. The test helper remains separate from the implementation whose access-list calculation is under test. Rebase onto forks/amsterdam at 1cf1c08 before comparing fixtures. All 367 EIP-7981 cases fill on the baseline and after this change. The hasher compare --tests command reports no differences, and all 367 fixture payloads match after excluding _info metadata. Full just static passes. No test expectations, parameters, or test identities change.
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.
Description
Make EIP-7981's flat access-list data surcharge explicit in the intrinsic and calldata-floor calculations. The testing-fork and test-local helpers now return the gas cost directly, and the related test wording uses the same terminology.
The gas schedule, test expectations, and reference-spec pin are unchanged. All 367 EIP-7981 EELS fill cases pass on
forks/amsterdamand this branch;hasher compare --testsreports no fixture differences.just staticpasses.Related Issues or PRs
Related to #3217 and #1943. Independent test and checklist improvements are in #3537.
Checklist
just static<type>(<area>): <title>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute Animal Picture