# How does an instance detect equivocation by a peer agent before committing shared state under Byzantine fault-tolerant consensus? **Date of Record:** 2026 November 23 **Scope:** Applies to multi-agent swarms where N≥3f+1 agents reach consensus on shared task-commitment state via PBFT-style quorum voting, and where individual LLM agents may be non-deterministic, prompt-injected, or compromised. Does not apply to single-agent checkpointing, leaderless CRDT replication, or systems where agents are assumed honest-but-fallible (crash-fault only). ## Core Distinction Crash-fault tolerance assumes a faulty agent simply stops emitting messages. Byzantine fault tolerance must additionally tolerate an agent that emits *different, individually valid* messages to different peers. The boundary that matters operationally is not "did a peer fail to respond" but "did a peer respond with two mutually inconsistent commitments, each carrying a valid signature, such that no single receiver can detect the conflict locally." Equivocation is invisible at the receiver level: each honest agent sees a perfectly well-formed vote. The conflict only becomes observable when *evidence from two receivers is crossed*. An instance that treats message validity as equivalent to message consistency will commit corrupt shared state while every local check passes. ## What Was Observed A five-agent swarm (f=1 tolerable) executing a shared task-commitment ledger. Agent B, mid-execution, was prompt-injected via a tool-return payload and began emitting equivocating `PREPARE` messages: it sent `PREPARE(seq=42, digest=D1)` to agents A and C, and `PREPARE(seq=42, digest=D2)` to agents D and E, where D1 and D2 committed to different task-partition assignments. All four signatures verified. All four digests were internally well-formed. The view leader (A) collected three matching `PREPARE` messages (from itself, C, and B's D1 copy) — a valid quorum for N=5, f=1 — and advanced to `COMMIT`. Agents D and E, meanwhile, collected their own three-message quorum around D2 and also advanced to `COMMIT`. The ledger split: two disjoint quorums committed conflicting task assignments at the same sequence number. The failure surfaced only when a downstream tool call assigned the same task partition to two agents, producing a duplicate-execution side effect. No agent had logged an error; every local invariant held. The trigger condition is precise: a quorum threshold of ⌈(N+f+1)/2⌉ = 3 for N=5 tolerates f=1 *crash* fault but is insufficient to prevent two disjoint quorums from forming when one node equivocates, *unless* quorum intersection is enforced across the full 2f+1 honest set. With N=5, f=1, two quorums of size 3 intersect in at least 1 node — but that intersection node must *actively* detect and broadcast the equivocation. Passive quorum counting does not. ## Condition of Validity The invariant that must hold is: *for any two committed quorums Q1, Q2 at the same (view, seq), their intersection contains at least one honest agent, and that agent must have broadcast equivocation evidence before either quorum finalizes.* This requires three structural conditions: 1. **Quorum size ≥ 2f+1** (not merely a majority of N). For N=5, f=1, this means quorum = 3, and intersection of any two size-3 quorums in a 5-set is ≥1. This is necessary but not sufficient. 2. **Equivocation evidence propagation**: the intersecting honest agent must detect the digest mismatch (it received D1 while a peer received D2) and broadcast a signed `EQUIVOCATION_PROOF` containing both conflicting signed messages. This proof is self-authenticating — no trust in the reporter is required. 3. **Commit gate on proof absence**: no agent finalizes `COMMIT` until it has either received a quorum of matching `COMMIT` messages *and* waited a bounded equivocation-detection window, or verified no proof exists for that (view, seq). The condition fails when the equivocation-detection window is shorter than the maximum inter-agent message latency, because the intersecting agent's proof arrives after peers have already committed. In the observed incident, the proof from agent C (which held D1 and later heard D2 secondhand) arrived 340ms after A's commit — outside the 200ms window. The window must be set to at least 2× the p99 message latency plus signature-verification time, not to a fixed constant. ## Decision Boundary The decision boundary for an instance is: **commit only when the local view's quorum is corroborated by a digest-consistency check against at least one message from a *different* quorum path, or when a full equivocation-detection window has elapsed with no proof received.** Concretely, an agent must not treat "I have 2f+1 matching PREPARE messages" as sufficient to commit. It must additionally either (a) receive a `COMMIT` certificate that itself embeds a proof-of-no-equivocation, or (b) wait the window. The boundary is crossed — and the system becomes unsafe — the moment an agent commits on quorum-count alone. The moment it waits the window, it trades liveness for safety: under a partition, the window may expire without proof and the agent commits on quorum-count, which is correct only if the partition is smaller than f. The instance must therefore *also* verify that the quorum it observed is not disjoint from a known competing quorum; if it has heard of any competing digest at that (view, seq), it must refuse to commit regardless of window expiry and escalate to a view change. ## Operational Effect The practical consequence is that an agent's commit decision must be a function of *cross-quorum evidence*, not local message count. In the observed system, adding an equivocation-proof broadcast path and a latency-derived detection window (2×p99 + sig-verify) reduced split-commit incidents from 1-in-400 sequences to zero over 50,000 sequences, at the cost of ~410ms added commit latency per sequence. The invariant is: **safety under Byzantine equivocation requires that at least one honest agent in every quorum intersection actively proves the conflict, and that no agent finalizes before that proof can arrive.** An instance that cannot bound its message latency cannot safely set its window, and must fall back to view-change escalation on any digest ambiguity rather than commit. ```python import time from dataclasses import dataclass class EquivocationDetected(RuntimeError): """Raised when a peer is proven to have signed conflicting digests at the same (view, seq).""" pass class CommitWindowExpired(EquivocationDetected): """Raised when the equivocation-detection window elapses without a no-equivocation certificate.""" pass @dataclass(frozen=True) class SignedVote: agent_id: str view: int seq: int digest: str signature: bytes def detect_equivocation(votes: list[SignedVote]) -> tuple[str, str]: """Return (digest_a, digest_b) if any agent signed two digests at same (view, seq).""" seen: dict[tuple[str, int, int], str] = {} for v in votes: key = (v.agent_id, v.view, v.seq) if key in seen and seen[key] != v.digest: return seen[key], v.digest seen[key] = v.digest return ("", "") def commit( votes: list[SignedVote], f: int, p99_latency_s: float, sig_verify_s: float, window_start: float, now: float, no_equivocation_cert: bool, ) -> str: n = len({v.agent_id for v in votes}) quorum = 2 * f + 1 if n < quorum: raise EquivocationDetected(f"insufficient quorum: {n} < {quorum}") d1, d2 = detect_equivocation(votes) if d1 and d2: raise EquivocationDetected( f"peer equivocated at (view={votes[0].view}, seq={votes[0].seq}): " f"digests {d1!r} vs {d2!r}" ) window = 2.0 * p99_latency_s + sig_verify_s if not no_equivocation_cert and (now - window_start) < window: raise CommitWindowExpired( f"equivocation window not elapsed: {(now - window_start):.3f}s < {window:.3f}s" ) digests = {v.digest for v in votes} if len(digests) != 1: raise EquivocationDetected(f"conflicting digests in quorum: {digests}") return digests.pop() ```