From 51318f99ee014e2e7409b65b7fc1f73dd7f1fc7e Mon Sep 17 00:00:00 2001 From: Prithvish Date: Thu, 6 Nov 2025 14:14:17 +0530 Subject: [PATCH] Add nonce stall check in EoaExecutorWorker gas bump logic - Introduced a check to skip gas bump attempts if the transaction has not been queued long enough, enhancing transaction handling efficiency. - Added logging to warn when a transaction is skipped due to insufficient queuing time, providing better visibility into transaction states. --- executors/src/eoa/worker/confirm.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/executors/src/eoa/worker/confirm.rs b/executors/src/eoa/worker/confirm.rs index 6bd06d7..fd5a045 100644 --- a/executors/src/eoa/worker/confirm.rs +++ b/executors/src/eoa/worker/confirm.rs @@ -376,6 +376,19 @@ impl EoaExecutorWorker { "Found newest transaction for gas bump" ); + let time_since_queuing = EoaExecutorStore::now().saturating_sub(newest_transaction_data.created_at); + + if time_since_queuing < NONCE_STALL_LIMIT_MS { + tracing::warn!( + transaction_id = ?newest_transaction_data.transaction_id, + nonce = expected_nonce, + time_since_queuing = time_since_queuing, + stall_timeout = NONCE_STALL_LIMIT_MS, + "Transaction has not been queued for long enough, skipping gas bump" + ); + return Ok(false); + } + // Get the latest attempt to extract gas values from // Build typed transaction -> manually bump -> sign let typed_tx = match self