0.0421 s - время 43 - запросов

We use cookies in order to improve your experience while using our website. If you continue to use our site, you accept our Cookies Policy, revised Privacy Policy and updated Terms of Use.

BTC $ 9160.05647552 (0.64 %)
ETH $ 268.833071099 (-1.66 %)
XRP $ 0.4294279991 (2.22 %)
LTC $ 135.982869683 (-0.93 %)
BCH $ 428.661060756 (-0.56 %)
EOS $ 7.0400912644 (-0.29 %)
BNB $ 32.6081037963 (-0.45 %)
BSV $ 212.901374026 (-0.87 %)
USDT $ 1.0045173442 (-0.13 %)
XLM $ 0.1293132872 (0.89 %)

Nonce As Simplest Component Of Block

20:30 05/02/2019
The Term Of Nonce In Crypto Sphere



Each block in blockchains is a complex union of different components. These components represent various technological solutions and are intended to solve different tasks. Still, their combination leads to a single goal, which is ledger prolongation.


The whole block content includes standard components, such as a standard start-bit sequence in the block (Magic no), block size, block header, and transactions. Transactions take the biggest part of a block. Their structure is quite simple. They consist of a payment source, payment destination, inputs and outputs, etc. All complex components related to block functions are placed in the header. There are several hashing results, block version, timestamp, complexity, and nonce. This last component is one of the simplest, yet it is very important. Let’s examine it in detail.


What is nonce?


The origin of the “nonce” term is simple. It is a shortening from “number used once”. Simply saying it is the counter incremented under certain conditions. Obviously this counter is used once during some action it is intended to. The nonce is not only used in Bitcoin. For instance Ethereum has two different nonces used in blocks and accounts of both kinds.


Other projects also use nonce. Among well known projects we may recollect NEO and Ripple.


Nonce in Bitcoin


The main goal of nonce in Bitcoin is to bring randomness, which is crucial for mining. As we know, mining requires multiple recalculation of the block content. If a hashing result satisfies requirements, mining is successful. Unfortunately, it is hard to get a correct hash result in a single try.


According to Bitcoin rules, an average time of block closing is 10 minutes. This means that all network participants generate one block in 10 minutes regardless of how many hashing facilities are involved. The block has to be recalculated many times. A block with the same content gives the same hash result — thus, we need to change it. There are only a few components that can be changed: transactions, timestamp, and nonce.


The problem is that changes have to be as small as possible to reduce recalculation time. This makes transactions substitution inefficient because of the necessity to recalculate the Merkle tree. A timestamp may have an influence on the choice of the right block in the case of simultaneous mining. Thus, it should not be changed too often. This leaves nonce as the only appropriate option. Changing nonce every time when an unsatisfactory block hash is calculated is the best choice.


Nonce in Ethereum


Ethereum uses nonce in two different ways. The first implementation is similar to Bitcoin. Nonce is a standard component of Ethereum blocks. The second application concerns multiple transactions of a single account. According to the Ethereum glossary, an account nonce is a simple counter of transactions. It is used to strengthen the state change protection and prevent multiple spending attacks.


Nonce for mining pools


Another important implementation area of nonce is the mining pool workload distribution. Each mining pool should avoid multiple calculations of a single block by several participants at the same time. This can be performed in several ways. The pool coordinator can avoid sending timestamp to participants, send different transactions sets to different participants, or give nonce ranges to different participants.


The first approach is risky because all pool members are working around the same time. The second approach requires a lot of extra work performed by the pool coordinator. Thus, the last approach is the most efficient.




By taking “nonce” as an example, we can clearly see that even the simplest component of crypto projects performs significant functions. Removing a nonce would instantly lead to the need to solve many problems without an effective solution being prepared.

Found a mistake? Highlight it and press Ctrl + Enter to notify the administrator.

Up-to-date Blockchain and cryptocurrency news. Be the first to know!

What is it for?