6

With BABE, I understand validators to produce blocks and chosen randomly and multiple validators may be eligible to produce a block, already providing a large amount of forks/fork opportunities. If no validator is chosen, or none produce valid blocks, any validator may step in to produce a block.

GRANDPA is supposed to have the validators finalize on the longest chain given the most primary slot validator produced blocks.

If there are valid blocks produced by primary slot validators, yet the validators as a whole finalize on a chain ignoring those blocks and instead favoring blocks produced by secondary slot validators, will non-validator nodes consider this a consensus violation (non-best chain chosen to become best chain) or will they adapt accordingly? I expect the answer will be they'll adapt accordingly, given natural scenario:

  • Primary slot validators take too long to publish
  • Random validator steps in
  • Random validator's block is successfully propagated before a block by a primary slot validator

Yet I wanted to sanity check my understanding of consensus here.

1 Answer 1

2

GRANDPA as a gadget is meant to function on top of something like BABE, which is a blockchain extension process that is itself eventually consistent. The only goal of GRANDPA is to speed up the eventual consistency where that is possible.

If for some reason, more than 1/3 of nodes began to disrespect the expected BABE fork-choice rule that is used as input for vote in GRANDPA, nodes would defer to the GRANDPA validators to determine what is finalized. One reason for this is that it's difficult (prior to achieving consensus) to prove that a node has received some piece of information, such as a block, before taking a particular action. This means that it's not really feasible to slash or ignore GRANDPA voters who don't appear to be respecting the fork-choice rule.

So to answer your question: in the Substrate implementation of GRANDPA, nodes will defer to GRANDPA finality over the BABE fork-choice rule even if they appear to be in conflict with one another.

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.