4

For replay protection, it would be sufficient to require a unique nonce for every transaction from the same address. More precisely, it would be sufficient to consider a new transaction T from an address A with a nonce N inadmissible in the ledger if another transaction T' from A with nonce N already occurs in the ledger.

But Ethereum is more strict. Roughly speaking, it considers a transaction T from A with nonce N inadmissible in the ledger if N is not equal to M+1, where M is the nonce of the last transaction from A in the ledger.

Why is that? Why is Ethereum more strict than it needs to be?

I can think of two reasons:

  1. The stricter approach is more efficient (in space and time) to check.

  2. The stricter approach gives users a way to control the execution order of their transactions.

Are there other reasons?

  • 2
    I'd love to see an authoritative answer to your question, but for what it's worth, the two reasons you listed are what I personally believe led to this decision. – smarx Dec 13 '17 at 18:30
1

I believe that both of your reasons are correct. I'm not aware of other reasons, although I know some people find managing nonces frustrating. In the future it appears as if the use of nonces may change, I've even heard suggestions of nonces being completely removed with account abstraction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.