go-ethereum/trie/triecompare
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
..
compare_test.go nomt: add triecompare package and fix sort.SliceStable bug in stem grouping 2026-02-13 00:07:04 +08:00
stategen.go nomt: add triecompare package and fix sort.SliceStable bug in stem grouping 2026-02-13 00:07:04 +08:00