go-ethereum/core/rawdb
Guillaume Ballet 40c29ad53a
core/overlay: load transition state from system contract
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.
2026-04-29 16:21:59 +02:00
..
ancienttest core/rawdb, triedb/pathdb: enable trienode history alongside existing data (#33934) 2026-03-12 09:21:54 +08:00
eradb internal/era: New EraE implementation (#32157) 2026-02-09 08:30:19 -07:00
testdata core/rawdb: avoid unnecessary receipt processing for log filtering (#23147) 2021-09-28 12:54:49 +02:00
accessors_chain.go core/rawdb: clarify ReadLastPivotNumber comment (#34773) 2026-04-21 09:19:03 +08:00
accessors_chain_test.go core/rawdb: BAL storage layer (#34064) 2026-03-31 15:05:31 +08:00
accessors_history.go core/rawdb, triedb/pathdb: introduce trienode history (#32596) 2025-10-10 14:51:27 +08:00
accessors_indexes.go cmd/evm/internal/t8ntool, core/rawdb: fix RLP iterator error handling (#33820) 2026-02-11 14:50:39 +01:00
accessors_indexes_test.go ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021) 2025-07-01 15:18:49 +08:00
accessors_metadata.go core/rawdb: remove outdated functions (#32542) 2025-09-04 17:25:33 +08:00
accessors_snapshot.go all: fix various typos (#29542) 2024-04-16 15:44:00 +03:00
accessors_state.go core/rawdb, triedb/pathdb: re-structure the trienode history header (#32907) 2025-10-25 16:16:16 +08:00
accessors_sync.go core, accounts, eth, trie: handle genesis state missing (#28171) 2023-09-28 10:00:53 +03:00
accessors_trie.go core/rawdb: fix misleading comment in HasTrieNode (#32599) 2025-09-15 10:45:50 +08:00
ancient_scheme.go core/rawdb, triedb/pathdb: introduce trienode history (#32596) 2025-10-10 14:51:27 +08:00
ancient_utils.go core/rawdb: close freezer table in InspectFreezerTable (#33776) 2026-02-06 22:13:37 +08:00
chain_freezer.go triedb, core/rawdb: implement the partial read in freezer (#32132) 2025-10-13 19:40:03 +08:00
chain_iterator.go core/rawdb: fix incorrect tail value in unindexTransactions log output (#33796) 2026-02-09 15:49:53 +08:00
chain_iterator_test.go core/rawdb: skip missing block bodies during tx unindexing (#33573) 2026-01-12 14:25:22 +08:00
database.go core/overlay: load transition state from system contract 2026-04-29 16:21:59 +02:00
freezer.go core/rawdb, triedb/pathdb: enable trienode history alongside existing data (#33934) 2026-03-12 09:21:54 +08:00
freezer_batch.go core/rawdb: capture open file error and fix resource leak (#33147) 2025-11-11 16:01:37 +08:00
freezer_memory.go core/rawdb, triedb/pathdb: enable trienode history alongside existing data (#33934) 2026-03-12 09:21:54 +08:00
freezer_memory_test.go core/rawdb: allow for truncation in the freezer (#31362) 2025-03-17 16:01:37 +01:00
freezer_meta.go core/rawdb: introduce flush offset in freezer (#30392) 2025-02-04 11:45:45 +01:00
freezer_meta_test.go core/rawdb: introduce flush offset in freezer (#30392) 2025-02-04 11:45:45 +01:00
freezer_resettable.go core/rawdb: close directory fd on Readdirnames error in cleanup (#33798) 2026-02-10 10:10:56 +08:00
freezer_resettable_test.go core/rawdb: implement in-memory freezer (#29135) 2024-04-30 11:33:22 +02:00
freezer_table.go core/rawdb: fix file descriptor leak in freezer error paths (#34735) 2026-04-20 11:06:17 +08:00
freezer_table_test.go core/rawdb, triedb/pathdb: enable trienode history alongside existing data (#33934) 2026-03-12 09:21:54 +08:00
freezer_test.go core/rawdb: report truncateErr in concurrent truncate failure (#32651) 2025-09-18 14:46:51 +08:00
freezer_utils.go core/rawdb: fix file descriptor leak in freezer error paths (#34735) 2026-04-20 11:06:17 +08:00
freezer_utils_test.go all: more linters (#24783) 2022-06-13 16:24:45 +02:00
freezer_utils_unix.go core/rawdb: fix freezer dir.Sync() failure on Windows (#34115) 2026-03-30 15:34:23 +08:00
freezer_utils_windows.go core/rawdb: fix freezer dir.Sync() failure on Windows (#34115) 2026-03-30 15:34:23 +08:00
key_length_iterator.go core/rawdb: add specified key length iterator (#24535) 2022-03-15 10:28:26 +02:00
key_length_iterator_test.go core/rawdb: add specified key length iterator (#24535) 2022-03-15 10:28:26 +02:00
schema.go core/overlay: load transition state from system contract 2026-04-29 16:21:59 +02:00
table.go core, ethdb, triedb: add batch close (#33708) 2026-03-04 11:17:47 +01:00
table_test.go ethdb: Implement DeleteRange in batch (#31947) 2025-06-20 19:40:41 +08:00