<p>As I understand the merkle tree hash is a (semi)unique hash of the combination of the new transactions and the previous blocks hash.</p>

<p>I'm assuming this hash changes when a new transaction is added to the block. Now since there are multiple transactions per second on average (with BTC), this means the nonce is <em>"reset"</em> each time. </p>

<p>As I've understood here: <a href="https://bitcoin.stackexchange.com/questions/48470/restarting-mining-on-new-transaction">Restarting mining on new transaction</a> 'restarting' is not really a valid concept, since every 'try' for mining a block is the same probability chance.</p>

<p>Since everyone would want to have the newest block to include as much transactions as possible, how is this managed.</p>

<p>Is it wrong to see it like this:</p>

<ul>
<li>Every miner hopes to find a new block in 1 second (which means billions of nonces tried if I understand correctly, given you have a fast miner).</li>
<li>If it doesn't find the nonce in that 1 second, it will grab as many new transactions as possible, and starts bursting out new block hashes, until one is 'difficult' enough. And then advertises that block and everyone will have to verify and then accept/deal with this amount of transactions in the new block.</li>
</ul>

<p>Is it wrong to think that it doesn't really matter if a miner spends 5 minutes on the same block, or switch to a new block every second or even faster? Since the probability is the same.</p>

<p>My question is basically if there is anything wrong with the above statements or assumptions.</p>

CC BY-SA 3.0
2016-09-09T13:32:03.470Z
Small error in your assumption: Merkle tree doesn't contain the previous block hash, only hashes of all the transactions in the current block. Which indeed keep changing whenever a transaction is added to or remove from (or moved within) the block. I don't think this matters for the rest of your question, as the PoW does cover the whole block header, which does include the hash of the previous block.
Jannes
CC BY-SA 3.0
2016-09-09T13:47:26.993Z
Side question: I believe the block header also contains the nonce, so when the nonce changes, the hash that you calculate with nonce also changes? So essentially you never are really incrementing the nonce, without changing the hash to calculate with?
BlockChange
CC BY-SA 3.0
2016-09-09T14:28:47.987Z
related: [How often do miners update their block transaction list?](http://bitcoin.stackexchange.com/q/32892/5406), also have a look at the tag [tag:transaction-selection].
Murch
CC BY-SA 3.0
2016-09-09T16:25:18.980Z
@BlockChange Correct. That's the whole point of the nonce (although changed in other fields also have this effect) : to force a change in the header and therefore in the hash.
Jannes
<mining-theory><nonce>
New transaction, merkle tree change, when to decide what to include in new block
BlockChange
# New transaction, merkle tree change, when to decide what to include in new block

(Asked by: username_0 on 2016-09-09)

As I understand the merkle tree hash is a (semi)unique hash of the combination of the new transactions and the previous blocks hash.

I'm assuming this hash changes when a new transaction is added to the block. Now since there are multiple transactions per second on average (with BTC), this means the nonce is *"reset"* each time.

As I've understood here: [Restarting mining on new transaction](https://bitcoin.stackexchange.com/questions/48470/restarting-mining-on-new-transaction) 'restarting' is not really a valid concept, since every 'try' for mining a block is the same probability chance.

Since everyone would want to have the newest block to include as much transactions as possible, how is this managed.

Is it wrong to see it like this:

* Every miner hopes to find a new block in 1 second (which means billions of nonces tried if I understand correctly, given you have a fast miner).
* If it doesn't find the nonce in that 1 second, it will grab as many new transactions as possible, and starts bursting out new block hashes, until one is 'difficult' enough. And then advertises that block and everyone will have to verify and then accept/deal with this amount of transactions in the new block.

Is it wrong to think that it doesn't really matter if a miner spends 5 minutes on the same block, or switch to a new block every second or even faster? Since the probability is the same.

My question is basically if there is anything wrong with the above statements or assumptions.

**Tags:** mining-theory, nonce

> **Comments:**
> **username_1**: Small error in your assumption: Merkle tree doesn't contain the previous block hash, only hashes of all the transactions in the current block. Which indeed keep changing whenever a transaction is added to or remove from (or moved within) the block. I don't think this matters for the rest of your question, as the PoW does cover the whole block header, which does include the hash of the previous block.  
> **username_0**: Side question: I believe the block header also contains the nonce, so when the nonce changes, the hash that you calculate with nonce also changes? So essentially you never are really incrementing the nonce, without changing the hash to calculate with?  
> **username_2**: related: [How often do miners update their block transaction list?](http://bitcoin.stackexchange.com/q/32892/5406), also have a look at the tag [tag:transaction-selection].  
> **username_1**: @username_0 Correct. That's the whole point of the nonce (although changed in other fields also have this effect) : to force a change in the header and therefore in the hash.  

---

## 0 answers

