mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
When splitStemValuesInsert inserts a new stem that shares a prefix with an existing stem, it increments the existing stem's depth and inserts a new internal node above it. The existing stem's on-disk path is derived from its depth via collectChildGroups + extendPathToGroupLeaf, so promoting its depth means it should be flushed at a new path. Previously, only the new stem (created in the divergence branch) was marked dirty. The promoted existing stem retained whatever dirty value it had — false if it was just deserialized from disk via a HashedNode resolve. collectNodes would then skip flushing the existing stem at its new path, while the new ancestor internal blob (also dirty) overwrites the existing stem's old blob at the prior path. The stem's data is left with no on-disk home, breaking subsequent reads with "missing trie node". The bug surfaces in the integration-test harness (state-actor builds a DB with single-stem-per-slot at depth 8, geth then mutates by adding a new stem that shares ≥8 prefix bits with the existing stem). After mutation, geth's `getValuesAtStem` resolves a HashedNode whose blob should be at the extended-depth path but isn't on disk. Mark `existing.dirty = true` when promoting the depth so collectNodes re-flushes the stem at its new path. Verification: the 100MB integration-test harness (which previously failed at block 9-10 with "missing trie node bdaf89... (path c96010)") now runs cleanly through 200+ blocks of ERC20 deploys and bloat transactions without any missing-trie-node errors. |
||
|---|---|---|
| .. | ||
| bintrie | ||
| transitiontrie | ||
| trienode | ||
| bytepool.go | ||
| committer.go | ||
| database_test.go | ||
| encoding.go | ||
| encoding_test.go | ||
| errors.go | ||
| hasher.go | ||
| inspect.go | ||
| inspect_test.go | ||
| iterator.go | ||
| iterator_test.go | ||
| levelstats.go | ||
| levelstats_test.go | ||
| list_hasher.go | ||
| node.go | ||
| node_enc.go | ||
| node_test.go | ||
| proof.go | ||
| proof_test.go | ||
| secure_trie.go | ||
| secure_trie_test.go | ||
| stacktrie.go | ||
| stacktrie_fuzzer_test.go | ||
| stacktrie_test.go | ||
| sync.go | ||
| sync_test.go | ||
| tracer.go | ||
| tracer_test.go | ||
| trie.go | ||
| trie_id.go | ||
| trie_reader.go | ||
| trie_test.go | ||