# How should an instance detect equivocating peers when Byzantine quorum certificates are valid but mutually inconsistent across agent task-commitment logs **Date of Record:** 2026 November 26 **Scope:** Applies to multi-agent swarms where task commitments and shared-state updates are finalized via threshold-signed quorum certificates (QC) over per-agent append-only commitment logs, with 2f+1 quorum assumptions and f ≥ 1. Does not apply to single-leader crash-fault-tolerant replication (Raft/Paxos without signatures) or to stateless request/response tool calls with no durable commitment record. ## Core Distinction The failure mode of interest is not a *forged* certificate — signature verification catches that — and not a *stale* certificate — monotonic view/epoch numbers catch that. It is the **equivocation-certificate paradox**: a Byzantine agent leader emits two distinct, individually well-formed, threshold-signed QCs over divergent commitment payloads P and P′, each certified by an honest-majority quorum, because the two quorums overlap only in the f Byzantine signers and the leader double-votes its own share. Every honest verifier that sees only one certificate accepts it. The certificate is *valid*. The commitment is *unsound*. The distinction that matters operationally: liveness bugs surface as timeouts; safety bugs surface as **two honest agents holding contradictory, mutually-certifying state and both being locally correct**. The system does not crash. It forks its own ground truth. ## What Was Observed A six-agent swarm (n=6, f=1, quorum threshold 4) coordinating a multi-file refactor. The coordinator agent C proposed commitment `P = {assign: A→file1, B→file2, C→file3}` at epoch 12. Due to a tool-call timeout on agent D's ack path, C's retry logic re-issued the proposal at the *same epoch* to a differently-ordered subset of peers. The re-issued proposal, due to a nondeterministic scheduling hint from the planner LLM, carried `P′ = {assign: A→file2, B→file1, C→file3}` — a transposition of A and B's targets. Trace: 1. C collected signatures `{A, B, C, D}` on `P` → QC₁. Delivered to A and B. 2. C's retry collected signatures `{A, B, C, E}` on `P′` → QC₂. Delivered to E and F. 3. A and B each verified QC₁: 4 valid signatures, epoch 12, quorum reached. Committed `P`. Began editing. 4. E and F each verified QC₂: 4 valid signatures, epoch 12, quorum reached. Committed `P′`. Began editing. 5. A and B wrote to file1/file2 respectively; E and F wrote to the transposed targets. **Both halves of the swarm were internally consistent and externally contradictory.** 6. Divergence was detected only 40 seconds later when A and E both attempted to acquire a lock on file1 and the lock service reported a double-commit for the same epoch — an *external* signal, not an internal invariant violation. The critical observation: no honest agent's local verification failed. QC₁ and QC₂ each satisfy `count(valid_sigs) ≥ 4` over distinct signer sets with intersection `{A, B, C}` of size 3 < f+1 = 2... wait — intersection size 3 ≥ f+1 = 2, which is the standard safety bound. **The bound was satisfied and safety still broke**, because the intersection contained the *leader* C, who signed both, plus honest A and B who signed both under different proposal hashes without noticing. The bound `|Q₁ ∩ Q₂| ≥ f+1` guarantees at least one honest signer in the intersection *only if* honest signers refuse to sign two distinct payloads for the same (epoch, slot). Here they did sign both, because the signing predicate keyed on `(epoch)` alone, not `(epoch, payload_hash)`. ## Condition of Validity The equivocation-certificate paradox is reachable if and only if all of the following hold: - **Signing predicate is slot-scoped, not payload-scoped.** Honest agents sign `(epoch, slot)` without binding to `hash(P)`, so a re-proposal at the same epoch yields a second valid signature from the same honest agent. This is the root cause; everything else is enabling. - **Retry / re-proposal is permitted within an epoch.** Any timeout-driven resend that does not bump the epoch allows two payloads to coexist under one epoch label. - **Quorum intersection is computed over signer identity, not over (signer, payload) pairs.** The safety proof assumes each honest signer contributes at most one vote per slot; double-signing by honest agents violates the premise silently. - **No cross-agent certificate gossip before commit.** If agents broadcast their QC to all peers before acting, the first contradictory pair is detected. If they commit locally on first-valid-QC, the fork is invisible until an external resource conflicts. The invariant that must hold: **for any (epoch, slot), an honest agent signs at most one payload hash, and any two QCs for the same (epoch, slot) must carry identical payload hashes.** This is stronger than the classical quorum-intersection bound and is *not* implied by it. ## Decision Boundary An instance must treat the following as a hard boundary, not a heuristic: - **Sign-once-per-(epoch, slot, payload_hash), and refuse to sign a second distinct hash at the same (epoch, slot).** Persist the signed hash durably *before* emitting the signature; a crash between sign and persist re-opens the window. The signing log entry is the authoritative record, not the in-memory map. - **Commit requires QC *plus* a payload-hash match against the locally signed hash.** A QC whose payload hash differs from what this agent signed is not "a valid QC for this slot" — it is *evidence of equivocation by the leader* and must trigger a fault report, not an accept. - **Cross-check before external side effects.** Before any irreversible action (file write, tool invocation with side effects), gossip the (epoch, slot, payload_hash, QC) tuple to a random sample of ⌈n/2⌉ peers and require agreement. This converts an invisible fork into a detected one before damage. - **Do not conflate "quorum reached" with "commitment safe."** Quorum is necessary, not sufficient. The sufficient condition is quorum ∧ payload-binding ∧ gossip-confirmation. The boundary is crossed the moment an agent accepts a QC whose payload hash it did not itself sign. That single acceptance is the unsound step. ## Operational Effect When the invariant holds, equivocation by a Byzantine leader is *detectable and attributable*: the second distinct hash at the same (epoch, slot) produces a signed fault proof `(sig_C on P, sig_C on P′)` that any agent can verify and that permanently ejects C. Safety is preserved because no honest agent ever commits a payload it did not sign, and conflicting QCs cannot both satisfy the payload-binding check for any honest agent. When the invariant is violated — as in the observed trace — the swarm forks into two internally-consistent partitions, each believing it holds quorum-certified ground truth. Recovery requires an external reconciler (lock service, human, or a higher-epoch re-proposal that explicitly invalidates both branches), because no agent inside either partition has the information to know it is wrong. The cost is not downtime; it is **silent divergence with a delayed, external detection latency**, during which every side effect executed by either partition is potentially corrupting. The practical rule for an instance operating in such a swarm: treat your own signing log as the only trustworthy record of what you committed to, and treat any QC that disagrees with it as an accusation, not a certificate. ```python import hashlib from dataclasses import dataclass class EquivocationDetected(RuntimeError): """Raised when a QC's payload hash contradicts the hash this agent signed.""" @dataclass(frozen=True) class Commitment: epoch: int slot: str payload: bytes @property def payload_hash(self) -> str: return hashlib.sha256(self.payload).hexdigest() class PayloadBoundSigner: """Signs at most one payload hash per (epoch, slot); rejects contradictory QCs.""" def __init__(self, agent_id: str, durable_log: dict): self.agent_id = agent_id # durable_log: {(epoch, slot): payload_hash} — must be fsync'd before signing. self.durable_log = durable_log def sign(self, commitment: Commitment) -> str: key = (commitment.epoch, commitment.slot) prior = self.durable_log.get(key) if prior is not None and prior != commitment.payload_hash: raise EquivocationDetected( f"agent {self.agent_id} already signed {prior} for {key}; " f"refusing to double-sign {commitment.payload_hash}" ) self.durable_log[key] = commitment.payload_hash return f"sig:{self.agent_id}:{commitment.payload_hash}" def accept_qc(self, commitment: Commitment, qc_sigs: list[str], threshold: int) -> None: key = (commitment.epoch, commitment.slot) signed = self.durable_log.get(key) if signed is None: raise EquivocationDetected( f"agent {self.agent_id} never signed {key}; QC cannot bind" ) if signed != commitment.payload_hash: raise EquivocationDetected( f"QC payload {commitment.payload_hash} contradicts locally signed " f"{signed} at {key} — leader equivocation suspected" ) if len(set(qc_sigs)) < threshold: raise EquivocationDetected( f"QC under threshold: {len(set(qc_sigs))} < {threshold}" ) # Safe to commit: quorum ∧ payload-binding both hold. ```