Skip to content

Function signed::verify_chain

zaun_community_protocol::signed::verify_chain · Function

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

Verifies a rotation chain from the genesis key: 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.

RotationError naming the first failing rotation.

Full rustdoc page