5

As in the title, the reason for the existence of the sequence number is not clear to me.

6

The sequence number is basically what we call a "nonce": a number used once. When you want to validate a transaction, it is part of the transaction that you sign. Then it is incremented when the transaction got accepted on the blockchain.

This means that two transactions are never the same and by extension always require a different signature. This way, your signatures can't be used to validate the same transaction again and again.

  • 1
    Additionally, they must be contiguous. We can use this to effectively build conditional logic into a smart contract. e.g. If I give you two signed transactions with the same seqNo, you can choose to transact 0 or 1 of them, but not both. – Synesso Jul 26 '18 at 1:04

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.