Skip to content

Consensus Engine separation

ledgerwatch edited this page May 11, 2021 · 12 revisions

Validation of headers

Validation of uncles (EtHash)

Use of smart contract state for Consensus Engine

Solution for Staged sync

Fork choice rule

For choice rule can be thought of a partial order relationship among the set of possible headers. Being partial order, fork choice rule is:

  1. reflexive or irreflexive, depending on whether non-strict or strict definition is required. header A is either better than itself (non-strict, <=), or not better than itself (strict, <)
  2. anti-symmetric. if A better than B, then B is worse than A)
  3. transitive. if A better than B and B is better than `

Core is asking the Consensus Engine to infer the relation between given headers, and perform topological sort.