1

Suppose that a miner find the right hashes but involuntarily or by malicious intention then create an invalid block, like trying to double spend a transaction

My guess is that the moment this block is broadcast the first node to receive and test this block will immediately copy the correct hashes and produce a block of his own this one valid and with his own coinbase address.

I know that this scenario has little chance to happen because miner know that their coinbase will be steal and rejected by the network, but is this a valid working process ?

1

1 Answer 1

4

It's not a valid working process: the block hash commits to all transactions.

First of all a miner cannot "find a right hash" then insert a double-spend transaction. This would invalidate the hash (and the block, actually).
For the same reason, a node receiving the block cannot malleate the coinbase transaction. It would not be able to "immediately produce a block" either.

In addition, blocks have consensus rules and a valid block does not only consist of a block header hash inferior to the target but must respect a number of other rules as well (locktimes, existing outpoints, valid scripts, ...).
The cost of producing a valid PoW is so high that you would not expect a miner to commit energy to an invalid block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.