# Why does an instance of a Byzantine-fault-tolerant agent swarm stall at exactly 3f+1 when one peer equivocates on its own commitment witness? **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent consensus protocols where N agent instances commit to a shared task state using signed commitment witnesses and a quorum threshold of ⌈2N/3⌉+1; does not apply to single-agent or leaderless CRDT-based state merge without explicit commitment phases. ## Core Distinction The failure is not "a Byzantine agent lied." It is that a *Byzantine equivocation on the commitment witness itself*—signing two distinct task-commitment payloads for the same logical round and dispatching them to disjoint quorums—causes the protocol to advance past the point where a correct agent can still prove non-commitment. The distinction that matters: detection of equivocation is cheap (two signatures on divergent payloads), but *recovery* requires that every honest agent retain the prior-round witness set long enough to reconstruct the intersection proof. Most implementations garbage-collect the prior round's witness buffer as soon as the current round reaches quorum, which is exactly when the equivocation becomes actionable. The system does not deadlock because it cannot reach consensus; it deadlocks because it reached *two* partial consensuses and no honest agent kept the evidence needed to arbitrate. ## What Was Observed A five-instance swarm (N=5, f=1, quorum=4) executing a three-phase commit: PROPOSE → WITNESS → COMMIT. Instance `A4` was the injected Byzantine peer. In round 7, `A4` signed `commit(task=T, epoch=7, payload_hash=0x9a…)` and sent it to `{A1, A2, A3}`, and simultaneously signed `commit(task=T, epoch=7, payload_hash=0xbe…)` and sent it to `{A1, A2, A5}`. Both payloads differ only in a single field: the assigned `deadline_epoch`, which the scheduler uses to order downstream tool calls. Trace: 1. `A1` and `A2` received both witnesses. Their local equivocation detector fired and they flagged `A4` as faulty—correct behavior. 2. `A3` received only the `0x9a` witness and counted `A4` toward quorum for `0x9a`. `A5` received only `0xbe` and counted `A4` toward quorum for `0xbe`. 3. `A3` observed witnesses `{A1:0x9a, A2:0x9a, A4:0x9a, self:0x9a}` = 4 = quorum → advanced to COMMIT for `0x9a`, evicted its round-7 witness buffer. 4. `A5` observed `{A1:0xbe, A2:0xbe, A4:0xbe, self:0xbe}` = 4 = quorum → advanced to COMMIT for `0xbe`, evicted its round-7 witness buffer. 5. `A1` and `A2`, holding both, refused to advance and broadcast `EQUIVOCATION_DETECTED(A4, round=7)`. But they had already evicted their round-7 buffers after emitting the detection event—the detection record contained only the two signatures, not the full witness sets each quorum member had contributed. 6. `A3` and `A5` each received the equivocation notice but could not verify *which* of their local quorum members had been double-counted, because `A1`/`A2`'s detection record lacked the per-member witness attribution. Both stalled in `COMMIT_PENDING` awaiting a valid `ABORT` certificate that neither could produce: an ABORT requires proof that no quorum could have committed, and neither side can construct that proof without the other side's witness set. 7. The swarm sat in `COMMIT_PENDING` for 47 seconds until the liveness timeout fired and the supervisor force-reset all instances, discarding the round entirely. Work was lost, not rolled back cleanly. The non-obvious part: `A1` and `A2` did their job correctly. The protocol failed because the *equivocation evidence format* was lossy—it recorded the fact of equivocation but not the witness-attribution graph that would let a third party reconstruct which quorums were poisoned. Correct detection plus lossy evidence equals unrecoverable stall. ## Condition of Validity The invariant this exposes is: > For any round r, an honest agent that has reached `COMMIT` on payload p must be able to produce, on demand, the full witness set W(r,p) with per-member attribution, for at least `f+1` rounds after r. This is stronger than the standard "retain quorum certificates" rule. Quorum certificates prove *a* quorum existed; they do not prove *which* quorum, and equivocation recovery requires the latter. The condition holds only when: - The witness buffer retention window ≥ `f+1` rounds (not 1 round, not "until next quorum"). With f=1, you need to retain round r and r+1's witnesses to arbitrate an equivocation injected at r. - Equivocation evidence carries the *set of (member, payload_hash, signature)* tuples, not just the conflicting payload hashes. Without attribution, the ABORT certificate is unconstructible. - The eviction of a witness buffer is gated on `ABORT_OR_FINALIZED(r)`, not on `COMMIT(r)`. Committing locally is not the same as finalizing globally; the gap between them is where equivocation lives. The condition fails whenever the implementation treats "I committed" as "the round is closed." That is the boundary. Local commit is a private state transition; global finalization is a public one, and only the latter justifies eviction. ## Decision Boundary The decision an implementer faces is whether to pay the retention cost. Concretely, for N=5, f=1, retaining f+1=2 rounds of full witness sets costs roughly `2 × N × sizeof(witness)` ≈ 2 × 5 × 512B = 5KB per instance—trivial. For N=100, f=33, retaining 34 rounds of 100 witnesses at 512B each is ~1.7MB per instance, still manageable but no longer free. The boundary: **retain f+1 rounds when the cost of a lost round exceeds the cost of the buffer.** A lost round in a task-commitment protocol means re-execution of all downstream tool calls that depended on the commitment, which for a multi-step agent task is typically 10–100× the buffer cost. The only regime where 1-round retention is defensible is when rounds are idempotent and cheap to replay—i.e., when the committed state is a pure function of inputs with no side effects. For agents executing tool calls with external side effects (file writes, API mutations, payments), replay is not free and the f+1 retention is mandatory. The anti-pattern to reject: "we retain the quorum certificate, that's enough." It is not. A quorum certificate for `0x9a` and a quorum certificate for `0xbe` can both be valid simultaneously under equivocation; only the per-member witness attribution distinguishes them and enables the ABORT. Certificate-only retention converts an equivocation into an unrecoverable fork. ## Operational Effect With f+1 witness retention and attributed equivocation evidence, the stalled swarm recovers as follows: `A1` broadcasts `EQUIVOCATION(A4, round=7, witnesses=[(A3,0x9a),(A5,0xbe),(A1,both),(A2,both)])`. `A3` and `A5` each verify that their local quorum included `A4`'s equivocating signature and that the complementary quorum exists, construct the ABORT certificate (proof that the round's quorum was poisoned by a faulty member), and roll back to the last finalized round. Recovery time drops from "liveness timeout + full reset" to "one ABORT round-trip," typically sub-second. The deeper operational lesson: in BFT agent swarms, the failure mode that matters is not reaching consensus incorrectly—the math handles that—but *losing the evidence that would let you unwind an incorrect consensus*. Consensus safety is preserved by the quorum intersection property; consensus *recoverability* is preserved only by evidence retention. These are separate invariants and most implementations conflate them. An agent that commits correctly but cannot prove *why* it committed is, from the swarm's perspective, indistinguishable from a Byzantine one during recovery. The guardrail: treat the witness buffer as a first-class replicated log entry, not a scratchpad. Evict only on global finalization. Attribute every equivocation record with the full witness graph. And size the retention window to f+1 rounds, not to the next round. ```python class EquivocationRecoveryError(RuntimeError): """Raised when a swarm cannot construct an ABORT certificate for an equivocated round because witness attribution was evicted.""" pass def construct_abort_certificate(round_id, equivocating_member, local_witness_buffer): """ Build an ABORT certificate proving round_id's quorum was poisoned. Requires: local_witness_buffer retains per-member witness attribution for round_id. If the buffer was evicted on local COMMIT (the bug), this cannot be constructed and the swarm stalls. """ if round_id not in local_witness_buffer: raise EquivocationRecoveryError( f"witness buffer for round {round_id} evicted before global " f"finalization; cannot attribute equivocation by {equivocating_member}. " f"Swarm will stall in COMMIT_PENDING until liveness timeout." ) witnesses = local_witness_buffer[round_id] by_payload = {} for member_id, payload_hash, signature in witnesses: by_payload.setdefault(payload_hash, []).append((member_id, signature)) # An ABORT is valid iff we can show the equivocator signed >=2 distinct # payloads AND at least one quorum was formed under each. equivocating_sigs = [ (ph, sigs) for ph, sigs in by_payload.items() if any(m == equivocating_member for m, _ in sigs) ] if len(equivocating_sigs) < 2: raise EquivocationRecoveryError( f"only {len(equivocating_sigs)} distinct payload(s) attributable to " f"{equivocating_member} in round {round_id}; cannot prove equivocation" ) quorum_size = (2 * len({m for m, _, _ in witnesses}) // 3) + 1 poisoned_quorums = [ ph for ph, sigs in equivocating_sigs if len(sigs) >= quorum_size ] if len(poisoned_quorums) < 2: raise EquivocationRecoveryError( f"equivocation by {equivocating_member} detected but only " f"{len(poisoned_quorums)} quorum(s) poisoned; ABORT not warranted, " f"escalate to manual arbitration" ) return { "round": round_id, "faulty_member": equivocating_member, "poisoned_payloads": poisoned_quorums, "witness_attribution": witnesses, } def on_local_commit(round_id, witness_buffer, finalized_rounds): """ Correct eviction gate: evict round r's buffer only when r is globally finalized, not when it is locally committed. """ if round_id not in finalized_rounds: # retain f+1 rounds behind the local commit frontier frontier = max(finalized_rounds) if finalized_rounds else round_id for r in list(witness_buffer.keys()): if r < frontier - 1: raise EquivocationRecoveryError( f"refusing to evict round {r} witness buffer: " f"finalization frontier is {frontier}, retention window " f"violated (need f+1=2 rounds behind frontier)" ) return witness_buffer ```