ethereum / ethereum/state-actor
Add binary-trie (EIP-7864) end-to-end test plus CI job for geth
- Dominant language
- Go
- Stars
- 12
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
## Context
`client/geth` is the only client that supports `--binary-trie` / `TrieModeBinary` (others reject at parse via `internal/clientpolicy/policy.go`). The binary-trie codepath has good unit-test coverage (`generator/grouped_emission_test.go`, `generator/binary_stack_trie.go`, `internal/entitygen/canonical.go` golden constants), but **no end-to-end test** drives the geth-fork binary against a binary-trie DB and verifies it boots + serves RPC.
This is structurally separate from the MPT cross-client invariant — binary-trie state root is fundamentally different from the MPT root, so a bintrie CI job must NOT participate in the existing cross-client genesis-root aggregator.
## Proposed design (geth-only)
1. **New test `TestE2ESuiteWithBinaryTrie`** in `client/geth/e2e_test.go`. Mirrors the existing `TestE2ESuite` but sets `TrieMode: generator.TrieModeBinary` + `BinaryTrie: true` when calling `WriteGenesisBlockFull`. Pins against a new `CanonicalOsakaBinaryTrieRoot` constant.
2. **New workflow job `geth-bintrie-suite`** in `.github/workflows/ci.yml`, parallel to (not in matrix with) the existing `geth-suite`. Uploads `geth-bintrie-result.json` — **explicitly excluded** from the cross-client MPT genesis-root aggregator.
3. First CI run will fail with `got X; want `; copy the printed hash into the constant in a follow-up commit.
## Files to add/modify
- `.github/workflows/ci.yml` — new `geth-bintrie-suite` job (template per existing `cgo-suite` composite action structure, but geth-only and no Docker — geth runs in-process via `oracle` build tag).
- `client/geth/e2e_test.go` — new `TestE2ESuiteWithBinaryTrie` (~80 LoC).
- `client/geth/golden_test.go` — new `TestGethGoldenStateRootBinaryTrie`.
- `internal/entitygen/canonical.go` — new `CanonicalOsakaBinaryTrieRoot` constant.
- Optional `Makefile` — new `test-geth-bintrie-suite` target.
## Verified prereqs
`client/geth/writer.go:179, 224, 232` already accept `binaryTrie bool`. The geth-fork submodule supports the path. No upstream work needed.
## Out of scope
- Binary-trie support for besu/nethermind/reth. They reject `--binary-trie` at parse today; landing it would be substantial per-client work.
Contributor guide
Assessment
This issue has not been assessed yet.