4

According to the "Fork choice rule" in Ethereum 2.0 (sharding), how to choose a branch in a fork? (A) or (B) ?

(A) branch, which has the most blocks in it. (similar to "longest chain" rule in PoW)

(B) branch with more attesters across all the blocks.

For example, assuming two following branches in a fork:

(1) branch one: including 10 blocks, signed by 8 unique attesters.

(2) branch two: including 8 blocks, signed by 10 unique attesters.

According to the "Fork choice rule" in Ethereum 2.0 (sharding), which above branch in this fork will be chosen? (1) or (2) ?

1 Answer 1

2

The fork choice rule in Ethereum 2.0 is called LMD GHOST.

The basic answer to the question is branch 2: the branch with the most attestations/votes.

There are many other details to the fork choice. For example, proposer boost, and votes are weighted by stake.


References:

https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/fork-choice.md

https://arxiv.org/abs/2003.03052

https://github.com/protolambda/lmd-ghost

Visualising the 7-block reorg on the Ethereum beacon chain illustrates an unexpected outcome of the fork choice in action.

3
  • And what if all parameters (number of attestations/votes, the weight of votes according to their stake) are the same? In a such situation in PoW (where two branches have same difficulty) a set of miners work on branch (1) and others on branch (2). And what happens here?
    – Questioner
    Commented Mar 12, 2020 at 12:42
  • I think that uncle blocks aren't counted, see here github.com/ethereum/consensus-specs/blob/dev/specs/phase0/…
    – upavloff
    Commented Jun 8, 2022 at 19:04
  • @upavloff Thanks! Can't remember what made me think of uncles; fixed and updated the answer. The last link I added you'd likely be interested in case you haven't seen.
    – eth
    Commented Jun 9, 2022 at 10:17

Your Answer

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

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