News for hackers. Stuff that matters.
Re:Bitcoin mining becomes unprofitable as BTC price falls to... by jcbrand on Sunday June 19, 2022 @08:26AM (#31798653)
The random number that you're trying to find by means of (yes, repeatedly) hashing, is dependent on the transactions in your block (which are hashed together in a Merkle tree).

Not only that, but the number you're trying to hash is also dependent on the previous block (hence it being called a blockchain).

So as soon as another miner mines a block, the block you're mining immediately becomes invalid. For two reasons, the block height of your block is now too low (it has the wrong parent) and it (most likely) includes already mined transactions.

So even if you happened to still mine your current block, it will be rejected by the nodes in the network for having the wrong block height and for including already mined transactions.

So, you have to assemble a new block, which uses the latest mined block as parent and you have to include new transactions from the mempool.

There's a cost to doing this, it takes time away from the actual hashing, which is what I meant with "starting from scratch".

For the reasons outlined above, you're not mining blocks independently from everyone else.

Re:Bitcoin mining becomes unprofitable as BTC price falls to... by jstanley on Sunday June 19, 2022 @08:31AM (#31798700)
Great, this is now all correct!
Re:Bitcoin mining becomes unprofitable as BTC price falls to... by jcbrand on Sunday June 19, 2022 @09:00AM (#31798910)
Yeah thanks, I do now understand the point the grandparent was making better.