[pull] forks/amsterdam from ethereum:forks/amsterdam#72
Merged
pull[bot] merged 4 commits intoLuckQuack:forks/amsterdamfrom Feb 21, 2026
Merged
[pull] forks/amsterdam from ethereum:forks/amsterdam#72pull[bot] merged 4 commits intoLuckQuack:forks/amsterdamfrom
pull[bot] merged 4 commits intoLuckQuack:forks/amsterdamfrom
Conversation
…k checks (#2203) * feat(testing): Add check to verify no benchmark test exceeds limit refactor(testing/specs): Abstract and reuse logic refactor(testing/specs): Remove `tag` field fix(test-filler): Wrapper test classes overwriting `BaseTest.spec_types` refactor(tests): Kill unused `tag` from every test fix(test-execute): Fix execute fix: tox * fix: review comments * fix: upstream merge issue * Apply suggestion from @marioevz * fix: Bug and typing Co-authored-by: spencer-tb <spencer.tb@ethereum.org> --------- Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
#2207) Introduce a shared `PreState` protocol (`src/ethereum/state.py`) that defines the read-only interface any pre-execution state provider must support: `get_account_optional`, `get_storage`, `account_has_storage`, and `compute_state_root_and_trie_changes`. Move `Account`, `Address`, `Root`, and trie internal node types to the shared module so they can be referenced by the protocol without circular imports. Add `DictPreState` in amsterdam's `state.py` as an in-memory implementation backed by `Trie` dicts, along with helper functions `dict_pre_state_set_account` and `dict_pre_state_set_storage` for populating it. feat(amsterdam): replace mutable State with BlockStateTracker/TxStateTracker Replace the mutable `State` class (with in-memory tries, snapshots, and rollback) with lightweight state trackers that record diffs on top of a read-only `PreState`. Add `state_tracking.py` with `BlockStateTracker` (block-level accumulator) and `TxStateTracker` (per-transaction tracker). All state read/write operations now go through these trackers with the read chain: TxStateTracker -> BlockStateTracker -> PreState. Snapshot/rollback is replaced by copy-on-write via `copy_tx_state_tracker`/`restore_tx_state_tracker`. Transient storage moves from a separate `Trie`-based class to a simple dict on the tracker. At block end, `extract_block_diffs` produces the accumulated changes and `PreState.compute_state_root_and_trie_changes` computes the state root. `apply_diffs_to_state` advances `chain.state` for subsequent blocks. Simplify `State` to just hold tries (no snapshots/created_accounts). Remove all mutable state operations from `state.py` (moved to `state_tracking.py`). Update all consumer modules (fork.py, VM, interpreter, instructions, eoa_delegation, message utils). Co-authored-by: Peter Miller <ultratwo@gmail.com> feat(t8n): update tooling to support BlockStateTracker forks Update the t8n tool and fork loader to work with forks that use `BlockStateTracker` instead of the mutable `State`. In `fork_loader.py`, add `has_block_tracker` detection and conditionally return `DictPreState`, `dict_pre_state_set_account`, and `dict_pre_state_set_storage` for Amsterdam. In `t8n/__init__.py`, create a `BlockStateTracker` wrapping the `DictPreState` alloc when `has_block_tracker` is true, and pass `block_tracker=` instead of `state=` to `BlockEnvironment`. In `t8n_types.py`, compute the state root from block tracker diffs via `extract_block_diffs` + `compute_state_root_and_trie_changes`, then apply diffs back to the `DictPreState` for alloc output. refactor(amsterdam): consolidate DictPreState into State Make State implement the PreState protocol directly instead of maintaining a separate DictPreState wrapper class. This eliminates duplication since both had identical _main_trie and _storage_tries fields. Simplifies fork_loader.py by removing has_block_tracker conditionals from State/set_account/set_storage properties. replace BAL with state tracker fix(spec): clean-up code fix(specs): remove tracker suffix from names fix(specs): post-review updates fix(specs): fix docstring references fix(tool): fix EMPTY_ACCOUNT in fork loader add state_root to amsterdam fix(ci): remove optimized ci run The optimized run is no longer compatible with the state tracker and will have to be refactored/redesigned. The commit takes it out of the CI with the aim of adding it back once ready
* chore(ai): ask user to fill new tests after impl; check against JSON * feat(test): add more invalid BAL tests for duplicate entries within accounts * chore: add unit tests for BAL modifiers * chore: add modifier and test for duplicated code changes
* refactor(test-execute): Use batch rpc requests Add skip_code option, batch worker seed fundings save fix: Chain builder EthRPC fix: tox Add deterministic deploy contract to hive's pre Handle invalid transaction tests tox tox refactor(tests-benchmark): fewer post checks * Update packages/testing/src/execution_testing/rpc/rpc.py Co-authored-by: spencer <spencer.tb@ethereum.org> * fix: review comments * fix: tox * fix: remove unused code --------- Co-authored-by: spencer <spencer.tb@ethereum.org>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )