diff --git a/core/overlay/conversion.go b/core/overlay/conversion.go index d98c081eec7..9202bbe5d75 100644 --- a/core/overlay/conversion.go +++ b/core/overlay/conversion.go @@ -219,6 +219,11 @@ func OverlayVerkleTransition(statedb *state.StateDB, root common.Hash, maxMovedC migrdb.LockCurrentTransitionState() defer migrdb.UnLockCurrentTransitionState() + // TODO(jsign): for fixture execution this isn't needed since it's configured (hardcoded) + // in the forks.go file. But it's required for filling! Fix this eventually when the testing + // framework passes flag. + maxMovedCount = 7 + // verkle transition: if the conversion process is in progress, move // N values from the MPT into the verkle tree. if migrdb.InTransition() { @@ -373,6 +378,7 @@ func OverlayVerkleTransition(statedb *state.StateDB, root common.Hash, maxMovedC if !bytes.Equal(acc.CodeHash, types.EmptyCodeHash[:]) { code := rawdb.ReadCode(statedb.Database().DiskDB(), common.BytesToHash(acc.CodeHash)) chunks := trie.ChunkifyCode(code) + count += uint64(len(chunks)) / 32 mkv.addAccountCode(migrdb.GetCurrentAccountAddress().Bytes(), uint64(len(code)), chunks) } diff --git a/core/state/database.go b/core/state/database.go index 72fb15888ff..818e4b634f5 100644 --- a/core/state/database.go +++ b/core/state/database.go @@ -245,7 +245,7 @@ func (db *cachingDB) StartVerkleTransition(originalRoot, translatedRoot common.H db.CurrentTransitionState = &TransitionState{ Started: true, // initialize so that the first storage-less accounts are processed - StorageProcessed: true, + StorageProcessed: false, } // db.AddTranslation(originalRoot, translatedRoot) db.baseRoot = originalRoot diff --git a/tests/init.go b/tests/init.go index c65c4cff147..1060331fe1a 100644 --- a/tests/init.go +++ b/tests/init.go @@ -355,6 +355,7 @@ var Forks = map[string]*params.ChainConfig{ TerminalTotalDifficulty: big.NewInt(0), ShanghaiTime: u64(0), VerkleTime: u64(32), + OverlayStride: 7, }, }