Skip to content

feat(spec-specs,test-forks,tests): implement EIP-8272 recent roots for frame transactions - #3740

Merged
gurukamath merged 5 commits into
ethereum:eips/bogota/eip-8272from
gurukamath:eips/bogota/eip-8272
Oct 9, 2026
Merged

gurukamath merged 5 commits into
ethereum:eips/bogota/eip-8272from
gurukamath:eips/bogota/eip-8272

Conversation

@gurukamath

@gurukamath gurukamath commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

Implements EIP-8272 on Bogota, at the text that landed with ethereum/EIPs#12443 (blob 0acc21ad8359): the recent root contract is an ordinary contract deployed by a pre-signed creation transaction, and a VERIFY frame targeting it is the recent root verifier frame.

Under that text the EIP changes nothing in the EVM, in transaction validity, or in block validity. The contract's write and validation operations are ordinary execution of its runtime code; the frame-shape, position, and gas-budget rules are public mempool policy, which the executable spec does not model; activation makes no state change. Everything the EIP relies on is already here from EIP-8141 and EIP-7843: static VERIFY frames, SLOTNUM, and the default VERIFY code failing a zero-flag frame against an empty target.

  • specs: name the EIP in the Bogota fork docstring and add the RECENT_ROOT_VERIFIER address constant beside EXPIRY_VERIFIER.
  • test-forks: an EIP8272 mixin pre-allocating the canonical runtime at the deployment address for state and blockchain tests, mirroring the expiry verifier.
  • tests: tests/bogota/eip8272_recent_roots/, 185 fixtures at --fork Bogota:
    • reference vector from the EIP, with the pre-allocated code and its keccak pinned;
    • validation: distinct and repeated references, every invalid-reference shape including a stale occupant of the same ring index, the age window at 8191 and 8192 slots, calldata lengths, frame-shape variants that stay block-valid, exact and one-short execution gas across cold and warm reads, frame position, a failing tuple anywhere in a batch, full-width slots;
    • write: publish then verify with block access list pins, last write in a slot wins, ring overwrite, a contract as source, DELEGATECALL/CALLCODE/EIP-7702 writes landing in the caller's storage, value, wrong lengths, the static-context halt;
    • deployment via generate_system_contract_deploy_test with the EIP's deployment transaction, publishing in the deployment block and verifying in the next; a verifier frame before deployment failing under the default code;
    • fork transition: deployment and a plain write in the last Amsterdam block, verified by a frame in the first Bogota block.

The verifier frame's execution gas is pinned from a cost model derived twice against the canonical runtime, by measurement and by counting the sys-asm assembly, which agree.

The test corpus and helpers borrow from spencer-tb/execution-specs#71, which targeted the earlier activation-install text; its activation machinery and candidate bytecode do not apply here.

Related Issues or PRs

N/A.

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

PHOTO-2026-09-24-17-23-59

@gurukamath
gurukamath requested a review from spencer-tb October 8, 2026 10:44
@gurukamath gurukamath mentioned this pull request Oct 8, 2026
30 of 32 tasks
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@                   Coverage Diff                   @@
##             eips/bogota/eip-8272    #3740   +/-   ##
=======================================================
  Coverage                        ?   94.91%           
=======================================================
  Files                           ?      676           
  Lines                           ?    41823           
  Branches                        ?     3942           
=======================================================
  Hits                            ?    39697           
  Misses                          ?     1471           
  Partials                        ?      655           
Flag Coverage Δ
unittests 94.91% <100.00%> (?)

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 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.

Small nits :)

big-endian expiry timestamp.
"""

RECENT_ROOT_VERIFIER: Final[Address] = Address(

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.

Should we name this RECENT_ROOT_ADDRESS to match the EIP?

Suggested change
RECENT_ROOT_VERIFIER: Final[Address] = Address(
RECENT_ROOT_ADDRESS: Final[Address] = Address(

Comment thread vulture_whitelist.py Outdated
from ethereum.ethash import *
from ethereum.fork_criteria import Unscheduled
from ethereum.forks.bogota.transactions.frame_transaction import (
RECENT_ROOT_VERIFIER,

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.

Suggested change
RECENT_ROOT_VERIFIER,
RECENT_ROOT_ADDRESS,

Comment thread vulture_whitelist.py Outdated
# constructed while decoding transactions, never compared explicitly
FrameMode.DEFAULT
# Documents the EIP-8272 recent root contract; nothing in `src/` calls it.
RECENT_ROOT_VERIFIER

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.

Suggested change
RECENT_ROOT_VERIFIER
RECENT_ROOT_ADDRESS

Comment on lines +261 to +263
A write `RECENT_ROOT_LENGTH` slots after an earlier one lands on the
same ring buffer key and replaces the earlier entry; the new root
verifies in the following slot and the old root does not.

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.

The old root is never referenced here, and at later_slot + 1 it would be 8193 slots old, so it would fail on age rather than on the overwrite. The storage post check already covers the replacement.

Suggested change
A write `RECENT_ROOT_LENGTH` slots after an earlier one lands on the
same ring buffer key and replaces the earlier entry; the new root
verifies in the following slot and the old root does not.
A write `RECENT_ROOT_LENGTH` slots after an earlier one lands on the
same ring buffer key and replaces the earlier entry. The new root
verifies in the following slot.

from ..eip8141_frame_transactions.spec import Spec as FrameSpec
from .spec import Spec

WRITE_STATE_GAS = 200_000

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.

Could this come from Op.SSTORE(0, 1).state_cost(fork) like the 8141 tests?

@spencer-tb

Copy link
Copy Markdown
Contributor

Some extra tests, feel free to use: gurukamath#25

@gurukamath
gurukamath force-pushed the eips/bogota/eip-8272 branch from 62444ab to f6ddc59 Compare October 9, 2026 10:08
@gurukamath
gurukamath merged commit 8997dce into ethereum:eips/bogota/eip-8272 Oct 9, 2026
27 of 28 checks passed
gurukamath added a commit that referenced this pull request Oct 9, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 12, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 12, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
spencer-tb added a commit that referenced this pull request Oct 13, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 13, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 13, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 13, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
(cherry picked from commit 7e4e650)
gurukamath added a commit that referenced this pull request Oct 15, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 21, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 21, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 21, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
gurukamath added a commit that referenced this pull request Oct 21, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
(cherry picked from commit 09896ab)
spencer-tb added a commit that referenced this pull request Oct 23, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
spencer-tb added a commit that referenced this pull request Oct 23, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
spencer-tb added a commit that referenced this pull request Oct 23, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
spencer-tb added a commit that referenced this pull request Oct 27, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
spencer-tb added a commit that referenced this pull request Oct 27, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
spencer-tb added a commit that referenced this pull request Oct 27, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
spencer-tb added a commit that referenced this pull request Oct 27, 2026
…r frame transactions (#3740)

* feat(specs): add the EIP-8272 recent root contract address

* feat(test-forks): pre-allocate the EIP-8272 recent root contract on Bogota

* feat(tests): add EIP-8272 recent root tests

* feat(tests): extend EIP-8272 recent root coverage

* fix(spec-specs,tests): apply review nits to the EIP-8272 recent root tests

---------

Co-authored-by: spencer <[email protected]>
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