<p>The entire block header enters as input in the hashing process.</p>

<p>Along with nonce and some other fixed fields there is a "Merkle root" field in the <strong>block header</strong> that each miner has different. </p>

<p>So each miner can search the nonce range from 0 to the last - in order; because of different Merkle root each miner will have different <strong>block header hash</strong> for the same nonce and other fixed fields.</p>

<p>NOTE: Why each miner has different Merkle root? That's because in the transactions miners include in the block (from which Merkle root is derived) there is one special transaction called "coinbase transaction" that each miner has unique. Therefore the Merkle root is also unique. "Coinbase transaction" is included by the miner himself along with regular transactions and is the transaction that gives mining reward to miner's own address. </p>

CC BY-SA 3.0
2017-11-27T22:21:17.597Z
Thanks for your answer. Could you elaborate the reason why the Merkle Root is different for each miner ? According to what I read, it is the root of all the transactions in the block, so why would it be different depending on the miner ?
Arthur Attout
CC BY-SA 3.0
2017-11-27T22:23:51.253Z
Good reasoning. But from these transactions there is one special transaction called "coinbase transaction" that each miner has unique. Therefore the Merkle root is also unique. "Coinbase transaction" is included by the miner himself along with regular transactions and is the transaction that gives mining reward to miner's own address.
croraf
CC BY-SA 3.0
2017-11-28T17:37:42.407Z
@croraf - could you add that to your answer?  Comments are transient and may be deleted.
Hannah Vernon
CC BY-SA 3.0
2017-11-27T21:28:26.027Z
2017-11-28T18:50:32.743Z
2017-11-28T18:50:32.743Z
croraf
<p>Pretty straightforward question : </p>

<p>When a miner is trying to find a 18-leading-zeros hash, does it always start with a nonce at zero ? I suppose it doesn't, because other miners in the world may have found out that the first 1000 nonces won't give a sufficient hash. </p>

<p>My question is then, how does a miner knows which nonce to start with ? </p>

<nonce>
How does a miner know which nonce to start with ?
Arthur Attout
# How does a miner know which nonce to start with ?

(Asked by: username_0 on 2017-11-27)

Pretty straightforward question :

When a miner is trying to find a 18-leading-zeros hash, does it always start with a nonce at zero ? I suppose it doesn't, because other miners in the world may have found out that the first 1000 nonces won't give a sufficient hash.

My question is then, how does a miner knows which nonce to start with ?

**Tags:** nonce


---

## 1 answers

### Answer by username_1 on 2017-11-27. Score: 2 | Accepted answer

The entire block header enters as input in the hashing process.

Along with nonce and some other fixed fields there is a "Merkle root" field in the **block header** that each miner has different.

So each miner can search the nonce range from 0 to the last - in order; because of different Merkle root each miner will have different **block header hash** for the same nonce and other fixed fields.

NOTE: Why each miner has different Merkle root? That's because in the transactions miners include in the block (from which Merkle root is derived) there is one special transaction called "coinbase transaction" that each miner has unique. Therefore the Merkle root is also unique. "Coinbase transaction" is included by the miner himself along with regular transactions and is the transaction that gives mining reward to miner's own address.

> **Comments:**
> **username_0**: Thanks for your answer. Could you elaborate the reason why the Merkle Root is different for each miner ? According to what I read, it is the root of all the transactions in the block, so why would it be different depending on the miner ?  
> **username_1**: Good reasoning. But from these transactions there is one special transaction called "coinbase transaction" that each miner has unique. Therefore the Merkle root is also unique. "Coinbase transaction" is included by the miner himself along with regular transactions and is the transaction that gives mining reward to miner's own address.  
> **username_2**: @username_1 - could you add that to your answer?  Comments are transient and may be deleted.  

---

