Skip to content

feat(tests): add EIP-2780 coverage gap tests - #3318

Merged
spencer-tb merged 2 commits into
ethereum:forks/amsterdamfrom
spencer-tb:eip2780-coverage-gap-tests
Aug 6, 2026
Merged

feat(tests): add EIP-2780 coverage gap tests#3318
spencer-tb merged 2 commits into
ethereum:forks/amsterdamfrom
spencer-tb:eip2780-coverage-gap-tests

Conversation

@spencer-tb

Copy link
Copy Markdown
Contributor

Description

Rebase of #3296 now that #3266 has merged. Adds three EIP-2780 coverage gaps, all filled green:

  • test_intrinsic_gas_floor_boundary_all_tx_types: the intrinsic - 1 rejection boundary for every transaction type (previously only types 0 and 4 had one).
  • test_setcode_tx_across_amsterdam_transition: a type-4 transaction straddling the fork boundary, pinning the per-authorization cost migrating from the pre-fork intrinsic (AUTH_PER_EMPTY_ACCOUNT) into the decomposed intrinsic plus top-frame charges, cross-checked against a hand-derived per-fork decomposition.
  • test_calldata_floor_with_authorizations: a binding calldata floor on a type-4 transaction, pinning that authorization tuples add no floor tokens while the masked delegation still lands, and that one gas below the floor rejects.

Related Issues or PRs

Supersedes #3296; part of the EIP-2780 coverage item in #3217.

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

Put a link to a cute animal picture inside the parenthesis-->

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.50%. Comparing base (f1aa970) to head (93f6d78).
⚠️ Report is 3 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #3318   +/-   ##
================================================
  Coverage            93.50%   93.50%           
================================================
  Files                  624      624           
  Lines                37070    37070           
  Branches              3394     3394           
================================================
  Hits                 34661    34661           
  Misses                1653     1653           
  Partials               756      756           
Flag Coverage Δ
unittests 93.50% <ø> (ø)

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.

@spencer-tb

spencer-tb commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Forwarding from previous review via @marioevz: (LouisTsai-Csie#16)

@spencer-tb spencer-tb added C-feat Category: an improvement or new feature A-tests Area: Consensus tests. labels Aug 5, 2026

@LouisTsai-Csie LouisTsai-Csie 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, only leave a comment on the docstrings:

we should simplify them if the test or function already clearly expresses its intent.
I've noticed docstrings getting longer in the repo, which creates maintenance overhead. When tests or functions change, we'll need to update the documentation too, which becomes kind of review burden. What do you think?

Comment thread tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_calldata_floor.py Outdated
Comment thread tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_fork_transition.py Outdated
@spencer-tb

Copy link
Copy Markdown
Contributor Author

Thx @LouisTsai-Csie! Addressed!

@spencer-tb
spencer-tb merged commit 1afd925 into ethereum:forks/amsterdam Aug 6, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tests Area: Consensus tests. C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants