Skip to content

Commit

Permalink
handing-unwinds-on-seq-restart-2 (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
kstoykov authored and hexoscott committed Aug 29, 2024
1 parent 83e1608 commit 9ffc466
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions zk/stages/stage_sequence_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ func SpawnSequencingStage(

log.Info(fmt.Sprintf("[%s] Starting batch %d...", logPrefix, batchState.batchNumber))

var allConditionsOK bool
for blockNumber := executionAt + 1; runLoopBlocks; blockNumber++ {
log.Info(fmt.Sprintf("[%s] Starting block %d (forkid %v)...", logPrefix, blockNumber, batchState.forkId))
logTicker.Reset(10 * time.Second)
Expand Down Expand Up @@ -227,6 +226,7 @@ func SpawnSequencingStage(
return err
}
} else if !batchState.isL1Recovery() {
var allConditionsOK bool
batchState.blockState.transactionsForInclusion, allConditionsOK, err = getNextPoolTransactions(ctx, cfg, executionAt, batchState.forkId, batchState.yieldedTransactions)
if err != nil {
return err
Expand All @@ -238,7 +238,6 @@ func SpawnSequencingStage(
} else {
time.Sleep(batchContext.cfg.zk.SequencerTimeoutOnEmptyTxPool / 5) // we do not need to sleep too long for txpool not ready
}

} else {
log.Trace(fmt.Sprintf("[%s] Yielded transactions from the pool", logPrefix), "txCount", len(batchState.blockState.transactionsForInclusion))
}
Expand Down
2 changes: 1 addition & 1 deletion zk/stages/stage_sequence_execute_data_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func alignExecutionToDatastream(batchContext *BatchContext, batchState *BatchSta

block, err := rawdb.ReadBlockByNumber(batchContext.sdb.tx, lastDatastreamBlock)
if err != nil {
return true, err
return false, err
}

log.Warn(fmt.Sprintf("[%s] Unwinding due to a datastream gap", batchContext.s.LogPrefix()), "streamHeight", lastDatastreamBlock, "sequencerHeight", lastExecutedBlock)
Expand Down

0 comments on commit 9ffc466

Please sign in to comment.