mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 09:51:36 +00:00
Wires the pieces from Commits 1-9 into a running system: * triedb/pathdb.New: install the bintrieFlatCodec when isVerkle is set, backed by the same verkle-namespaced db used for trie nodes. * triedb/pathdb.database.go: drop isVerkle from the noBuild guard so the bintrie generator (Commit 9) runs on startup, and remove it from the generateSnapshot call path for the same reason. * triedb/pathdb.disklayer.revert: hard-fail on bintrie because the reorg path would replay merkle-shaped origin records against a per-stem layout. Tracked in BINTRIE_FLAT_STATE_REORG_GAP.md. * triedb/pathdb.journal: add IsBintrie to journalGenerator (rlp:"optional" so v3 journals still decode) and make journalProgress a method on generator so it stamps the active scheme; loadGenerator discards any journal whose scheme does not match the database, forcing a fresh regeneration. * triedb/pathdb.reader: export RawStateReader, a small extension of database.StateReader that exposes AccountRLP so callers outside the package can reach the raw flat-state bytes without going through the slim-RLP decode path that assumes merkle shape. * core/state.reader: add bintrieFlatReader, the bintrie equivalent of flatReader. It derives the EIP-7864 stem keys from (addr, slot), performs two AccountRLP lookups per Account call (BasicData + CodeHash), and decodes via bintrie.UnpackBasicData. Storage reads go through a single AccountRLP lookup at the slot's full bintrie key. * core/state.database.StateReader: dispatch to bintrieFlatReader when the path database is in verkle mode; merkle path unchanged. Depends on the lookup sentinel fix in the previous commit; without it missing-account reads on bintrie misreport as "layer stale". |
||
|---|---|---|
| .. | ||
| pruner | ||
| snapshot | ||
| access_events.go | ||
| access_events_test.go | ||
| access_list.go | ||
| database.go | ||
| database_code.go | ||
| database_hasher.go | ||
| database_hasher_binary.go | ||
| database_hasher_binary_test.go | ||
| database_hasher_merkle.go | ||
| database_hasher_merkle_test.go | ||
| database_history.go | ||
| database_iterator.go | ||
| database_iterator_test.go | ||
| dump.go | ||
| iterator.go | ||
| iterator_test.go | ||
| journal.go | ||
| metrics.go | ||
| reader.go | ||
| reader_bintrie_test.go | ||
| reader_stater.go | ||
| state_mut.go | ||
| state_object.go | ||
| state_object_test.go | ||
| state_sizer.go | ||
| state_sizer_test.go | ||
| state_test.go | ||
| statedb.go | ||
| statedb_fuzz_test.go | ||
| statedb_hooked.go | ||
| statedb_hooked_test.go | ||
| statedb_stats.go | ||
| statedb_test.go | ||
| stateupdate.go | ||
| sync.go | ||
| sync_test.go | ||
| transient_storage.go | ||
| trie_prefetcher.go | ||
| trie_prefetcher_test.go | ||