2

When creating raw transactions, do I have to increase the nonce always in increments of 1 or can I use any nonce as long as it has not been used before?

Are there any specific rules? Could I also go up and down, like transaction #5 gets nonce 17 and transaction #6 gets nonce 13?

Can I use any nonce as long as it is not previously been used?

  • Increase by one or your tx queue is filled, AFAIK but I am on the phone...there is an answer explaining this – Roland Kofler Jul 7 '16 at 9:27
3

No, the nonce needs to equal the number of transactions sent from the address; so that also means no jumping around.

The account state comprises the following four fields: nonce: A scalar value equal to the number of transactions sent from this address

(Section 4.1 of Yellow Paper)

  • Strictly monotonic increasing starting from 0. – murrekatt Aug 5 '16 at 7:39

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.