Commit 7d083a21 authored by Liam Horne's avatar Liam Horne Committed by GitHub

Merge pull request #1257 from ethereum-optimism/fix/l2-geth-nonces

l2geth: only accept txs with exact nonce
parents 50f0d97b 709c85d6
---
'@eth-optimism/l2geth': patch
---
Prevents the sequencer from accepting transactions with a too high nonce
......@@ -560,8 +560,14 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
return ErrUnderpriced
}
// Ensure the transaction adheres to nonce ordering
if pool.currentState.GetNonce(from) > tx.Nonce() {
return ErrNonceTooLow
if vm.UsingOVM {
if pool.currentState.GetNonce(from) != tx.Nonce() {
return ErrNonceTooLow
}
} else {
if pool.currentState.GetNonce(from) > tx.Nonce() {
return ErrNonceTooLow
}
}
// Transactor should have enough funds to cover the costs
// cost == V + GP * GL
......
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