Split in Consensus: Longest Chain Rule

Is it possible for two miners of a Proof of Woorf blockchain like Bitcoin to validate a block at the same time?

Yes, in this case a split in consensus is taking place.

In this article I will briefly explain why this problem occurs in the consensus and how the protocol itself solves it.

image.png

Main points:

  1. Why does a split in consensus happen?
  2. How is it solved? Longest chain rule.

1. Why does a split in consensus happen?

The propagation speed in a blockchain is fast but not instantaneous.

For this reason, if two miners validate a block of transactions almost simultaneously, due to the propagation time of this information to the nodes, they might see both blocks as valid, since both have found a solution for the proof of work.

This produces a bifurcation in the chain known as "Split in Consensus". The two blocks are valid, since in a range of a few seconds they are seen as simultaneous.

image.png

2. How is it solved? Longest chain rule.

The consensus dispute will be resolved by the longest chain rule. The remaining miners continue to add and validate blocks on either branch of the fork.

image.png

When one branch exceeds the other by such a number of blocks that it would be impossible to overcome, the long chain is given as valid and the transactions in the short chain are returned to the mempool or "pool of unresolved transactions".

This means that these transactions will not be lost, but will end up being added to a block of the winning chain.

image.png

For this reason, it is said that in Bitcoin blockchain it is necessary to wait around 60 minutes for a transaction to be considered valid and impossible to reverse.

Given that by the time 6 blocks are added (with an average mining time of 10 minutes each), it would be impossible to aggregate enough computational power for the short chain to overcome the long chain.


Thanks for reading!

Follow me on Twitter and on Hashnode to stay tuned!