<p>This is a common misconception: mining is progress free.</p>
<p>Yes, it may take 10000 hashes in your example on average to find a block, but this only means that every attempt has 1/10000 chance of being a good one. It is irrelevant how many hashes you've done so far. Even if you have performed 9999 hashes already, the next one still only has a 1/10000 chance.</p>
<p>So the key to understanding this paradox is that while indeed, adding a transaction is a &quot;reset&quot; in a sense, <strong>every</strong> hash attempt is a reset, as it is independent from what you've done so far.</p>

CC BY-SA 4.0
2021-11-23T15:48:26.353Z
That's a perfect explanation. Thanks!
Joey
CC BY-SA 4.0
2021-11-23T15:19:02.500Z
2021-11-23T15:19:02.500Z
Pieter Wuille
<p>If I understand correctly, when calculating a proof of work, the entire header is being used in a sha256 function.</p>
<p>Now, whenever a new transaction is added to a pre-mined block, the header completely changes due to the merkle root hash changing.</p>
<p>Doesn't this mean that every new transaction added to the block will reset the calculation effort due to the initial header constantly changing?</p>
<p>For example, let's say I will need approximately 10,000 calculations in order to get a proof of work. If I get to 5,000 calculations and then the initial data (header hashes) changes, will this mean that I will need to calculate 10,000 more times to get the proof of work?</p>
<p>If that's the case, why even bother adding transactions to the block and not just rush creating an empty block ASAP, saving the time and effort of adding more data to the block?</p>
<p>Basically, I'm trying to understand why adding transactions to a block does not have a negative effect on the effort of being the first one getting a proof of work.</p>
<p>I hope I'm explaining myself clearly.</p>

CC BY-SA 4.0
2021-12-15T17:11:19.357Z
also empty block would obviously lack transactional fee rewards
2big2fail 
CC BY-SA 4.0
2021-12-15T18:16:03.870Z
At the time of this writing, average transaction fees in a block are only 1.27% of the block reward. If including transactions in the block would reduce the chance to find a good hash, all miners would happily ignore the transactions and what they gain from them.
X. N.
<mining-theory><block><transaction-selection>
Understanding POW and transactions
Joey
# Understanding POW and transactions

(Asked by: username_0 on 2021-11-23)

If I understand correctly, when calculating a proof of work, the entire header is being used in a sha256 function.

Now, whenever a new transaction is added to a pre-mined block, the header completely changes due to the merkle root hash changing.

Doesn't this mean that every new transaction added to the block will reset the calculation effort due to the initial header constantly changing?

For example, let's say I will need approximately 10,000 calculations in order to get a proof of work. If I get to 5,000 calculations and then the initial data (header hashes) changes, will this mean that I will need to calculate 10,000 more times to get the proof of work?

If that's the case, why even bother adding transactions to the block and not just rush creating an empty block ASAP, saving the time and effort of adding more data to the block?

Basically, I'm trying to understand why adding transactions to a block does not have a negative effect on the effort of being the first one getting a proof of work.

I hope I'm explaining myself clearly.

**Tags:** mining-theory, block, transaction-selection

> **Comments:**
> **username_1**: also empty block would obviously lack transactional fee rewards  
> **username_2**: At the time of this writing, average transaction fees in a block are only 1.27% of the block reward. If including transactions in the block would reduce the chance to find a good hash, all miners would happily ignore the transactions and what they gain from them.  

---

## 1 answers

### Answer by username_3 on 2021-11-23. Score: 12 | Accepted answer

This is a common misconception: mining is progress free.

Yes, it may take 10000 hashes in your example on average to find a block, but this only means that every attempt has 1/10000 chance of being a good one. It is irrelevant how many hashes you've done so far. Even if you have performed 9999 hashes already, the next one still only has a 1/10000 chance.

So the key to understanding this paradox is that while indeed, adding a transaction is a "reset" in a sense, **every** hash attempt is a reset, as it is independent from what you've done so far.

> **Comments:**
> **username_0**: That's a perfect explanation. Thanks!  

---

