Valid block on top of invalid block

1

I have been researching a little on the concept of blockchain for some time now. If there is any corrupted block then others won't try to build blocks on top of it. But suppose for some time if it remains as the longest chain and if someone adds a block on top of it, and after a while it becomes shorter.. then what happens to the block added on top of the corrupted block?

Thanks in advance. Please also suggest relevant websites or material from which I can learn more about it. Thanks again!

Ish

Posted 2017-12-20T15:47:52.223

Reputation: 11

Answers

1

Any blocks built on top of an invalid block are also invalid. If a chain with more work overtakes the one with the invalid block on it, the block on top is still invalid and is ignored by all other nodes.

MeshCollider

Posted 2017-12-20T15:47:52.223

Reputation: 8 735

so what happens to the transactions in it?Ish 2017-12-21T07:41:04.383

They are mined into a valid block insteadMeshCollider 2017-12-21T10:04:37.290

0

Blocks commit to their direct ancestor, and thus by induction to all of their ancestors. As MeshCollider already explained, nothing valid can be chained on top of an invalid chain-tip.

From the perspective of any network participants that enforce the rules of Bitcoin, invalid blocks don't add any consensus relevant information. The content of the blocks is simply ignored as if the block wouldn't exist at all (although nodes very well might drop the connection to the node that relayed invalid information to them, or even ban them).

This means, that any transactions only included in the invalid block are simply still unconfirmed, and whenever someone finds another block next, they may choose to include them in their block.

Murch

Posted 2017-12-20T15:47:52.223

Reputation: 41 609