feat(specs,test-types): add binary tree state provider behind a --state-trie flag - #41
Closed
spencer-tb wants to merge 4 commits into
Closed
feat(specs,test-types): add binary tree state provider behind a --state-trie flag#41spencer-tb wants to merge 4 commits into
spencer-tb wants to merge 4 commits into
Conversation
2 tasks
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.
Description
Upstreams the commitment-neutral infrastructure of
projects/binary-trie— and deliberately nothing the EIP process governs.The pain of long-lived project branches is rebasing shared framework and tooling churn and running a separate release pipeline — not carrying the spec content, which is small and stable. This PR moves exactly that shared tier, and keeps the line the EIP process draws:
src/ethereum/forks/. No fork copy, no pseudo-fork, no EIP-8297 semantics in any fork. The spec's fork lineage (and its rendered docs) remains exactly the set of scheduled forks; abinary_treefork materializes if and when the EIP process schedules 8297, so repo structure keeps tracking governance rather than front-running it.partitioned_binary_tree.py↔merkle_patricia_trie.py,state_pbt.py↔state_mpt.py— selected per session by a testing flag. A tooling property, not a protocol claim: every fork defaults to MPT.What stays on
projects/binary-triebecause the EIP process owns it: the fork copy and its parity test, thetests/binary_tree/EIP-8297 fixture suite,test_spec_constants.py, and the cross-client conformance-vectors tooling.Contents by commit
feat(specs,test-types):ethereum/partitioned_binary_tree.py(structure + embedding, one module) andethereum/state_pbt.py(PreStateprovider mirroringstate_mpt.py); error contracts documented on thePreStateprotocol (get_coderaisesUnknownCodeHashErroron malformed pre-state —state_mptupdated to match;compute_state_rootraisesInvalidBlockfor state the commitment cannot encode, which the t8n reports as a rejected block with the pre-state root);StateCommitment.PBT+Allocrouting;blake3dep;tests/binary_trie/unit suites (fill-ignored) incl. a differential-vs-MPT suite and a test driving Amsterdam's unmodifiedexecute_blockagainst a binary-tree state (call sites type-ignored until thepre_stateannotation is loosened;projects/zkevmcarries that loosening). 100% line and branch coverage of both new modules.feat(test-forks)(carried from feat(test-forks): add--state-triestate-commitment override flag marioevz/execution-specs#9):--state-trie {mpt,pbt}session override ofFork.state_commitment();pytest_unconfigurerestores the default so in-process pytester sessions cannot leak it; fork-agnostic tests for defaults, override incl. transition forks, option wiring, and genesis/pre-alloc-group behavior under the override.feat(ci):binary-triejob — unit suites with coverage plus a full-tree PBT-mode fill (just fill-state-trie-pbt); the fill lane doubles as the enumeration of EIP-8297-incompatible tests (balances ≥ 2^128) until those are curated.feat(ci): release variants —tests@and<feat>-devnet@releases attach<tarball>_binary.tar.gz, filled Amsterdam-only in PBT mode on its own runner through the standard build/combine pipeline (variants:infeature.yaml); a failed variant fill never blocks the release. A follow-up PR adds a zkevm variant on the same mechanism.Verified: default fills byte-identical to base (modulo the
_info.urlcommit pin);fill --fork Amsterdam --state-trie pbtproduces binary state roots end to end;just staticclean.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