Files
zeekayandHanzo Dev 38c6981ff6 triedb/hashdb: honor ReferenceRootAtomicallyOnUpdate (latent-correctness alignment + GC regression tests)
luxfi/evm's block-accept pruner (cappedMemoryTrieWriter: tipBuffer + RejectTrie
+ reprocess previousRoot deref) and upstream coreth commit 7dc5b7473 assume the
state root is referenced on Update (parents>=1). luxfi/geth's slimmed hashdb.Config
dropped the ReferenceRootAtomicallyOnUpdate flag, so hashdb.Update referenced only
storage roots and every state root had parents==0. This restores the flag and
pins the state root atomically inside Update, matching the upstream contract.

Adds triedb/reference_root_test.go documenting the coreth GC lifecycle. NOTE:
these tests demonstrate the reference-counting is single-deref-SAFE with AND
without the flag (the accepted head's subtree is protected by its own Update
references under sibling reject + ancestor eviction). i.e. this change is a
latent-correctness alignment, not by itself the fix for the devnet block-2 halt.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-01 05:46:36 -07:00
..