Skip to content

refactor(spec-specs): clarify the EIP-7981 data surcharge - #3536

Merged
danceratopz merged 2 commits into
ethereum:forks/amsterdamfrom
danceratopz:7981
Sep 15, 2026
Merged

danceratopz merged 2 commits into
ethereum:forks/amsterdamfrom
danceratopz:7981

Conversation

@danceratopz

@danceratopz danceratopz commented Sep 7, 2026

Copy link
Copy Markdown
Member

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/amsterdam and this branch; hasher compare --tests reports no fixture differences. just static passes.

Related Issues or PRs

Related to #3217 and #1943. Independent test and checklist improvements are in #3537.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

Cat

@danceratopz danceratopz added A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) C-refactor Category: refactor A-test-forks Area: execution_testing.forks labels Sep 7, 2026
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.44%. Comparing base (1cf1c08) to head (6138605).

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              
Flag Coverage Δ
unittests 94.44% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gurukamath gurukamath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! One minor nit

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.
@danceratopz
danceratopz merged commit 75edf06 into ethereum:forks/amsterdam Sep 15, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) A-test-forks Area: execution_testing.forks C-refactor Category: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants