mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
Replace the gob-encoded `rawdb.{Read,Write}VerkleTransitionState`
plumbing with a direct read from the binary transition registry system
contract at `params.BinaryTransitionRegistryAddress`. The registry
exposes the transition state via fixed storage slots; a tiny
`StorageReader` interface (`Storage(addr, slot) (Hash, error)`)
captures what the loader needs.
`LoadTransitionState` now takes a `StorageReader` instead of an
`ethdb.KeyValueReader` and returns `nil` when the registry has not been
initialised (slot 0 unset). `IsTransitionActive` is exposed for callers
that only need the started flag.
`core/state/reader.go:newUBTTrieReader` is updated:
- It now takes the binary triedb, an optional MPT triedb, and a
`wrapInTransitionTrie` flag so callers can opt out of the wrap.
- It uses a small `binTrieStorageReader` adapter to query the
registry directly from the binary trie at the requested root,
avoiding the MPT key-hashing in `flatReader`.
- When wrap=true and the registry's BaseRoot is non-zero, the MPT
base is opened against the supplied MPT triedb. With the current
callers (mptdb=nil) the wrap degenerates to a passthrough,
preserving existing master semantics until the dual-triedb routing
lands in the next commit.
The dead `rawdb` accessors and `VerkleTransitionStatePrefix` schema
constant are removed.
|
||
|---|---|---|
| .. | ||
| ancienttest | ||
| eradb | ||
| testdata | ||
| accessors_chain.go | ||
| accessors_chain_test.go | ||
| accessors_history.go | ||
| accessors_indexes.go | ||
| accessors_indexes_test.go | ||
| accessors_metadata.go | ||
| accessors_snapshot.go | ||
| accessors_state.go | ||
| accessors_sync.go | ||
| accessors_trie.go | ||
| ancient_scheme.go | ||
| ancient_utils.go | ||
| chain_freezer.go | ||
| chain_iterator.go | ||
| chain_iterator_test.go | ||
| database.go | ||
| freezer.go | ||
| freezer_batch.go | ||
| freezer_memory.go | ||
| freezer_memory_test.go | ||
| freezer_meta.go | ||
| freezer_meta_test.go | ||
| freezer_resettable.go | ||
| freezer_resettable_test.go | ||
| freezer_table.go | ||
| freezer_table_test.go | ||
| freezer_test.go | ||
| freezer_utils.go | ||
| freezer_utils_test.go | ||
| freezer_utils_unix.go | ||
| freezer_utils_windows.go | ||
| key_length_iterator.go | ||
| key_length_iterator_test.go | ||
| schema.go | ||
| table.go | ||
| table_test.go | ||