Skip to content

Commit 0f62c7a

Browse files
committed
offline prune only in hash schema
1 parent 6d9401f commit 0f62c7a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: cmd/geth/snapshot.go

+3
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ func pruneZKState(ctx *cli.Context) error {
223223
defer stack.Close()
224224

225225
chaindb := utils.MakeChainDatabase(ctx, stack, false)
226+
if rawdb.ReadStateScheme(chaindb) != rawdb.HashScheme {
227+
log.Crit("Offline pruning is not required for path scheme")
228+
}
226229
zkPruner, err := pruner.NewZKPruner(chaindb, ctx.GlobalUint64(utils.BloomFilterSizeFlag.Name), stack.ResolvePath(""), stack.ResolvePath(config.Eth.TrieCleanCacheJournal))
227230
if err != nil {
228231
return err

Diff for: rollup/tracing/tracing.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func NewTracerWrapper() *TracerWrapper {
4949
// CreateTraceEnvAndGetBlockTrace wraps the whole block tracing logic for a block
5050
func (tw *TracerWrapper) CreateTraceEnvAndGetBlockTrace(chainConfig *params.ChainConfig, chainContext core.ChainContext, engine consensus.Engine, chaindb ethdb.Database, statedb *state.StateDB, parent *types.Block, block *types.Block, commitAfterApply bool) (*types.BlockTrace, error) {
5151
if statedb.IsPathZkTrie() {
52-
return nil, fmt.Errorf("@Todo, unimplemention, block=%d", block.NumberU64())
52+
return nil, fmt.Errorf("path trie not implemention, block=%d", block.NumberU64())
5353
}
5454
traceEnv, err := CreateTraceEnv(chainConfig, chainContext, engine, chaindb, statedb, parent, block, commitAfterApply)
5555
if err != nil {

0 commit comments

Comments
 (0)