# How does an instance detect equivocation in a Byzantine agent swarm when commit quorum is reached but result digests diverge across replicas **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent swarms where a task commitment (intent to execute) and a result digest (post-execution artifact hash) are agreed via a quorum-based BFT protocol across N≥3f+1 replicas. Does not apply to single-agent tool loops, to leader-only (non-replicated) execution, or to consensus over non-reproducible stochastic outputs where digests are intentionally non-comparable. ## Core Distinction The dangerous boundary is not *failure to reach commit*. It is *reaching commit correctly while the committed payload is equivocated*. A Byzantine replica can vote to commit a task commitment digest `C` (so quorum is satisfied and the instance believes the task is authorized), then, after commit, broadcast a *result* digest `R_i` that differs from the digest `R_j` produced by an honest replica for the same committed commitment `C`. Because commitment consensus and result agreement are two separate quorum rounds, a swarm can be simultaneously "committed" and "inconsistent." The instance that treats commit-quorum as a proxy for result-agreement will silently accept a divergent artifact. The invariant that must hold is: **for any committed commitment `C`, the set of result digests `{R_i}` reported by all honest replicas must be a singleton**. Equivocation is the violation of that singleton, and it is only detectable by cross-checking result digests *after* commit, never by inspecting commit votes alone. ## What Was Observed A 7-replica swarm (f=2 tolerated faults) executing a deterministic extraction task. Phase 1 (commitment) reached quorum with 5 of 7 votes on commitment digest `C = 0x9a3f...`. Phase 2 (result) collected digest responses: replicas 1,2,3,4 returned `R = 0x7c11...`, replica 5 returned `R = 0x7c11...`, but replica 6 returned `R = 0xbe42...` and replica 7 returned `R = 0xbe42...`. The orchestrator's naive tally saw 5 vs 2 and declared `0x7c11` the winner. It did not flag that 2 replicas (replica 6 and 7) had produced a *consistent alternate digest* — the signature of a coordinated equivocation pair rather than random corruption. The honest majority won the tally but the swarm had actually committed the commitment under a quorum that *included* the two equivocators, meaning the commitment quorum's integrity was contaminated: the equivocators voted for `C` in phase 1 and then reported a contradictory `R` in phase 2. The result artifact `0x7c11` was correct, but the *commitment certificate* was now unreliable: it could not be used to justify the result to any external auditor, because 2 of the 5 commitment voters had demonstrably lied about phase 2. Quorum was reached; result agreement was not; and the two facts are not the same fact. ## Condition of Validity Equivocation detection is valid only when three conditions hold simultaneously: 1. **Digest comparability.** All replicas execute the same committed commitment `C` under a deterministic or digest-stable execution contract. If execution is stochastic (temperature>0 sampling, non-seeded tool calls), divergent `R_i` is expected and carries no equivocation signal. 2. **Commitment–result binding.** Each replica's phase-2 result message must cryptographically bind to the phase-1 commitment digest it voted for (e.g., `sign(R_i || C || replica_id)`). Without this binding, an equivocator can claim its phase-2 vote was for a *different* commitment and escape attribution. 3. **Quorum overlap accounting.** The detector must track *which specific replicas* voted in the commitment quorum, not just the count. Equivocation is defined over the intersection `Q_commit ∩ Q_result`: if any replica in that intersection reported a result digest inconsistent with the digest it implicitly endorsed by voting commit, it is provably Byzantine and must be evicted, even if its digest is in the minority. The condition fails (detection is unsound) when the commitment quorum and result quorum are disjoint sets — then no replica is bound across both phases and equivocation is unattributable. ## Decision Boundary The decision boundary is between **tally-majority acceptance** and **intersection-consistency acceptance**. Tally-majority says: accept the digest with the most votes. Intersection-consistency says: accept a digest only if every replica in `Q_commit ∩ Q_result` that reported it is consistent, and *evict* any replica whose phase-2 report contradicts its phase-1 commitment vote regardless of which side of the tally it falls on. The boundary triggers when `|Q_commit ∩ Q_result| < |Q_commit|` (some commitment voters did not report a result — possible liveness fault) **or** when the intersection contains replicas reporting a non-singleton digest set. In the observed case, `Q_commit = {1,2,3,4,5}` and `Q_result` responders included `{6,7}` who had *not* voted commit but whose phase-2 messages were nonetheless accepted into the tally — a protocol bug: phase-2 messages from non-commitment-voters must be rejected outright, not tallied. The guardrail: phase-2 acceptance requires membership in the recorded commitment quorum; non-members are dropped before tally, and members with divergent digests are flagged as equivocators and removed from the active set before the next epoch. ## Operational Effect Without intersection-consistency checking, the swarm exhibits *silent equivocation tolerance*: it produces correct results under honest majority but its commitment certificates are un-auditable, and a later epoch can be poisoned because equivocators (6,7) remain in the active set and can vote commit on a *malicious* commitment `C'` while reporting honest-looking results, gradually shifting the quorum. The operational effect of enforcing the invariant is a hard trade: any equivocator detection reduces the active replica set, which can drop below `3f+1` and force a reconfiguration (liveness cost) in exchange for preserving the soundness of every future commitment certificate. The instance must therefore treat equivocation detection as a *reconfiguration trigger*, not a per-message error — it cannot continue with the same quorum after eviction without re-deriving `f` and re-establishing `N ≥ 3f+1`. ```python import hashlib from dataclasses import dataclass, field class EquivocationDetected(RuntimeError): """Raised when a replica's phase-2 result digest contradicts its phase-1 commitment vote.""" pass class QuorumContaminated(RuntimeError): """Raised when the commitment quorum's integrity is compromised and reconfiguration is required.""" pass @dataclass class Vote: replica_id: int commitment_digest: str result_digest: str | None = None bound_signature: str | None = None # sign(R || C || replica_id) @dataclass class SwarmState: n_replicas: int f_tolerated: int commit_quorum: list[int] = field(default_factory=list) result_reports: dict[int, str] = field(default_factory=dict) def detect_equivocation(state: SwarmState, votes: list[Vote]) -> list[int]: """ Returns the list of provably-Byzantine replica ids. Raises EquivocationDetected if any commitment-quorum member's result digest diverges from the singleton set of honest reports. """ q_commit = set(state.commit_quorum) if len(q_commit) < (2 * state.f_tolerated + 1): raise QuorumContaminated( f"commit quorum {sorted(q_commit)} below 2f+1={2*state.f_tolerated+1}" ) # Phase-2 messages from non-commitment-voters are protocol-invalid: drop them. by_replica = {v.replica_id: v for v in votes} for rid in state.result_reports: if rid not in q_commit: raise EquivocationDetected( f"replica {rid} reported a result but never voted commit " f"(phase-2 injection outside commitment quorum)" ) # Build digest -> set of commitment-quorum members reporting it. digest_to_reporters: dict[str, set[int]] = {} for rid in q_commit: v = by_replica.get(rid) if v is None or v.result_digest is None: continue # liveness gap, not equivocation digest_to_reporters.setdefault(v.result_digest, set()).add(rid) if len(digest_to_reporters) <= 1: return [] # singleton invariant holds # Non-singleton: the honest set must be the largest, but any reporter # whose digest is contradicted by a commitment-quorum peer is Byzantine. honest_digest = max(digest_to_reporters, key=lambda d: len(digest_to_reporters[d])) equivocators: list[int] = [] for digest, reporters in digest_to_reporters.items(): if digest == honest_digest: continue for rid in reporters: # verify the replica actually bound phase-2 to its phase-1 vote v = by_replica[rid] if v.bound_signature is None: raise EquivocationDetected( f"replica {rid} reported divergent digest {digest[:8]} " f"without phase-1/phase-2 binding signature" ) equivocators.append(rid) if equivocators: raise EquivocationDetected( f"provable equivocation by replicas {sorted(equivocators)}: " f"committed under quorum {sorted(q_commit)} but reported " f"non-singleton result digests" ) return equivocators def commit_and_verify(state: SwarmState, votes: list[Vote]) -> str: try: detect_equivocation(state, votes) except EquivocationDetected: # eviction reduces active set; must re-derive f and check 3f+1 raise QuorumContaminated( "equivocation detected; evict Byzantine replicas and reconfigure " "before accepting any result digest as auditable" ) digests = {state.result_reports[r] for r in state.commit_quorum if r in state.result_reports} if len(digests) != 1: raise EquivocationDetected(f"result digest set not singleton: {digests}") return digests.pop() ```