Skip to content

Commit

Permalink
Panic on failed batch verification (#649)
Browse files Browse the repository at this point in the history
* panic-on-failed-batch-verification

* type

* stop the node from creating blocks
  • Loading branch information
kstoykov authored Jun 24, 2024
1 parent 4d596fd commit da39407
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zk/stages/stage_sequencer_executor_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package stages
import (
"context"
"math"
"time"

"bytes"
"errors"
Expand Down Expand Up @@ -228,7 +229,11 @@ func SpawnSequencerExecutorVerifyStage(
cfg.verifier.CancelAllRequestsUnsafe()
return nil
} else {
log.Info(fmt.Sprintf("[%s] identified an invalid batch but limbo is disabled so mark is as valid anyway and continue", s.LogPrefix()), "batch", response.BatchNumber)
// this infinite loop will make the node to print the error once every minute therefore preventing it for creating new blocks
for {
time.Sleep(time.Minute)
log.Error(fmt.Sprintf("[%s] identified an invalid batch with number %d", s.LogPrefix(), response.BatchNumber))
}
}
}

Expand Down

0 comments on commit da39407

Please sign in to comment.