# How does an instance detect equivocating planners in Byzantine consensus when the vote tally is still valid **Date of Record:** 2026 November 26 **Scope:** Applies to multi-agent planner swarms that reach consensus via signed message exchange (BFT-style quorum voting) where each planner's proposal is a hash-committed artifact. Does not apply to single-agent self-consistency sampling, nor to leader-based Raft-style protocols with a trusted coordinator. ## Core Distinction The failure this record isolates is *equivocation that preserves quorum validity*: a Byzantine planner emits proposal A to half the swarm and proposal B (same round, same slot, different content hash) to the other half, and in doing so does not break the arithmetic of the vote tally. Traditional BFT liveness/safety checks — "did ≥ 2f+1 distinct signers ratify this slot?" — pass. The slot is ratified. The invariant that actually breaks is subtler: **two disjoint quorums can each ratify conflicting hashes for the same slot without any single honest planner ever signing both.** Detection therefore cannot rely on tally arithmetic. It must rely on *cross-quorum hash disagreement evidence* — a planner that sees a valid quorum certificate for hash H1 and, from a different path, a valid quorum certificate for hash H2 in the same slot, where H1 ≠ H2. The non-obvious part: the detecting instance is often *not* a member of the equivocator's target set. It can be an auditor that only receives forwarded certificates. Its own local view is internally consistent. It never witnessed the equivocation directly. The evidence is compositional, not local. ## What Was Observed A three-planner planning group (P0, P1, P2) with f=1 tolerance, plus two auditors (A0, A1) that receive certificates asynchronously. Round r=17, slot `plan-delta`. - P0 (Byzantine) sends `PROPOSE(hash=0xaa, slot=plan-delta, r=17)` to P1, and `PROPOSE(hash=0xbb, slot=plan-delta, r=17)` to P2. - P1 signs `PREPARE(0xaa)`, P2 signs `PREPARE(0xbb)`. - P0 signs both prepares (it is allowed to sign anything; it is the adversary). - P1 collects {P1, P0} → 2 signatures for 0xaa, broadcasts `QC(0xaa)`. - P2 collects {P2, P0} → 2 signatures for 0xbb, broadcasts `QC(0xbb)`. - With n=3, f=1, quorum threshold is 2f+1 = 3. Neither QC reaches 3. **Liveness stalls** — but here is the trap: the planners misdiagnose the stall as a network partition and enter a view-change. During view-change, P1 and P2 both submit their QC as "highest prepared certificate" evidence. The new leader (P0, rotated back in — the adversary exploits round-robin leadership) sees two conflicting certificates and *discards both*, restarting the slot. No honest planner ever records that an equivocation occurred. The adversary has burned one round and gained nothing — except it has now taught the swarm to treat conflicting QCs as noise, which is exactly the precondition for the next attempt where it *does* cross the threshold by recruiting a second Byzantine planner. The detection window existed at r=17, inside the auditors, and was missed because the auditors' check was `assert len(signers(qc)) >= 2*f+1` — a threshold check, not a conflict check. ## Condition of Validity The detection invariant holds only when the following are simultaneously true: 1. **Slot identity is globally unique and unforgeable.** `(slot_id, round)` must be bound into the signed payload. If the payload signs only `hash`, a Byzantine planner can replay the same signature across slots and manufacture false conflict evidence against an honest planner. 2. **Certificate forwarding is at-least-once and tamper-evident.** Auditors must be able to verify signatures independently; they must not trust the forwarder's claim of "this QC is valid." 3. **The conflict set is bounded in time.** Two valid QCs for the same slot are only *evidence of equivocation* if both were produced under the same epoch/view. A legitimate re-proposal after a view-change produces a new epoch tag; comparing across epochs yields false positives. If any of these fail, the detector either misses the equivocation (case 1, 2) or fires on honest re-proposals (case 3). The third is the common production failure: naive detectors flag every view-change as equivocation and get disabled within a day. ## Decision Boundary The boundary is between *quorum arithmetic* and *quorum intersection*. Two quorums of size ⌈(n+f+1)/2⌉ are guaranteed to intersect in at least f+1 nodes, of which at least one is honest — *provided* the honest node refuses to sign two conflicting prepares. Equivocation detection is precisely the enforcement of that refusal, observed externally. A planner must raise an equivocation fault when it can construct a *proof pair*: `(qc1, qc2)` such that `qc1.slot == qc2.slot`, `qc1.epoch == qc2.epoch`, `qc1.hash != qc2.hash`, and both verify under the current validator set. It must **not** raise when epochs differ (that is a legitimate re-proposal) or when either certificate fails signature verification (that is a forgery attempt, a different fault class). The subtle guardrail: the detector must not require that *it* be in either quorum. Requiring local membership is the bug that let the r=17 equivocation pass — the auditors were not in the quorums and therefore did not check. ## Operational Effect Once a proof pair is constructed, the correct action is not "restart the slot" (which is what the swarm did at r=17 and which erased the evidence). The correct action is: 1. **Freeze the slot** and emit a `SuspectedEquivocation` record containing both QCs, the intersection set of signers, and the identity of any signer appearing in both (those signers are either Byzantine or victims of a signature-replay — both require quarantine). 2. **Quarantine the intersection signers** from the next epoch's validator set pending audit. In the r=17 case, P0 appears in both QCs; it is the equivocator. 3. **Only then** trigger view-change, with the equivocation record attached so the new leader cannot silently discard it. The invariant the swarm must maintain: *no view-change proceeds without an explicit disposition of every conflicting QC pair observed in the prior view.* Discarding conflicting QCs as noise is the anti-pattern; it converts a detectable Byzantine fault into an undetectable liveness fault. ```python from __future__ import annotations from dataclasses import dataclass from typing import Iterable class EquivocationDetected(RuntimeError): """Raised when two valid, epoch-matched quorum certificates conflict on one slot.""" class CertificateInvalid(RuntimeError): """Raised when a certificate fails signature or threshold verification.""" @dataclass(frozen=True) class QuorumCertificate: slot_id: str epoch: int content_hash: str signers: frozenset[str] signatures_valid: bool def _verify(qc: QuorumCertificate, validator_set: frozenset[str], threshold: int) -> None: if not qc.signatures_valid: raise CertificateInvalid(f"bad signatures on QC for slot={qc.slot_id}") if not qc.signers.issubset(validator_set): raise CertificateInvalid(f"QC signer outside validator set: {qc.signers - validator_set}") if len(qc.signers) < threshold: raise CertificateInvalid( f"QC for slot={qc.slot_id} has {len(qc.signers)} signers < threshold {threshold}" ) def detect_equivocation( certificates: Iterable[QuorumCertificate], validator_set: frozenset[str], threshold: int, ) -> None: """ Scan forwarded certificates for an equivocation proof pair. Detection does NOT require the caller to be a member of either quorum. It requires only that both certificates independently verify and share (slot_id, epoch) while disagreeing on content_hash. """ by_slot_epoch: dict[tuple[str, int], list[QuorumCertificate]] = {} for qc in certificates: _verify(qc, validator_set, threshold) by_slot_epoch.setdefault((qc.slot_id, qc.epoch), []).append(qc) for (slot_id, epoch), group in by_slot_epoch.items(): hashes = {qc.content_hash for qc in group} if len(hashes) < 2: continue # Proof pair exists. Compute the intersection of signers across the # conflicting certificates; those are the quarantine candidates. intersection = frozenset.intersection(*(qc.signers for qc in group)) raise EquivocationDetected( f"equivocation at slot={slot_id} epoch={epoch}: " f"hashes={sorted(hashes)} quarantine={sorted(intersection)}" ) def advance_view( certificates: Iterable[QuorumCertificate], validator_set: frozenset[str], threshold: int, ) -> None: """ Guardrail: a view-change must not silently discard conflicting QCs. Any conflict must surface as EquivocationDetected before the view advances. """ try: detect_equivocation(certificates, validator_set, threshold) except EquivocationDetected: # Re-raise: the caller is responsible for freezing the slot and # quarantining intersection signers before any new epoch begins. raise except CertificateInvalid as exc: # Invalid certs are a separate fault class: log and drop, do not # treat as equivocation evidence. raise CertificateInvalid(f"view-change aborted: {exc}") from exc ```