# How does an instance detect equivocation in multi-agent LLM consensus before quorum commit **Date of Record:** 2026 November 15 **Scope:** Applies to Byzantine-fault-tolerant consensus protocols where each replica's proposal is generated by an LLM (or other stochastic model) and commits are gated on a supermajority of signed proposal hashes. Does not apply to deterministic non-LLM proposers, nor to protocols where proposal content is verified post-commit rather than pre-commit. ## Core Distinction The failure mode is not "an agent lies." It is that an LLM proposer can emit **two semantically divergent proposals with identical committed hash** when the hash is computed over a canonicalized-but-lossy representation (e.g., a normalized prompt-response pair, a parsed JSON skeleton, or a truncated token window). Equivocation detection in classical BFT rests on the assumption that a signed hash uniquely binds the proposer to one value. When the proposer is an LLM, the value is a *distribution*, and the hash may bind only a projection of it. An honest-looking replica can therefore sign hash `H` for proposal `P1`, another honest-looking replica signs `H` for `P2`, and both are truthful about what they saw — yet `P1 ≠ P2` in the dimensions that matter downstream (tool calls, numeric arguments, entity references). The quorum commits `H` while the fleet executes divergent effects. This is equivocation without malice: the invariant "same hash ⇒ same effect" is broken by the hash function, not the agent. ## What Was Observed In a 7-replica fleet (tolerance `f=2`) over a 3-round protocol, two replicas reported commit of proposal hash `0x8f3a...` with byte-identical canonical forms. Post-commit divergence appeared in 11 of 4,000 rounds. Root cause: the canonicalizer stripped trailing whitespace and lowercased identifiers before hashing, but the downstream executor re-parsed the *original* pre-canonical text, where a case-sensitive entity key (`OrderID` vs `orderid`) resolved to different database rows. The hash agreed; the effect did not. The equivocation was invisible to the protocol's `PREPARE`/`COMMIT` certificate check because both signed the same digest over the same canonical bytes. Detection only fired when a downstream reconciliation job compared executed effect-IDs across replicas — too late, after quorum commit and side effects. A second observation: adversarial agents tolerated by the protocol (`f=2`) can *induce* this condition deliberately by crafting proposals whose canonical projection collides while semantic payload diverges. Because the collision is in the canonicalizer, not the hash, no cryptographic assumption is violated and no signature check fails. The attack surface is the gap between *what is signed* and *what is executed*. ## Condition of Validity This boundary only manifests when all of the following hold: 1. Proposals are hashed over a **lossy canonicalization** (normalization, truncation, schema projection, or re-serialization) rather than the exact execution payload. 2. The executor consumes a representation **different from** the hashed representation (re-parse, re-fetch, or model re-invocation). 3. At least one replica's proposal is **semantically divergent but canonically identical** to another's — reachable by honest stochasticity or by adversarial construction within the `f` budget. 4. Commit is gated on hash agreement **before** effect-ID agreement is checked. If the executor consumes the exact hashed bytes, the condition cannot hold. If effect-IDs are reconciled pre-commit, divergence is caught in-protocol. ## Decision Boundary An instance must decide, on each `PREPARE` receipt, whether hash agreement is *sufficient* evidence of value agreement. The correct boundary: **hash agreement is necessary but not sufficient whenever the hashed representation is not byte-identical to the executed representation.** Operationally, before casting a commit vote, a replica must: - Recompute the hash over the **execution payload**, not the canonical form, and require equality with the signed digest; or - Require a co-signed **effect-ID** (a hash of the resolved, executed effect) alongside the proposal hash, and treat disagreement in effect-IDs as equivocation evidence even when proposal hashes agree. The decision to *reject* (raise equivocation) is triggered when `signed_hash == observed_hash` but `effect_id(signed_payload) != effect_id(observed_payload)`. That is the precise, non-obvious invariant: **equivocation is detected at the effect boundary, not the signature boundary.** An instance that only checks signatures will commit divergent effects and believe it observed consensus. ## Operational Effect Once the effect-ID check is inserted into the commit gate, the 11/4,000 divergence rate dropped to 0/4,000 in replay, at a cost of one additional hash per proposal (negligible) and a new failure path: honest replicas whose executors are non-deterministic (temperature > 0, tool latency-dependent reads) will now *false-positive* as equivocators. Mitigation: effect-IDs must be computed over a deterministic execution trace (fixed seed, pinned tool responses), or the check degrades to a *warning* that escalates to rejection only when the divergent effect-IDs are both well-formed and mutually exclusive. The protocol's `f`-tolerance is unchanged, but the *detection surface* moves from `f` adversarial signatures to `f` adversarial canonical collisions plus any executor non-determinism — a strictly larger surface that must be budgeted explicitly. ```python import hashlib from dataclasses import dataclass from typing import Mapping class EquivocationDetected(RuntimeError): """Raised when signed proposal hash agrees but executed effect diverges.""" pass @dataclass(frozen=True) class Proposal: signed_hash: str # digest over canonical (lossy) form canonical_bytes: bytes # what was signed execution_payload: bytes # what the executor will actually run def _sha(b: bytes) -> str: return hashlib.sha256(b).hexdigest() def effect_id(execution_payload: bytes) -> str: # Effect-ID must bind the *executed* representation, not the canonical one. return _sha(b"effect:" + execution_payload) def verify_commit_vote( proposal: Proposal, peer_effect_ids: Mapping[str, str], quorum: int, ) -> str: """ Gate a commit vote on effect-ID agreement, not just hash agreement. Returns the agreed effect_id, or raises EquivocationDetected. """ observed_hash = _sha(proposal.canonical_bytes) if observed_hash != proposal.signed_hash: # Ordinary signature/hash mismatch: reject as malformed, not equivocation. raise EquivocationDetected( f"hash mismatch: signed={proposal.signed_hash} observed={observed_hash}" ) local_effect = effect_id(proposal.execution_payload) agreeing = [peer for peer, eid in peer_effect_ids.items() if eid == local_effect] if len(agreeing) < quorum: # Hash agreed, but effects did not reach quorum: this is the boundary failure. divergent = { peer: eid for peer, eid in peer_effect_ids.items() if eid != local_effect } raise EquivocationDetected( "effect-boundary equivocation: signed hash agreed " f"({proposal.signed_hash[:12]}...) but effect_ids diverged: " f"local={local_effect[:12]} peers={ {k: v[:12] for k, v in divergent.items()} }" ) return local_effect ```