diff --git a/block/manager.go b/block/manager.go index cc17905df..1af7417cd 100644 --- a/block/manager.go +++ b/block/manager.go @@ -177,7 +177,7 @@ func (m *Manager) Start(ctx context.Context) error { } /* ----------------------------- sequencer mode ----------------------------- */ - // Subscribe to batch events, to update last submitted height in case batch confirmation was lost. This could happen if the sequencer crash/restarted just after submitting a batch to the settelement and by the time we query the last batch, this batch wasn't accepted yet. + // Subscribe to batch events, to update last submitted height in case batch confirmation was lost. This could happen if the sequencer crash/restarted just after submitting a batch to the settelement and by the time we query the last batch, this batch wasn't accepted yet. go uevent.MustSubscribe(ctx, m.Pubsub, "updateSubmittedHeightLoop", settlement.EventQueryNewSettlementBatchAccepted, m.UpdateLastSubmittedHeight, m.logger) // Sequencer must wait till DA is synced to start submitting blobs diff --git a/block/submit.go b/block/submit.go index e582b12d5..2547379a9 100644 --- a/block/submit.go +++ b/block/submit.go @@ -117,8 +117,8 @@ func SubmitLoopInner( logger.Error("Create and submit batch", "err", err, "pending", pending) panic(err) } - // this could happen if we timed-out waiting for acceptance in the previous iteration, but the batch was indeed submitted. - // we panic here cause restarting may reset the last batch submitted counter and the sequencer can potentially resume submitting batches. + // this could happen if we timed-out waiting for acceptance in the previous iteration, but the batch was indeed submitted. + // we panic here cause restarting may reset the last batch submitted counter and the sequencer can potentially resume submitting batches. if errors.Is(err, gerrc.ErrAlreadyExists) { logger.Debug("Batch already accepted", "err", err, "pending", pending) panic(err) @@ -273,7 +273,7 @@ func (m *Manager) GetUnsubmittedBlocks() uint64 { return m.State.Height() - m.LastSubmittedHeight.Load() } -// UpdateLastSubmittedHeight will update last height submitted height upon events. +// UpdateLastSubmittedHeight will update last height submitted height upon events. // This may be necessary in case we crashed/restarted before getting response for our submission to the settlement layer. func (m *Manager) UpdateLastSubmittedHeight(event pubsub.Message) { eventData, ok := event.Data().(*settlement.EventDataNewBatchAccepted)