Skip to main content

Why would you need to manually set a custom nonce?

Updated over 3 months ago
  1. There are three main reasons for setting a custom nonce:
    To override or cancel a transaction: While transactions cannot be canceled with certainty, overriding a transaction can be achieved by submitting a new transaction with the same, manually assigned nonce, and a higher fee than the first transaction. When you "increase fee" on a transaction through a wallet, under the covers, what is really happening is a resubmission of a transaction with the same nonce, but at a higher fee.
    ​
    ​

  2. To correct errors made by wallet software:
    Sometimes, a wallet will incorrectly assign a nonce so that it is not the immediate next sequential nonce. As we said previously, nonces must always occur sequentially without skips. If a nonce is submitted that is too high or too low, the transaction will never be able to be confirmed.
    ​
    ​

  3. To get a series of transactions "unstuck" from an account:
    Similar to the first reason, a situation could arise in which a series of otherwise acceptable transactions are held up behind a "stuck" transaction. Since nonces must always occur sequentially without skips, a backlog can occur. Resubmitting a transaction in place of the transaction with a "stuck" nonce and a higher fee can resolve the issue.

Did this answer your question?