Post
Topic
Board Development & Technical Discussion
Merits 4 from 1 user
Re: A question about miners choosing fork.
by
Synchronice
on 16/05/2023, 11:49:51 UTC
⭐ Merited by o_e_l_e_o (4)
Miners should generally choose the fork with the longest length.
This is wrong.

Nodes will follow the chain which has the most accumulated work. This is not necessarily the chain with the longest length.

Usually when we reorganize one or two blocks, then the blocks will obviously have the same difficulty and therefore represent the same amount of work, so the longest chain will be the chain with the most work. However, if a fork lasted long enough to significantly stretch beyond a difficulty retargeting and in to a new difficulty epoch, then blocks on each chain would represent a different amount of work and so the longest chain may not necessarily be the chain with the most work. Nodes will switch to a shorter chain if that chain has more accumulated work.
Actually, you are right! I always thought the longest chain was the answer because the whitepaper says:
Quote
Nodes always consider the longest chain to be the correct one and will keep working on extending it
Quote
The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it

It's true that originally the block height was a main factor but it was changed later when people saw the danger of height over most work where one can mine blocks locally  with low difficulty, manipulate timestamp and make his chain the longest chain, broadcast it and do the magic. To protect ourselves from this accident, we should follow chain with more accumulated work.

Thank you for this post, you really enlightened me.