From 055e96e8ca38f0f9b998af85b37808dbaffcd548 Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 18 Nov 2024 13:44:34 +0000 Subject: [PATCH] remove buffer variable --- op-batcher/batcher/driver.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/op-batcher/batcher/driver.go b/op-batcher/batcher/driver.go index 3271c1cbf23e..ab5fc03127ea 100644 --- a/op-batcher/batcher/driver.go +++ b/op-batcher/batcher/driver.go @@ -596,22 +596,11 @@ func (l *BatchSubmitter) waitNodeSyncAndClearState() { // safe head progress given fully submitted channels held in // state. func (l *BatchSubmitter) checkExpectedProgress(syncStatus eth.SyncStatus) error { - - // Define a buffer: a delay denominated in L1 blocks - // to allow verifier to process blocks. - // Set to 0 to require immediate safe head advancement. - // Set to 1 to allow e.g. 12s for the safe head to advance - // after the L1 inclusion block was ingested. - // TODO extract this into a config variable - // TODO should we also wait numConfirmations (this is a txmgr config variable, not in scope of the batch submitter) - - BUFFER := uint64(1) - verifierCurrentL1 := syncStatus.CurrentL1 for _, ch := range l.state.channelQueue { if ch.isFullySubmitted() && // This implies a number of l1 confirmations has passed, depending on how the txmgr was configured !ch.isTimedOut() && - verifierCurrentL1.Number > ch.maxInclusionBlock+BUFFER && + verifierCurrentL1.Number > ch.maxInclusionBlock && syncStatus.SafeL2.Number < ch.LatestL2().Number { return errors.New("safe head did not make expected progress") }