Skip to content

Commit

Permalink
log a warning if intermediate counters can't be found and continue (#950
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hexoscott authored Aug 12, 2024
1 parent 94e3cc1 commit 9cbb5fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zk/stages/stage_sequence_execute_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ func prepareBatchCounters(batchContext *BatchContext, batchState *BatchState, is
if err != nil {
return nil, err
}
if !found {
return nil, fmt.Errorf("intermediate counters not found for batch %d", batchState.batchNumber)
if found {
intermediateUsedCounters = vm.NewCountersFromUsedMap(intermediateCountersMap)
} else {
log.Warn("intermediate counters not found for batch, initialising with empty counters", "batch", batchState.batchNumber)
}

intermediateUsedCounters = vm.NewCountersFromUsedMap(intermediateCountersMap)
}

return vm.NewBatchCounterCollector(batchContext.sdb.smt.GetDepth(), uint16(batchState.forkId), batchContext.cfg.zk.VirtualCountersSmtReduction, batchContext.cfg.zk.ShouldCountersBeUnlimited(batchState.isL1Recovery()), intermediateUsedCounters), nil
Expand Down

0 comments on commit 9cbb5fc

Please sign in to comment.