pub fn extract_equivocations(
a: &JustifiedConfirmation,
b: &JustifiedConfirmation,
) -> Vec<EquivocationProof>Expand description
Extracts proofs of equivocation from two ConfirmedBlock certificates that finalize
different blocks at the same height: one proof for every validator whose own signatures on
the two certificates (including their justification chains) contradict each other.
Returns an empty list only if the inputs do not actually conflict (same block, or different
chains or heights) or are malformed. For two genuinely conflicting, well-formed certificates
the proven validators always hold at least a third of the total weight, because each of the
following cases blames a full intersection of two quorums. With the lower confirmation in
round r and the higher in round s:
r == s: every validator in the intersection of the two confirmation quorums double-voted.r < sand the higher certificate carries a justification chain: the chain’s links tile all rounds from its grounding round up toswith unlocking-round windows, and the grounding link’s window is unbounded below, so some link’s window containsr. Every validator in that link’s intersection with the lower confirmation quorum violated its lock.r < sand the higher certificate instead carries the first-round attestation: every validator in the intersection of the two confirmation quorums confirmed inrwhile attesting thatsis the chain’s first round — a first-round violation.