blockchain – Understanding POW and transactions

0
3


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.



Source link

Leave a reply