0

When a new block is created, does each block need to be validated? How does it differ from validating transactions?

Why miners would waste time validating transactions and blocks when they could spend their time mining

1

Why miners would waste time validating transactions and blocks when they could spend their time mining?

When a miner successfully mines a block, they transmit the block across the network. As the block starts to ripple out across the network, each full node receives a copy of the block and after validating it they add the block to the existing chain. Now consider a situation, where the block that is mined does not meet the consensus rules. As the full nodes receive the block, they validate the block to ensure it meets the validation criteria and if the block is invalid, the full nodes will reject the block and will not transmit it further. Thus those miners that do not satisfy the consensus rules will have their block rejected, and will lose their block reward and the effort they put in to mine the block.

When a new block is created, does each block need to be validated? How does it differ from validating transactions?

When the full nodes receive the block, each node performs a series of checks to ensure that the block conforms to the consensus rules. Similarly, when a transaction is broadcasted, each full node receiving a transaction will perform checks before including it in the mempool. If the transaction is invalid, the transaction will be rejected and will not be broadcasted further by that node. All the transactions included in the block being valid, is a subset of the block verification criteria. You can refer the bitcoin wiki page here to get a checklist on the transaction and block validation.

1

When a new block is created, does each block need to be validated?

Yes, new blocks must be validated.

How does it differ from validating transactions?

A block contains more information than just transactions. The block itself needs to be valid and there is more to a block being valid than just the transactions it contains being valid. There is information in the block header that must be checked. The order or transactions must be checked. There are also some rules for transactions that can only be verified once the transaction is included in a block.

Why miners would waste time validating transactions and blocks when they could spend their time mining

If miners do not spend the time to validate blocks and transactions, then can end up mining on an invalid blockchain. If any blocks that they mine on contain an invalid block (which may also contain invalid transactions), then those blocks will also be invalid and the mining work that that miner has done will be wasted. By ensuring that they are always mining on top of valid blocks, the miner ensures that they are not wasting any work. Validating blocks and transactions is not wasting time, it is ensuring that their money isn't being wasted.

Miners in the past have forgone validating blocks before mining on them and this has resulted in a significant waste of mining power. For example, a fork occurred in 2015 because some miners were not validating blocks that they were mining on top of so that they could maximize the amount of time that they were doing mining work. However this backfired on them as it resulted in several blocks being produced on top of an invalid block. This blocks are thus also invalid and ignored by the rest of the Bitcoin network. Those miners were not able to claim the block rewards from those blocks and thus wasted time and money. This could have been avoided if they were validating the blocks that they were mining on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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