mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
"Canonical if recorded, else the outer id" reads as two trivial lines, which is why it was re-typed inline across the package and behind three separately-named helpers -- decision, certCanonical, canonicalIDOf -- each expressing the same meaning in its own words. A rule with N copies is a rule with N chances to diverge, and a suite that pins one copy says nothing about the others. certCanonical and canonicalIDOf differ only in where they FETCH the pair from: a cert's position, or a VM block's optional commitment. That difference is real and stays; the rule they then apply is not theirs to restate, so both hand the pair to decision. The degrade direction is the part worth pinning: an absent canonical becomes the OUTER id, never Empty. Empty would make every unwrapped block equal to every other one, which is the opposite of what a bare chain means. Co-authored-by: Hanzo Dev <[email protected]>