<p>Most mining implementations, solo or pooled, will start from 0 and increment the nonce value. In 2018 (and in recent years) ASIC miners are so fast that all possible nonce values are tried in practically no time. To get around this nonce-space exhaustion, the extraNonce value in the coinbase tx is updated once the nonce space has run out.</p>

<p>A pool can be thought of as multiple solo miners working in parallel.</p>

<p>Since ASICs are so fast, it doesn't make sense to have every worked mining on the same block template with only different nonce ranges (worker one on nonce 0-99, worker 2 on 100-199 etc.), since they will all quickly exhaust their own nonce space and start overlapping.</p>

<p>Instead, mining pools will send different block templates to each (or the majority, at least) of workers. The only difference is usually some transactions, which then change the merkle root. Thus, all workers are effectively mining a unique block, but all at the same height. If any worker solves a block, the pool will win that block.</p>

<p>Lastly, in addition to the nonce, the timestamp value is also updated every second, which allows you to retry the nonce space once again, since the header has changed.</p>

CC BY-SA 4.0
2018-08-14T12:39:54.737Z
2018-08-14T12:39:54.737Z
Raghav Sood
<p>I know that when I create a new block in a Bitcoin network, I change the nonce value to generate a block.</p>

<p>The question is, do you randomly assign the values you assign to nonces? Or do you start with the number one?</p>

<p>Some people say that they are random,</p>

<p>Some people say they start with the number 1 using the hash cache algorithm.</p>

<p>Who is right?</p>

<p>If both of you are right,</p>

<p>In the case of solo mining, randomly assign a value to nonces,</p>

<p>In pooled mining, do you distribute the numbers among the participants and increase them one by one?</p>

<blockchain><mining-pools><mining-theory><solo-mining><nonce>
How are nonces decided in mining?
ASH
# How are nonces decided in mining?

(Asked by: username_0 on 2018-08-14)

I know that when I create a new block in a Bitcoin network, I change the nonce value to generate a block.

The question is, do you randomly assign the values you assign to nonces? Or do you start with the number one?

Some people say that they are random,

Some people say they start with the number 1 using the hash cache algorithm.

Who is right?

If both of you are right,

In the case of solo mining, randomly assign a value to nonces,

In pooled mining, do you distribute the numbers among the participants and increase them one by one?

**Tags:** blockchain, mining-pools, mining-theory, solo-mining, nonce


---

## 1 answers

### Answer by username_1 on 2018-08-14. Score: 4

Most mining implementations, solo or pooled, will start from 0 and increment the nonce value. In 2018 (and in recent years) ASIC miners are so fast that all possible nonce values are tried in practically no time. To get around this nonce-space exhaustion, the extraNonce value in the coinbase tx is updated once the nonce space has run out.

A pool can be thought of as multiple solo miners working in parallel.

Since ASICs are so fast, it doesn't make sense to have every worked mining on the same block template with only different nonce ranges (worker one on nonce 0-99, worker 2 on 100-199 etc.), since they will all quickly exhaust their own nonce space and start overlapping.

Instead, mining pools will send different block templates to each (or the majority, at least) of workers. The only difference is usually some transactions, which then change the merkle root. Thus, all workers are effectively mining a unique block, but all at the same height. If any worker solves a block, the pool will win that block.

Lastly, in addition to the nonce, the timestamp value is also updated every second, which allows you to retry the nonce space once again, since the header has changed.


---

