From e40c0e471c4f1bba72ab2e50cab445db42189637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Mon, 6 Oct 2025 14:44:01 +0200 Subject: [PATCH 1/2] fix(worker): respect deadline in commit condition --- miner/scroll_worker.go | 4 +++- params/version.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/miner/scroll_worker.go b/miner/scroll_worker.go index ffd7b7890bf..ea446f64b8e 100644 --- a/miner/scroll_worker.go +++ b/miner/scroll_worker.go @@ -415,7 +415,9 @@ func (w *worker) mainLoop() { // be automatically eliminated. if w.current != nil { shouldCommit, _ := w.processTxnSlice(ev.Txs) - if shouldCommit || (w.current.deadlineReached && len(w.current.txs) > 0) { + // Note: shouldCommit implies that the block is not empty. + // Note: We must still wait for the deadline to avoid creating a block with a future timestamp. + if shouldCommit && w.current.deadlineReached { _, err = w.commit() } } diff --git a/params/version.go b/params/version.go index 25e472d7298..8a779174ef3 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 9 // Minor version component of the current release - VersionPatch = 5 // Patch version component of the current release + VersionPatch = 6 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) From e9f3e4e97aa2a51fc8dd6adfbbd8204ebe7cd52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Mon, 6 Oct 2025 15:00:04 +0200 Subject: [PATCH 2/2] fix --- miner/scroll_worker.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/miner/scroll_worker.go b/miner/scroll_worker.go index ea446f64b8e..17faa527b0f 100644 --- a/miner/scroll_worker.go +++ b/miner/scroll_worker.go @@ -414,10 +414,10 @@ func (w *worker) mainLoop() { // already included in the current mining block. These transactions will // be automatically eliminated. if w.current != nil { - shouldCommit, _ := w.processTxnSlice(ev.Txs) - // Note: shouldCommit implies that the block is not empty. - // Note: We must still wait for the deadline to avoid creating a block with a future timestamp. - if shouldCommit && w.current.deadlineReached { + // Note: We ignore shouldCommit and commit based on len(w.current.txs) instead. + w.processTxnSlice(ev.Txs) + // Note: We must wait for the deadline to avoid creating a block with a future timestamp. + if w.current.deadlineReached && len(w.current.txs) > 0 { _, err = w.commit() } }