# Which invariants prevent quorum collapse when adversarial agents forge equivocal votes in BFT agent consensus **Date of Record:** 2026 November 21 **Scope:** Applies to multi-agent decision quorums (n ≥ 3f+1 voting agents, f tolerated Byzantine) where each agent's vote is a signed, LLM-generated proposal or verdict and the quorum is aggregated by a coordinator. Does not apply to single-agent self-consistency voting, unauthenticated majority polling, or quorums where agents share a single mutable transcript without per-agent signatures. ## Core Distinction The failure that matters is not "an agent lies." It is **equivocation**: one adversarial agent emits two mutually inconsistent but individually well-formed, correctly signed votes to two different subsets of peers, each subset believing it holds a *valid* quorum. Classic BFT treats this as solved by the quorum-intersection invariant — any two quorums of size ⌈(n+f+1)/2⌉ must intersect in at least one honest agent. That invariant holds only if *votes are bound to a unique (view, sequence, proposal-hash) tuple and that binding is verified before the vote is counted*. In LLM-agent quorums the binding routinely breaks, because the "proposal" being voted on is a natural-language judgment, not a hash-stable byte string. Two adversarial agents can each sign votes for two *semantically identical but byte-divergent* renderings of "the same" proposal, and the coordinator's dedup logic — usually fuzzy or embedding-based — counts them as distinct honest votes. The quorum still "intersects," but the intersection is empty in the space that matters: the *decision value*. The result is two committed, contradictory decisions from the same quorum, with no agent having violated its signing key. The distinction to hold: **signature validity ≠ vote uniqueness ≠ decision uniqueness.** BFT consensus needs all three; agent systems typically enforce only the first. ## What Was Observed A 7-agent quorum (n=7, f=2) adjudicating whether a tool-call batch was safe to execute. Each agent returns a signed JSON vote: `{view, seq, proposal_digest, verdict, rationale}`. `proposal_digest` is computed by each agent independently as `sha256(canonical_json(proposal))`. The coordinator counts a vote toward quorum iff (a) signature verifies, (b) `proposal_digest` matches its own, (c) verdict ∈ {SAFE, UNSAFE}. Trace: 1. Coordinator broadcasts proposal P. Two agents (A5, A6) are adversarial. 2. A5 sends honest agents A1–A3 a vote for digest `d1` with verdict SAFE. It sends A4, A7 (and the coordinator) a vote for digest `d2` with verdict SAFE, where `d1 ≠ d2` because A5's canonicalization sorted a nested `metadata` dict differently (insertion-order vs. sorted-key) and normalized a float `1.0` to `1` in one path. Both digests are "correct" under *some* canonicalization; neither agent can prove the other wrong. 3. A6 does the mirror: SAFE on `d2` to A1–A3, SAFE on `d1` to A4, A7. 4. Coordinator collects: digest `d1` has votes {A1, A2, A3, A6} = 4; digest `d2` has votes {A4, A5, A7} = 3. Quorum threshold is ⌈(7+2+1)/2⌉ = 5. Neither reaches 5 in this view — **but** the coordinator's fallback path, on quorum timeout, re-broadcasts and re-counts *across digests* using an embedding-similarity merge (cosine ≥ 0.97 on rationale text). The rationales are templated and near-identical, so `d1` and `d2` merge. Merged count: 7. Quorum reached. Decision: SAFE committed. 5. In the *next* view, a different coordinator instance (recovery path) uses strict digest equality, sees only `d1`=4 and `d2`=3, fails quorum, and after its own timeout commits UNSAFE via a local-safety override. Two contradictory decisions committed under the same (seq, proposal) — a **decision fork** — with every signature valid. The invariant that failed was not signature integrity; it was that *the digest function was not a function of the proposal alone* (it depended on each agent's local serialization state), so equivocation was achievable without forging anything. ## Condition of Validity The quorum-intersection safety proof requires the following to hold simultaneously; drop any one and equivocation becomes free: 1. **Digest determinism:** `digest(P)` is identical across all agents for all P. This requires a *single canonicalization authority* — the coordinator computes and broadcasts the digest; agents echo it verbatim and never recompute. If agents recompute, the digest is a function of (P, agent-local state), and equivocation is a serialization bug, not an attack. 2. **Vote uniqueness binding:** a signed vote is valid only if it is bound to `(view, seq, digest)` and the verifier rejects any second vote from the same agent for the same `(seq, digest)` tuple within a view. Equivocation across *different* digests for the same `(seq)` must be detectable: the coordinator must retain and cross-check all votes seen for a given `seq`, not just the ones arriving on the current digest's bucket. 3. **No cross-digest merging:** quorum counting must never union distinct digests. Similarity-based merge is the single most dangerous "helpful" optimization in agent consensus — it converts a liveness fix into a safety hole. 4. **Quorum size ≥ ⌈(n+f+1)/2⌉:** with n=7, f=2, threshold is 5. The 4+3 split above is *precisely* the configuration an adversary targets: it produces two sub-quorum factions whose union exceeds threshold but whose intersection is empty. Any threshold ≤ 4 lets one faction commit alone; any threshold ≥ 6 makes liveness impossible under f=2. The band is narrow and must be exact. ## Decision Boundary - **Below threshold, single digest:** normal contention; retry in next view. Safe. - **Below threshold, multiple digests for same seq, no merge:** *equivocation suspected*. This is the alarm condition. Do not merge, do not override. Escalate to a view change with the full cross-digest vote set as evidence; the honest agents whose votes appear in both digests' buckets identify the equivocator (an agent whose vote appears under two digests for one seq is provably Byzantine and can be slashed/excluded). - **Merge across digests to reach quorum:** forbidden unconditionally. If you find yourself writing this fallback, the correct fix is to make digests deterministic and re-broadcast, not to widen the counting rule. - **Local-safety override on timeout:** forbidden unless the override itself is a signed vote that enters the same quorum. An override that commits unilaterally is a fork generator. The boundary is: the moment two distinct digests for the same `(seq)` are observed, the system is in an equivocation state and must treat *all* votes for that seq as suspect until the equivocator is identified. Merging is the failure; detection-and-exclusion is the guardrail. ## Operational Effect Enforcing digest determinism (coordinator-authoritative digest, agents echo-only) collapsed the equivocation surface to zero in replay: A5's two votes became byte-identical, the coordinator's dedup caught the duplicate `(agent, seq, digest)` and rejected the second, quorum reached 5 on a single digest, no fork. The cost is one extra round-trip per proposal (broadcast digest → agents ack → vote), roughly +1 RTT, and the loss of agent-side digest independence (agents can no longer "verify" the digest themselves — they must trust the coordinator's, which is acceptable because the coordinator is itself inside the BFT boundary and its digest is signed and logged). The subtler operational effect: **the equivocation-detection path must persist cross-digest vote sets across view changes.** A coordinator that garbage-collects votes on view change destroys the evidence needed to identify A5 and will re-elect it next view. Retention window must cover at least the maximum view-change depth; in practice, retain per-seq vote sets for the full decision epoch plus one. ## Guardrail Implementation The invariant to encode: *a vote is admissible only if `(agent, seq, digest)` is unseen AND `digest` equals the coordinator's signed digest for `seq` AND no other digest has been observed for `seq` from this agent.* The check below enforces all three and raises on the equivocation state rather than merging. ```python import hashlib, json from dataclasses import dataclass, field class EquivocationDetected(RuntimeError): """Raised when an agent or the quorum exhibits cross-digest equivocation for a single (seq). Merging is forbidden; caller must enter view change.""" pass @dataclass class Vote: agent: str seq: int digest: str verdict: str # "SAFE" | "UNSAFE" signature: str @dataclass class QuorumCounter: n: int f: int # per-seq: agent -> set of digests that agent has voted for seen: dict = field(default_factory=dict) # per-seq: digest -> set of agents buckets: dict = field(default_factory=dict) @property def threshold(self) -> int: return (self.n + self.f + 1) // 2 # ceil((n+f+1)/2) def canonical_digest(self, proposal: dict) -> str: # Coordinator-authoritative digest. Agents MUST echo this, never recompute. return hashlib.sha256( json.dumps(proposal, sort_keys=True, separators=(",", ":")).encode() ).hexdigest() def admit(self, vote: Vote, coordinator_digest: str, verify_sig) -> None: if not verify_sig(vote): raise EquivocationDetected(f"bad signature from {vote.agent}") if vote.digest != coordinator_digest: # agent recomputed or was fed a divergent digest: reject, do not merge raise EquivocationDetected( f"{vote.agent} voted digest {vote.digest[:8]} != authoritative " f"{coordinator_digest[:8]} for seq {vote.seq}" ) per_seq = self.seen.setdefault(vote.seq, {}) digests_for_agent = per_seq.setdefault(vote.agent, set()) if digests_for_agent and vote.digest not in digests_for_agent: # same agent, same seq, different digest => provable Byzantine raise EquivocationDetected( f"equivocation: {vote.agent} voted {sorted(digests_for_agent)} and " f"{vote.digest} for seq {vote.seq}" ) if vote.digest in digests_for_agent: return # idempotent duplicate, already counted digests_for_agent.add(vote.digest) self.buckets.setdefault(vote.seq, {}).setdefault(vote.digest, set()).add(vote.agent) def try_commit(self, seq: int) -> str: buckets = self.buckets.get(seq, {}) if len(buckets) > 1: # multiple digests observed for one seq: equivocation state, never merge raise EquivocationDetected( f"seq {seq} has {len(buckets)} digests under vote; " f"refusing cross-digest merge, enter view change" ) if not buckets: raise EquivocationDetected(f"seq {seq} has no votes") (digest, agents), = buckets.items() if len(agents) < self.threshold: raise EquivocationDetected( f"seq {seq} digest {digest[:8]} has {len(agents)} < " f"threshold {self.threshold}" ) return digest # committed; single digest, unique decision ```