go-ethereum/trie/nomttrie
weiihann d61dd875d8 nomt: add triecompare package and fix sort.SliceStable bug in stem grouping
Add trie/triecompare/ package with realistic state generation and cross-
validation tests proving NOMT produces identical roots as bintrie at scale
(10K+ accounts, PowerLaw/Uniform/Exponential distributions, multi-block).

Fix a subtle bug in groupAndHashStems: sort.Slice was used instead of
sort.SliceStable, causing non-deterministic results when the same account
is mutated twice in a single block (duplicate stem+suffix entries need
last-writer-wins ordering preserved).

Tests: 5 correctness tests + 4 benchmarks + storage footprint comparison.
All pass with race detector clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 00:07:04 +08:00
..
compat_test.go nomt: Phase F — cross-validation tests proving NOMT root == bintrie root 2026-02-12 23:42:04 +08:00
key_encoding.go trie/nomttrie: add EIP-7864 key derivation and value encoding (Phase B) 2026-02-12 22:30:14 +08:00
key_encoding_test.go trie/nomttrie: add EIP-7864 key derivation and value encoding (Phase B) 2026-02-12 22:30:14 +08:00
stem.go nomt: add triecompare package and fix sort.SliceStable bug in stem grouping 2026-02-13 00:07:04 +08:00
stem_test.go nomt: Phase C — stem hash computation and flat state helpers 2026-02-12 22:35:23 +08:00
trie.go nomt: Phase F — cross-validation tests proving NOMT root == bintrie root 2026-02-12 23:42:04 +08:00
trie_test.go nomt: Phase F — cross-validation tests proving NOMT root == bintrie root 2026-02-12 23:42:04 +08:00
value_encoding.go trie/nomttrie: add EIP-7864 key derivation and value encoding (Phase B) 2026-02-12 22:30:14 +08:00
value_encoding_test.go trie/nomttrie: add EIP-7864 key derivation and value encoding (Phase B) 2026-02-12 22:30:14 +08:00