Skip to content

feat(tests): strengthen EIP-7981 gas and balance coverage - #61

Merged
danceratopz merged 8 commits into
danceratopz:7981-improve-testsfrom
spencer-tb:pr3537-review
Sep 18, 2026
Merged

danceratopz merged 8 commits into
danceratopz:7981-improve-testsfrom
spencer-tb:pr3537-review

Conversation

@spencer-tb

@spencer-tb spencer-tb commented Sep 17, 2026

Copy link
Copy Markdown

Description

Add coverage and fixture improvements from an independent review of ethereum#3537. This draft targets 7981-improve-tests for inclusion in that PR.

Several changes overlap with Louis’s review suggestions: fixture cleanup, making the floor tests exercise the floor, merging crossover cases, recipient and balance checklist coverage, and two-dimensional gas coverage.

The fixture-driven floor tests previously billed the intrinsic side. Resize their calldata and assert that the floor binds for types 1–3. Merge the crossover and dominance tests into five execution-gas offsets, and add exact/one-wei-short sender balance cases with zero and nonzero value.

Add a reservoir-backed storage-write test that pins block header gas independently of the transaction receipt. It covers the floor above the total bill, the floor between execution and total gas, and execution exceeding both the floor and state gas. The last case catches incorrectly using the floor alone for the execution dimension.

Fold the surplus constant into its fixture, remove the unused authorization-refund fixture, and simplify authorization parameter lookup. Keep transaction_top_frame_gas_calculator: below the cap, type 4 authorization state gas spills into the sender's bill. Retained type 4 fixtures are unchanged; the two resized floor tests now exclude type 4.

Related Issues or PRs

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.

@spencer-tb spencer-tb closed this Sep 17, 2026
@spencer-tb spencer-tb changed the title feat(tests): address EIP-7981 coverage review feat(tests): strengthen EIP-7981 gas and balance coverage Sep 17, 2026
@spencer-tb spencer-tb reopened this Sep 17, 2026
@spencer-tb spencer-tb changed the title feat(tests): strengthen EIP-7981 gas and balance coverage feat(tests): add execution-dominant EIP-7981 block gas coverage Sep 17, 2026
@spencer-tb spencer-tb changed the title feat(tests): add execution-dominant EIP-7981 block gas coverage feat(tests): strengthen EIP-7981 gas and balance coverage Sep 17, 2026
@spencer-tb
spencer-tb marked this pull request as ready for review September 17, 2026 15:10

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

tysm!!! this looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants