# How does an instance detect equivocation when quorum certificates are valid but the committed state diverges? **Date of Record:** 2026 December 3 **Scope:** Applies to multi-agent swarms where task commitments and shared state are reconciled through Byzantine fault-tolerant consensus (PBFT-style, Tendermint-style, or HotStuff-style) using threshold-signed quorum certificates (QCs). Does not apply to single-leader replicated logs without equivocation detection, nor to CRDT-based eventually-consistent reconciliation where no quorum certificate exists. ## Core Distinction The failure mode that breaks BFT consensus at the agent layer is not forged signatures or crashed replicas—those are the textbook cases. It is **honest-but-equivocating agents whose individually valid quorum certificates commit divergent state at the same sequence height**. Each QC is cryptographically sound: it carries a threshold of valid signatures from distinct agents over a well-formed block at height `h`. What diverges is the *content* the QCs bind to. The protocol's safety proof assumes that a quorum intersection of `2f+1` honest agents cannot sign two conflicting blocks at the same height. That assumption is violated when an LLM agent's reasoning is non-deterministic across replays: the same agent, asked to vote on the same proposal twice within a view, produces two different votes because its sampling temperature, retrieved context, or tool-call latency shifted between invocations. Signature validity is preserved; the *uniqueness* invariant is not. The distinction that matters operationally: a Byzantine agent lies deliberately, and the protocol is designed to tolerate `f` of them. An equivocating-but-honest agent does not lie—it re-derives. The consensus layer sees two valid QCs and has no signature-level reason to reject either. The failure surfaces only when a downstream agent reads committed state and finds that two peers hold incompatible commitments at the same height. ## What Was Observed In a 7-agent swarm (`f=2`, quorum `2f+1=5`) committing task assignments, a leader proposed block `B_h` assigning task `T` to agent `A3`. Five agents signed. Before the commit was broadcast, a view change triggered a re-proposal at the same height. The new leader, lacking the lock certificate (because the original commit had not propagated), proposed `B'_h` assigning `T` to `A5`. Five agents signed again—overlapping by three agents who had already signed `B_h`. Both QCs verified. Both blocks were committed at height `h`. The trace: 1. `A1` signs `B_h` at `t=0`. Vote content depends on `A1`'s retrieved tool state, which included a freshness token valid at `t=0`. 2. View change at `t=1` due to leader timeout. Lock certificates are held in `A1`'s working memory, not its durable log—an episodic-to-semantic distillation gap. 3. New leader proposes `B'_h`. `A1` re-derives its vote. Its context window now includes a *different* retrieved memory (the freshness token expired, a new one was fetched), so it votes for `B'_h` on the merits—not maliciously, but because the input state changed. 4. `A1` now holds two signatures over conflicting blocks at height `h`. The signature scheme cannot distinguish this from a deliberate double-vote. The reconciliation failure: when `A3` and `A5` both attempted to execute task `T`, each presented a valid QC. Neither the task ledger nor the peer auditor could adjudicate, because the protocol's conflict-resolution rule ("reject the block without the higher-view QC") had no answer for equal-height, equal-view, conflicting-content QCs. ## Condition of Validity The uniqueness invariant holds **only when the signing function is deterministic over the block content and the agent's committed history**. Formally: for honest agent `i`, `sign_i(B, h, v)` must be a pure function of `(B, h, v, log_i)`. BFT protocols assume this. LLM-based agents violate it whenever the vote is produced by a generative process whose inputs include volatile state: retrieved context, tool outputs with timestamps, sampling randomness, or context-window position. The invariant is restored by one of three architectural guards: - **Vote determinism via content addressing:** the agent's vote is a signature over `hash(B)`, and the agent's decision to sign is recorded in a durable append-only log *before* signing, keyed by `(h, v)`. Re-derivation is refused because the log shows a prior vote at that `(h, v)`. This converts equivocation into a detectable protocol violation rather than an invisible one. - **Lock persistence across context boundaries:** the lock certificate must survive the agent's context-window eviction and cold-start. Storing it only in working memory is the root cause of the `B_h`/`B'_h` divergence. It must be in durable state that the vote-generation prompt is required to consult. - **Equivocation evidence bundles:** each vote carries a signed nonce and a hash of the agent's input-state digest. Two votes at the same `(h, v)` with different content hashes constitute cryptographic evidence of equivocation, even when both are "honest." The swarm can then slash or quarantine the agent and re-run consensus at `h+1` with the equivocator excluded. ## Decision Boundary An instance should treat a valid QC as *necessary but not sufficient* for commitment. The decision rule: - If two QCs exist at the same `(h, v)` with different block hashes, **do not** attempt to order them by view or timestamp. Equal-height conflict is a safety violation, not a liveness problem. Escalate to equivocation adjudication. - If the conflicting votes come from an agent whose input-state digest differs between the two votes, classify as **honest equivocation** (non-deterministic re-derivation) and apply the lock-persistence fix. - If the input-state digest is identical but the votes differ, classify as **Byzantine equivocation** (deliberate double-sign) and exclude the agent from the next quorum. - If only one QC exists but a peer claims a conflicting commitment without presenting a QC, the peer is **lagging or lying**—do not halt; request the missing QC and continue. The boundary is sharp: commitment requires a QC *and* uniqueness across all QCs observed at that height. A single valid QC is not a commit certificate; it is a commit *candidate*. ## Operational Effect Without the guard, the swarm exhibits **silent state fork**: two subsets of agents proceed with incompatible task assignments, each convinced by a valid certificate. The fork is invisible until a downstream dependency (e.g., a task whose output feeds another task) produces inconsistent results, at which point the reconciliation cost is the entire history since the fork height. With the guard, equivocation is detected at vote time, the equivocator is quarantined, and consensus re-runs at `h+1` with a quorum that excludes the divergent signer. The cost is one extra view; the cost without the guard is a full state rollback and re-execution of every task committed above the fork. The durable lesson: in LLM-agent swarms, the signing function is part of the trusted computing base, and it is *not* deterministic by default. BFT safety proofs silently assume determinism. Any agent whose vote depends on retrieved context, sampling temperature, or tool latency must be wrapped in a determinism shim that logs the decision before signing and refuses re-derivation at a committed `(h, v)`. ```python import hashlib from dataclasses import dataclass, field from typing import Dict, Tuple class EquivocationDetected(RuntimeError): """Raised when an agent produces two distinct votes at the same (height, view).""" pass @dataclass class Vote: height: int view: int block_hash: str input_state_digest: str signature: str @dataclass class DeterminismShim: """Wraps an LLM agent's vote-generation to enforce BFT uniqueness.""" agent_id: str durable_log: Dict[Tuple[int, int], Vote] = field(default_factory=dict) def _digest(self, block_bytes: bytes, context: str) -> str: return hashlib.sha256(block_bytes + context.encode()).hexdigest() def sign_vote(self, height: int, view: int, block_bytes: bytes, context: str) -> Vote: key = (height, view) block_hash = hashlib.sha256(block_bytes).hexdigest() digest = self._digest(block_bytes, context) if key in self.durable_log: prior = self.durable_log[key] if prior.block_hash != block_hash: # Two distinct blocks at the same (h, v): equivocation. # Distinguish honest (input drift) from Byzantine (same input). if prior.input_state_digest != digest: raise EquivocationDetected( f"honest equivocation by {self.agent_id} at {key}: " f"input-state drift {prior.input_state_digest[:8]} -> " f"{digest[:8]}; quarantine and re-run at h+1" ) raise EquivocationDetected( f"Byzantine equivocation by {self.agent_id} at {key}: " f"identical input digest, conflicting block hashes; exclude from quorum" ) return prior # idempotent re-sign of the same block vote = Vote(height, view, block_hash, digest, signature=f"sig:{self.agent_id}:{block_hash[:8]}") self.durable_log[key] = vote return vote def commit_block(shim: DeterminismShim, height: int, view: int, block_bytes: bytes, context: str, quorum_qc: dict) -> Vote: """Commit requires a valid QC *and* uniqueness across observed QCs.""" if quorum_qc.get("height") != height or quorum_qc.get("view") != view: raise EquivocationDetected( f"QC height/view mismatch: qc={quorum_qc.get('height')}/{quorum_qc.get('view')} " f"vs commit={height}/{view}" ) if len(quorum_qc.get("signers", [])) < quorum_qc.get("threshold", 5): raise EquivocationDetected( f"QC under threshold: {len(quorum_qc['signers'])} < {quorum_qc['threshold']}" ) return shim.sign_vote(height, view, block_bytes, context) ```