Skip to content

binary(tests,spec-specs): add binary trees to forks/amsterdam using a --state-trie flag - #42

Draft
spencer-tb wants to merge 4 commits into
forks/amsterdamfrom
binary-state-trie
Draft

binary(tests,spec-specs): add binary trees to forks/amsterdam using a --state-trie flag#42
spencer-tb wants to merge 4 commits into
forks/amsterdamfrom
binary-state-trie

Conversation

@spencer-tb

@spencer-tb spencer-tb commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Description

Summary

Merges the binary trie infrastructure of projects/binary-trie, and deliberately nothing the EIP process governs. The pain of a long lived project branch is rebasing churn and running a separate release pipeline, the latter creates confusion and burden for client teams tracking extra branches. Releases should be in one place with one work stream.

Releases

The future release story here is to include the binary fixtures under the same release tag (branch/spec) as the mainnet/testnet releases & future devnet releases for H*. Following the strawmap, binary is proposed for I*/J*, streamlining this process earlier within our releases allows development to be more clean. Each release would now have:

  • fixtures_hegota-devnet.tar.gz & fixtures_hegota-devnet_binary.tar.gz
  • fixtures.tar.gz & fixtures_binary.tar.gz

Key Notes

  • Zero changes under 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. A binary_tree fork materializes if and when the EIP process schedules 8297.
  • The tree is shared infrastructure beside the MPT, partitioned_binary_tree.py vs merkle_patricia_trie.py and state_pbt.py vs state_mpt.py. These are selected per session by a testing flag. A tooling property, not a protocol property.

The only item that should be remaining on projects/binary-trie are the non STF vectors, which are removed from this PR.

Other Additions vs projects/binary-trie

  • CI: binary-trie job, unit tests with coverage plus a full-tree PBT fill just fill-state-trie-pbt, mirroring the default fill recipe in the Justfile.
  • Release variants feature: fixtures_binary.tar.gz on every tests@/<feat>-devnet@ tag (variants: in feature.yaml. The same feature will be added for zkevm.
  • 3 new unit tests:
    • test_state_trie_option_sets_and_resets_the_override: --state-trie sets the session override and unconfigure resets it
    • test_build_result_reports_uncommittable_state_as_rejected: the t8n reports uncommittable state as a rejected block with the pre state root
    • test_get_code_contract_is_identical_across_providers: MPT and PBT providers share the same get_code error contract
  • --state-trie {mpt,pbt} session flag replaces the BinaryTree pseudo-fork, the fork class is gone and all commitment tests are fork-agnostic against the flag
  • ethereum/binary_trie/ package collapsed into a single ethereum/partitioned_binary_tree.py, mirroring merkle_patricia_trie.py, with the module docstring rewritten, prose cleanup throughout
  • Vector tooling removed per its own TODO

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

Put a link to a cute animal picture inside the parenthesis-->

@spencer-tb spencer-tb changed the title feat(specs,test-types): add binary tree state provider behind a --state-trie flag binary(tests,spec-specs): add binary trees to forks/amsterdam using a --state-trie flag Aug 7, 2026
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.

1 participant