Skip to content

feat(tests): cover a cross-frame state gas refund with a funded reservoir - #3498

Merged
spencer-tb merged 1 commit into
ethereum:forks/amsterdamfrom
chfast:eip8037-cross-frame-reservoir-grant
Sep 2, 2026
Merged

feat(tests): cover a cross-frame state gas refund with a funded reservoir#3498
spencer-tb merged 1 commit into
ethereum:forks/amsterdamfrom
chfast:eip8037-cross-frame-reservoir-grant

Conversation

@chfast

@chfast chfast commented Sep 2, 2026

Copy link
Copy Markdown
Member

Description

Add a test where the sender pays for a reservoir that covers none, one or both of the parent's two fresh sets and the rest spill. A delegated child clears both slots and the refunded state gas lands in the reservoir. The call window, a later set and the receipt are the same in every case: the refund stays in the reservoir and the spill is not repaid.

With one set covered, the refund merged from the child is larger than the outstanding spill. The existing tests in this file all start with an empty reservoir, so the merged refund never exceeds the spill there. Covering both sets and covering none are the boundaries.

The expectations pin current placement. With the src/ change of #3478 applied, SLOT_RESULT drops by the state cost of the spilled sets and SLOT_PROBE_RESULT rises by one state cost for reservoir_slots=0 only. The receipt does not change.

Related Issues or PRs

Follow-up to #3490. Coverage for ethereum/EIPs#12265 and #3478.

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.

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.90%. Comparing base (814b313) to head (ed65a20).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #3498   +/-   ##
================================================
  Coverage            93.90%   93.90%           
================================================
  Files                  624      624           
  Lines                36905    36905           
  Branches              3326     3326           
================================================
  Hits                 34655    34655           
  Misses                1569     1569           
  Partials               681      681           
Flag Coverage Δ
unittests 93.90% <ø> (ø)

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.

…voir

Add a test where the sender pays for a reservoir that covers none, one
or both of the parent's two fresh sets and the rest spill. A delegated
child clears both slots and the refunded state gas lands in the
reservoir. The call window, a later set and the receipt are the same
in every case: the refund stays in the reservoir and the spill is not
repaid.

With one set covered, the refund merged from the child is larger than
the outstanding spill. The existing tests in this file all start with
an empty reservoir, so the merged refund never exceeds the spill there.
Covering both sets and covering none are the boundaries.

The expectations pin current placement. With the `src/` change of
sets and `SLOT_PROBE_RESULT` rises by one state cost for
`reservoir_slots=0` only. The receipt does not change.

Follow-up to ethereum#3490. Coverage for ethereum/EIPs#12265 and ethereum#3478.
@spencer-tb
spencer-tb force-pushed the eip8037-cross-frame-reservoir-grant branch from 751e0c7 to ed65a20 Compare September 2, 2026 12:21

@spencer-tb spencer-tb 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.

Rebased & approved! :)

@spencer-tb
spencer-tb merged commit 8faf36a into ethereum:forks/amsterdam Sep 2, 2026
17 checks passed
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