diff --git a/core/tx_pool.go b/core/tx_pool.go index abd45c796c..e9a8894af3 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -1023,6 +1023,15 @@ func (pool *TxPool) Has(hash common.Hash) bool { return pool.all.Get(hash) != nil } +// RemoveTx is similar to removeTx, but with locking to prevent concurrency. +// Note: currently should only be called by miner/worker.go. +func (pool *TxPool) RemoveTx(hash common.Hash, outofbound bool) { + pool.mu.Lock() + defer pool.mu.Unlock() + + pool.removeTx(hash, outofbound) +} + // removeTx removes a single transaction from the queue, moving all subsequent // transactions back to the future queue. func (pool *TxPool) removeTx(hash common.Hash, outofbound bool) { diff --git a/miner/worker.go b/miner/worker.go index 3476d26688..0e463f2bcb 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1090,6 +1090,7 @@ loop: // Skip L2 transaction and all other transactions from the same sender account log.Info("Skipping L2 message", "tx", tx.Hash().String(), "block", w.current.header.Number, "reason", "first tx row consumption overflow") txs.Pop() + w.eth.TxPool().RemoveTx(tx.Hash(), true) } // Reset ccc so that we can process other transactions for this block @@ -1121,10 +1122,13 @@ loop: // Circuit capacity check: unknown circuit capacity checker error for L2MessageTx, skip the account log.Trace("Unknown circuit capacity checker error for L2MessageTx", "tx", tx.Hash().String()) log.Info("Skipping L2 message", "tx", tx.Hash().String(), "block", w.current.header.Number, "reason", "unknown row consumption error") + // TODO: propagate more info about the error from CCC + rawdb.WriteSkippedTransaction(w.eth.ChainDb(), tx, "unknown circuit capacity checker error", w.current.header.Number.Uint64(), nil) // Normally we would do `txs.Pop()` here. // However, after `ErrUnknown`, ccc might remain in an // inconsistent state, so we cannot pack more transactions. + w.eth.TxPool().RemoveTx(tx.Hash(), true) circuitCapacityReached = true break loop diff --git a/params/version.go b/params/version.go index 44d4eacb2b..8bc7b09a83 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 4 // Major version component of the current release VersionMinor = 3 // Minor version component of the current release - VersionPatch = 55 // Patch version component of the current release + VersionPatch = 56 // Patch version component of the current release VersionMeta = "sepolia" // Version metadata to append to the version string )