What is a Nonce?
A nonce is a counter or trial value that serves different functions depending on the protocol context, such as mining or transaction sequencing.
On this page
Nonce Appears in Two Different Contexts
A nonce is a number field used for various purposes within cryptocurrency systems. Its meaning depends on which network and which transaction are being discussed. The nonce in Bitcoin mining does not perform the same function as the transaction nonce of an Ethereum account. Confusing these two applications makes it especially difficult to understand pending transactions in a wallet.
Nonce in Bitcoin Mining
A Bitcoin miner tries different hash results by changing the nonce value in the candidate block header. A hash is a digital summary of the data. The miner’s goal is to find a result that meets the target set by the network. When nonce options are exhausted, the miner can continue trying by modifying other fields of the candidate block. Therefore, a nonce is not a reward number or a special password that turns into a winning ticket on its own.
Nonce in Ethereum Transactions
In Ethereum, transactions sent from a standard user account are numbered sequentially. This sequence number is the nonce. It helps determine the order in which transactions from the same account will be applied and helps prevent the same signed transaction from being used repeatedly.
For example, if a transaction with nonce 10 is pending, a transaction you send from the same account with nonce 11 may also wait behind it. The “speed up” feature in wallets can send a replacement transaction offering a higher fee with the same nonce under appropriate conditions. Which transaction is accepted depends on the rules of the network and nodes; pressing the button does not guarantee instant success.
Changing the nonce randomly can disrupt the transaction sequence. Before resending while waiting for a transfer, check the wallet’s transaction history and its status on the network. The recipient address, the amount to be sent, and the nonce are different pieces of information; sending a second transaction to the same address does not automatically cancel the first transaction.