diff --git a/op-proposer/proposer/driver.go b/op-proposer/proposer/driver.go index 1bf1a2a..7422d59 100644 --- a/op-proposer/proposer/driver.go +++ b/op-proposer/proposer/driver.go @@ -27,6 +27,12 @@ var ( ErrProposerNotRunning = errors.New("proposer is not running") ) +func init() { + if aggregateBatchSize <= 1 { + panic("aggregateBatchSize must be greater than 1") + } +} + type OOContract interface { Version(*bind.CallOpts) (string, error) LatestL2Output(opts *bind.CallOpts) (bindings.TypesOutputProposal, error) @@ -319,6 +325,12 @@ func (l *L2OutputSubmitter) nextOutput(ctx context.Context, latestOutput binding } proposal := l.pending[0] + if proposal.To.Number < latestSafe.Number { + l.Log.Info("Aggregated output is not the latest safe block, waiting for more proofs", + "aggregated", l2BlockRefToBlockID(proposal.To), "latestSafe", latestSafe) + return nil, false, nil + } + if proposal.To.Hash != latestSafe.Hash { l.Log.Warn("Aggregated output does not match the latest batched block, possible reorg", "aggregated", l2BlockRefToBlockID(proposal.To), "latestSafe", latestSafe)