Skip to main content

verify_chain

Function verify_chain 

Source
pub fn verify_chain(
    community_id: &CommunityId,
    genesis: &PublicKey,
    chain: &[SignedRootRotation],
) -> Result<ChainHead, RotationError>
Expand description

Verifies a rotation chain from the genesis key (§4.6): genesis must derive community_id; for rotation i (1-based, list order) sig_old verifies under Kᵢ₋₁ before decoding, then community_id, rotation_seq = i, old_root = Kᵢ₋₁, new_suite ≥ the previous suite and sig_new under new_root are checked.

§Errors

RotationError naming the first failing rotation.