Commit 2924845d authored by Conner Fromknecht's avatar Conner Fromknecht Committed by Matthew Slipper

feat: surface miner nonce too high errors

This commit exposes the ErrNonceTooHigh at the execution level to
external users. Previously the error was mapped to ErrNonceTooLow to
match the mempool behavior. As this is a new error, and one not
currently exposed in L1, this could be a breaking change for some
applications depending on how the error messages are parsed.
parent 2b743678
---
'@eth-optimism/l2geth': patch
---
expose ErrNonceTooHigh from miner
......@@ -884,13 +884,8 @@ func (w *worker) commitTransactionsWithError(txs *types.TransactionsByPriceAndNo
// Return specific execution errors directly to the user to
// avoid returning the generic ErrCannotCommitTxnErr. It is safe
// to return the error directly since l2geth only processes at
// most one transaction per block. Currently, we map
// ErrNonceTooHigh to ErrNonceTooLow to match the behavior of
// the mempool, but this mapping will be removed at a later
// point once we decided to expose ErrNonceTooHigh to users.
if err == core.ErrNonceTooHigh {
return core.ErrNonceTooLow
} else if err != nil {
// most one transaction per block.
if err != nil {
return err
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment