Repository navigation
Conversation
From Amsterdam, build the block access list alongside block execution and
validate it against the header:
- bal.{hpp,cpp}: the BAL builder — per-address account changes (balance,
nonce, code) and per-slot storage writes recorded per transaction index,
storage reads deduplicated across the block, entries ordered
lexicographically; the keccak256 hash of the RLP-encoded list and the
item-count-vs-block-gas-limit bound. The withdrawals and the block-end
system calls share the last index, so their balance changes net out.
- State-access observation: a StateView decorator records every account and
storage read. Warming (EIP-2929) is not a read, so it loads neither the
account nor the slot (State::get_for_access() and the loaded flags); they
are loaded by the access that follows the gas check. SLOAD warming
journals only the access-status change (JournalStorageAccess), EXTCODECOPY
of 0 bytes still reads the code, and the delegate address is read once its
access cost is committed.
- Block accounting: the withdrawals are applied before the block-end system
calls, absent pre-execution system contracts are recorded, and the
blockchain-test runner checks the BAL hash and the item bound against the
header.
Stop ignoring the tests@v21.0.0 Amsterdam blockchain tests, which need EIP-7928 to pass.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1752 +/- ##
==========================================
+ Coverage 98.06% 98.12% +0.05%
==========================================
Files 183 185 +2
Lines 16940 17076 +136
Branches 3873 3908 +35
==========================================
+ Hits 16613 16755 +142
+ Misses 245 239 -6
Partials 82 82
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes consensus-critical state observation, journaling, execution ordering, and header validation across the block transition pipeline.
Review effort: Balanced
Findings: None
What changed in this PR
Implements EIP-7928 block-level access-list construction, hashing, validation, and Amsterdam test coverage.
Changes:
- Tracks account/storage reads and per-index state changes.
- Validates BAL hashes and gas-limit bounds.
- Enables Amsterdam execution-spec tests.
| File | Description |
|---|---|
test/state/bal.hpp |
Defines BAL structures, builder, and observing state view. |
test/state/bal.cpp |
Builds, sorts, encodes, hashes, and bounds BALs. |
test/state/account.hpp |
Tracks whether accounts and slots are loaded. |
test/state/state.hpp |
Adds warm-only access and journaling support. |
test/state/state.cpp |
Separates warming from reads and updates rollback behavior. |
test/state/host.cpp |
Uses warm-only account and storage access paths. |
test/state/system_contracts.cpp |
Records system-contract account reads. |
test/state/errors.hpp |
Adds BAL and block-hash validation errors. |
test/state/CMakeLists.txt |
Builds the BAL implementation. |
test/utils/block_transition.hpp |
Exposes the generated BAL in transition results. |
test/utils/block_transition.cpp |
Builds the BAL throughout block execution. |
test/utils/blockchaintest.hpp |
Models the BAL header commitment. |
test/utils/blockchaintest_loader.cpp |
Loads blockAccessListHash. |
test/utils/blockchaintest_runner.cpp |
Validates BAL presence, hash, and size. |
lib/evmone/instructions.hpp |
Observes zero-length EXTCODECOPY reads. |
lib/evmone/instructions_calls.cpp |
Observes delegate reads after access charging. |
test/integration/evmone-cli/test/blockchaintest/eip7778_block_gas.json |
Adds the Amsterdam BAL hash fixture. |
circle.yml |
Enables Amsterdam execution-spec blockchain tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From Amsterdam, build the block access list alongside block execution
and validate it against the header:
nonce, code) and per-slot storage writes recorded per transaction
index, storage reads deduplicated across the block, entries ordered
lexicographically; the keccak256 hash of the RLP-encoded list and the
item-count-vs-block-gas-limit bound. The withdrawals and the block-end
system calls share the last index, so their balance changes net out.
and storage read. Warming (EIP-2929) is not a read, so it loads
neither the account nor the slot (State::get_for_access() and the
loaded flags); they are loaded by the access that follows the gas
check. SLOAD warming journals only the access-status change
(JournalStorageAccess), EXTCODECOPY of 0 bytes still reads the code,
and the delegate address is read once its access cost is committed.
system calls, absent pre-execution system contracts are recorded, and
the blockchain-test runner checks the BAL hash and the item bound
against the header.
The second commit runs the Amsterdam blockchain tests of tests@v21.0.0
in CI, which need EIP-7928 to pass.