mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
triedb/pathdb: bump journal version to 4
Reserve journal version 4 for the upcoming bintrie flat-state layout (per-stem blobs). Bumping now — with no on-disk format change yet — ensures that any v3 journals belonging to a bintrie database are discarded on load, so the new layout can be introduced cleanly in follow-up commits without a migration shim. MPT behavior is unchanged at this point: the only codec wired to the pathdb Database is still merkleFlatCodec. All pathdb, core/state, core/rawdb, and trie tests pass.
This commit is contained in:
parent
f1d7143afa
commit
0fb4d9226b
1 changed files with 5 additions and 1 deletions
|
|
@ -50,7 +50,11 @@ var (
|
||||||
// - Version 1: storage.Incomplete field is removed
|
// - Version 1: storage.Incomplete field is removed
|
||||||
// - Version 2: add post-modification state values
|
// - Version 2: add post-modification state values
|
||||||
// - Version 3: a flag has been added to indicate whether the storage slot key is the raw key or a hash
|
// - Version 3: a flag has been added to indicate whether the storage slot key is the raw key or a hash
|
||||||
const journalVersion uint64 = 3
|
// - Version 4: reserved for bintrie flat-state (per-stem layout). Bumping now
|
||||||
|
// discards any v3 journals belonging to a bintrie database so
|
||||||
|
// that the new layout can be introduced cleanly in follow-up
|
||||||
|
// commits without a migration path.
|
||||||
|
const journalVersion uint64 = 4
|
||||||
|
|
||||||
// loadJournal tries to parse the layer journal from the disk.
|
// loadJournal tries to parse the layer journal from the disk.
|
||||||
func (db *Database) loadJournal(diskRoot common.Hash) (layer, error) {
|
func (db *Database) loadJournal(diskRoot common.Hash) (layer, error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue