Skip to content

feat(tests): derive the EIP-8250 keyed nonce access cost from the fork and pin it in the gas cap - #3775

Merged
spencer-tb merged 2 commits into
ethereum:eips/bogota/eip-8250from
spencer-tb:eip-8250-keyed-nonce-access-review
Oct 13, 2026
Merged

spencer-tb merged 2 commits into
ethereum:eips/bogota/eip-8250from
spencer-tb:eip-8250-keyed-nonce-access-review

Conversation

@spencer-tb

@spencer-tb spencer-tb commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Review follow-up to #3756.

  • keyed_nonce_access_cost is read off Op.SSTORE(key_warm=False, original_value=1, new_value=2) instead of a hardcoded 2_100 + 10_000, so EIP-8038 repricings flow through as the EIP defines the cost.
  • Drops the asserts comparing the test's sum against the framework calculators. The receipt check against the spec already covers it.
  • Adds test_gas_limit_cap_counts_keyed_nonce_access: the maximum key set with frame gas landing on the per-transaction gas cap or one above. A client that charges the access cost at nonce consumption instead of in intrinsic gas gets gas used right but misses the cap. A second anchor sizes frame data so the calldata floor lands on the cap or one byte above, since the cap checks the larger of the two.
  • Adds test_payer_max_cost_counts_keyed_nonce_access: the maximum key set's payer funded with exactly the max cost or one wei less, so the access cost must be in the escrow APPROVE checks.

Without the spec's access cost the above_cap fixtures fail, along with the 24 keyed test_keyed_nonce_access_cost cases. Dropping it from the floor alone fails only above_cap-floor, and from the max cost alone only one_wei_short.

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.

@gurukamath
gurukamath self-requested a review October 12, 2026 10:49
@gurukamath gurukamath self-assigned this Oct 12, 2026
@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (eips/bogota/eip-8250@539fa84). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                   @@
##             eips/bogota/eip-8250    #3775   +/-   ##
=======================================================
  Coverage                        ?   95.01%           
=======================================================
  Files                           ?      678           
  Lines                           ?    41930           
  Branches                        ?     3933           
=======================================================
  Hits                            ?    39841           
  Misses                          ?     1453           
  Partials                        ?      636           
Flag Coverage Δ
unittests 95.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.

@spencer-tb
spencer-tb force-pushed the eip-8250-keyed-nonce-access-review branch from f9b896e to 03ff362 Compare October 12, 2026 20:12
@spencer-tb
spencer-tb requested a review from marioevz October 12, 2026 20:58
@spencer-tb
spencer-tb force-pushed the eips/bogota/eip-8250 branch from afa31f3 to 539fa84 Compare October 13, 2026 12:00
@spencer-tb
spencer-tb force-pushed the eip-8250-keyed-nonce-access-review branch from 327cdca to e2edaaa Compare October 13, 2026 12:12
@spencer-tb
spencer-tb merged commit 2f3753b into ethereum:eips/bogota/eip-8250 Oct 13, 2026
20 checks passed
gurukamath pushed a commit that referenced this pull request Oct 13, 2026
gurukamath pushed a commit that referenced this pull request Oct 13, 2026
gurukamath pushed a commit that referenced this pull request Oct 15, 2026
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