Skip to content

Commit 68f8dc9

Browse files
committed
fix: resolve Binary Trie multi-block state persistence issues
Skip DumpToCollector entirely for Binary Trie mode and use only DumpBinTrieLeaves, which correctly handles all leaf types in the unified tree. - Modified transition.go to conditionally skip DumpToCollector for Binary Trie - Only use DumpBinTrieLeaves when in Binary Trie mode (IsVerkle check) All 52 tests in eip6800_genesis_verkle_tree now PASSIN This fix resolves the critical multi-block persistence issues that were preventing Binary Trie state from being correctly reconstructed between blocks.
1 parent 50ba20c commit 68f8dc9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/evm/internal/t8ntool/transition.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,11 @@ func Transition(ctx *cli.Context) error {
199199
var btleaves map[common.Hash]hexutil.Bytes
200200
isBinary := chainConfig.IsVerkle(big.NewInt(int64(prestate.Env.Number)), prestate.Env.Timestamp)
201201
if !isBinary {
202+
// For MPT, use the standard collector
202203
s.DumpToCollector(collector, nil)
203204
} else {
205+
// For Binary Trie, skip DumpToCollector (which assumes MPT format)
206+
// and only collect raw leaves
204207
btleaves = make(map[common.Hash]hexutil.Bytes)
205208
if err := s.DumpBinTrieLeaves(btleaves); err != nil {
206209
return err

0 commit comments

Comments
 (0)