<p>The block hash has to be below a certain value and the block hash depends (among others) on the nonce and on the Merkle root.</p>

<p>The Merkle root depends on the sequence of transactions. Note that it's a sequence, not a set, meaning the order is important.</p>

<p>Different miners choose many different lists of transactions. For every list of transactions with the other fields which go into the block hash, chances are there is no 32 bit nonce which will make the block hash low enough to qualify as a new block on the blockchain. So miners add a transaction, or remove one, or permute some to get a different Merkle root all the time.</p>

<p>I'll just calculate the time an AntMiner S9 with a hash rate of 14 TH/s takes to go through all the numbers in a 32 bit field (2^32 hashes) for you:</p>

<p>2^32 H / (14 TH/s) = 2^32 / 14 / 10^12 * s = 0.30678 ms</p>

<p>To answer your second question: Network traffic takes longer than 0.3 ms. To give you an impression on it: In fiberoptic cables, signals travel with about a third of the speed of light. With the speed of light, something travels 90 km in that time, so signals in fiberoptic cables can travel about 30 km in it. Many miners are more than 90 km away from each other and attempting to travel more than 90 km in that time turns out to piss physicists off, a lot.</p>

CC BY-SA 3.0
2017-10-13T07:07:07.357Z
Hi, could i bruteforce extra nonce with random bytes too? Should i update Merkle root after changing extra nonce. Maybe some good links where i can read about all this stuff explained from viewpoint of programming own mining software?
andymcgregor
CC BY-SA 3.0
2017-03-01T18:12:10.247Z
2017-03-01T18:17:25.490Z
2017-03-01T18:17:25.490Z
UTF-8
<p>I have been reading the SHA256 hash creation with a random nonce. So, my understanding is every miner would pull uncommited transactions and would try to create a Hash of the transactions with a random nonce starting with 0 and increment from there on. So, if every node/miner is performing the same hash with the nonce sequence starting from 0, it would always be the miner with the maximum computing power always outrun the smaller ones. How would a miner with lesser computing power ever be able to create a hash quicker than the largest one? </p>

<p>My second question is every time a block is added to the chain, would every miner stop their current process and restart all over again since the next block would depend on the hash of the currently added block?</p>

CC BY-SA 3.0
2017-03-04T09:37:19.957Z
Your second question is answered here: [Do miners have to start over whenever a block is found?](http://bitcoin.stackexchange.com/q/8887/5406)
Murch
<blockchain><hash><nonce>
Blockchain SHA256 hash and nonce
user7347188
# Blockchain SHA256 hash and nonce

(Asked by: username_0 on 2017-03-01)

I have been reading the SHA256 hash creation with a random nonce. So, my understanding is every miner would pull uncommited transactions and would try to create a Hash of the transactions with a random nonce starting with 0 and increment from there on. So, if every node/miner is performing the same hash with the nonce sequence starting from 0, it would always be the miner with the maximum computing power always outrun the smaller ones. How would a miner with lesser computing power ever be able to create a hash quicker than the largest one?

My second question is every time a block is added to the chain, would every miner stop their current process and restart all over again since the next block would depend on the hash of the currently added block?

**Tags:** blockchain, hash, nonce

> **Comments:**
> **username_1**: Your second question is answered here: [Do miners have to start over whenever a block is found?](http://bitcoin.stackexchange.com/q/8887/5406)  

---

## 1 answers

### Answer by username_2 on 2017-03-01. Score: 7 | Accepted answer

The block hash has to be below a certain value and the block hash depends (among others) on the nonce and on the Merkle root.

The Merkle root depends on the sequence of transactions. Note that it's a sequence, not a set, meaning the order is important.

Different miners choose many different lists of transactions. For every list of transactions with the other fields which go into the block hash, chances are there is no 32 bit nonce which will make the block hash low enough to qualify as a new block on the blockchain. So miners add a transaction, or remove one, or permute some to get a different Merkle root all the time.

I'll just calculate the time an AntMiner S9 with a hash rate of 14 TH/s takes to go through all the numbers in a 32 bit field (2^32 hashes) for you:

2^32 H / (14 TH/s) = 2^32 / 14 / 10^12 \* s = 0.30678 ms

To answer your second question: Network traffic takes longer than 0.3 ms. To give you an impression on it: In fiberoptic cables, signals travel with about a third of the speed of light. With the speed of light, something travels 90 km in that time, so signals in fiberoptic cables can travel about 30 km in it. Many miners are more than 90 km away from each other and attempting to travel more than 90 km in that time turns out to piss physicists off, a lot.

> **Comments:**
> **username_3**: Hi, could i bruteforce extra nonce with random bytes too? Should i update Merkle root after changing extra nonce. Maybe some good links where i can read about all this stuff explained from viewpoint of programming own mining software?  

---

