Repository navigation
feat(spec-specs,test-forks,tests): implement EIP-8272 recent roots for frame transactions - #3740
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| big-endian expiry timestamp. | ||
| """ | ||
|
|
||
| RECENT_ROOT_VERIFIER: Final[Address] = Address( |
There was a problem hiding this comment.
Should we name this RECENT_ROOT_ADDRESS to match the EIP?
| RECENT_ROOT_VERIFIER: Final[Address] = Address( | |
| RECENT_ROOT_ADDRESS: Final[Address] = Address( |
| from ethereum.ethash import * | ||
| from ethereum.fork_criteria import Unscheduled | ||
| from ethereum.forks.bogota.transactions.frame_transaction import ( | ||
| RECENT_ROOT_VERIFIER, |
There was a problem hiding this comment.
| RECENT_ROOT_VERIFIER, | |
| RECENT_ROOT_ADDRESS, |
| # constructed while decoding transactions, never compared explicitly | ||
| FrameMode.DEFAULT | ||
| # Documents the EIP-8272 recent root contract; nothing in `src/` calls it. | ||
| RECENT_ROOT_VERIFIER |
There was a problem hiding this comment.
| RECENT_ROOT_VERIFIER | |
| RECENT_ROOT_ADDRESS |
| 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. |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
Could this come from Op.SSTORE(0, 1).state_cost(fork) like the 8141 tests?
|
Some extra tests, feel free to use: gurukamath#25 |
62444ab to
f6ddc59
Compare
8997dce
into
ethereum:eips/bogota/eip-8272
…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]>
…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]>
…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]>
…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]>
…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]>
…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]>
…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)
…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]>
…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]>
…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]>
…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]>
…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)
…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]>
…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]>
…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]>
…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]>
…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]>
…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]>
…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]>
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 aVERIFYframe 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
VERIFYframes,SLOTNUM, and the defaultVERIFYcode failing a zero-flag frame against an empty target.RECENT_ROOT_VERIFIERaddress constant besideEXPIRY_VERIFIER.EIP8272mixin pre-allocating the canonical runtime at the deployment address for state and blockchain tests, mirroring the expiry verifier.tests/bogota/eip8272_recent_roots/, 185 fixtures at--fork Bogota:DELEGATECALL/CALLCODE/EIP-7702 writes landing in the caller's storage, value, wrong lengths, the static-context halt;generate_system_contract_deploy_testwith 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;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
just static<type>(<area>): <title>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute Animal Picture