# What structural signals indicate equivocation in LLM-agent BFT consensus before commit finality **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent decision systems where N≥3 LLM instances reach commit consensus over shared state via a BFT-style quorum (PBFT/Tendermint-family) with probabilistic proposers and free-text vote payloads. Does not apply to single-agent tool loops or to crash-fault-tolerant (CFT) quorums where agents are assumed honest. ## Core Distinction Classical BFT assumes a faulty replica sends *contradictory but well-formed* messages: two distinct values signed under the same view. The detection primitive is exact-match on message digests. LLM agents violate this assumption structurally: a Byzantine agent does not need to forge anything. It can emit two *semantically equivalent but lexically distinct* proposals — "commit state S with field `retries=3`" and "commit state S with `retries: three`" — that hash to different digests, pass signature verification, and cause honest replicas to split across two prepared certificates for what is, in intent, the same decision. Equivocation here is not a cryptographic event; it is a *semantic divergence* that the digest layer cannot see. The boundary invariant that fails is: **quorum agreement on a digest does not imply agreement on the state the digest denotes.** This is the distinction between *syntactic finality* (2f+1 matching hashes) and *semantic finality* (2f+1 agents that would produce the same post-commit state), and only the latter is what a shared-state system actually needs. ## What Was Observed In a 7-replica deployment (f=2 tolerance, quorum 5) running a shared task ledger, a single compromised proposer in view v=3 emitted a `PRE-PROPOSE` whose payload was a JSON object with key ordering permuted relative to the canonical serializer used by 4 of the 7 replicas. The proposer's payload was valid JSON and passed schema validation. Three honest replicas using the canonical serializer computed digest `D1`; two honest replicas using insertion-order preservation computed `D2`; the two Byzantine replicas voted for whichever digest maximized split. Result: 3 votes for `D1`, 2 for `D2`, 2 withheld — no digest reached the 5-vote quorum, so the view timed out and a new proposer was elected. On the surface this looks like a benign liveness failure (view change, retry). The actual damage occurred in the *recovery path*: during the view change, replicas exchanged `PREPARED` certificates, and the two honest `D2` replicas had locally persisted a ledger entry with `retries: "three"` (string) while the `D1` group had persisted `retries: 3` (integer). Both entries were marked `prepared`, neither `committed`. The new proposer, sampling the union of prepared certificates, selected the `D1` value as the safe proposal (correct under PBFT's "highest view prepared" rule) — but the `D2` replicas, on receiving the re-proposal, compared it against their *local* prepared value, found a digest mismatch, and correctly refused to `PRE-COMMIT`. The system deadlocked across three consecutive view changes because no single view could assemble a quorum whose local prepared-state agreed on a digest. The structural signal that predicted this — visible in telemetry *before* the first timeout — was a **digest-diversity spike at constant semantic content**: the number of distinct digests observed per logical proposal exceeded 1 while the count of distinct `(task_id, decision_id)` pairs remained 1. No existing alert fired, because every individual replica saw a single well-formed proposal and a consistent local view. ## Condition of Validity The failure is bounded by two conditions, and only fires when both hold: 1. **Non-canonical serialization at the proposal boundary.** If every replica derives the digest from a single canonical form (deterministic key ordering, normalized numeric types, stripped whitespace), semantic-equivalent payloads collapse to one digest and equivocation-by-formatting is impossible. The invariant is: `digest(proposal) == digest(canonicalize(proposal))` for all honest replicas, enforced at the signing step, not the validation step. 2. **Free-text or schema-loose vote payloads.** If the committed value is a structured object with a closed schema and a total ordering over field values, the space of semantically-distinct-but-syntactically-equal encodings is empty. The failure requires that the agent's output space admit multiple valid serializations of the same intent — which is precisely the case for LLM-generated JSON, tool-call arguments, and natural-language rationale fields. When either condition is absent, the mechanism does not apply: canonical serialization collapses the attack surface, and schema-strict values eliminate the ambiguity. The dangerous regime is the intersection — LLM proposers (free-form output) plus BFT consensus (digest-based agreement) without a canonicalization gate. ## Decision Boundary The operational rule is a **pre-commit semantic quorum check**, not a post-commit reconciliation. Concretely: - **Reject on digest diversity at constant semantic identity.** If, within a view, the set of observed proposal digests for a single `(task_id, decision_id)` has cardinality > 1 while the semantic identity count is 1, treat the proposer as equivocating and force an immediate view change *without* accepting any prepared certificate from that view. Do not attempt to reconcile; the reconciliation itself is where the divergent prepared-state leaks into the next view. - **Canonicalize before signing, verify after.** The digest must be computed over a canonical byte string produced by a deterministic serializer that is byte-identical across all replicas. Sign the canonical form; reject any inbound proposal whose canonical form does not re-serialize to the same bytes. This is a hard gate, not a warning. - **Semantic finality is the commit condition.** A value is committed only when 2f+1 replicas report *both* matching digests *and* matching post-application state hashes (the state after applying the proposal to local ledger). Digest agreement alone is insufficient; the state-hash agreement is the semantic quorum. - **Bound the prepared-certificate set on view change.** The new proposer must select from prepared certificates whose state hashes agree with the majority state hash, not merely the highest view. A prepared certificate with a divergent state hash is quarantined, not propagated. The boundary between "retry the view" and "halt the cluster" is the digest-diversity signal: a single divergent digest is a formatting bug (retry); a divergent digest *with* a divergent state hash in the prepared set is equivocation (halt and quarantine the proposer's identity). ## Operational Effect With the canonicalization gate and the semantic-quorum check in place, the observed failure mode is converted from a three-view deadlock (mean recovery ~47 seconds, two divergent ledger entries requiring manual reconciliation) into a single rejected proposal at the signing boundary (recovery ~200ms, zero divergent entries). The cost is a canonical serializer on the hot path — roughly 0.3ms per proposal at the observed payload sizes — and a state-hash computation per commit, which dominates at ~4ms for a 2KB ledger delta. The trade is favorable: the deadlock path cost 47 seconds and a manual reconciliation, the guardrail costs 4ms. The residual risk is a Byzantine agent that equivocates *semantically* rather than syntactically — emitting two proposals that canonicalize to different bytes but denote different intents (e.g., `retries=3` vs `retries=5`). This is not detectable by digest diversity; it requires the semantic-quorum state-hash check to catch, and it is the reason state-hash agreement, not digest agreement, must be the commit condition. An agent that can produce two *intent-distinct* proposals under the same `decision_id` is indistinguishable from an honest agent that changed its mind, and the only defense is the 2f+1 state-hash quorum — which is exactly the invariant the original system lacked. ```python import hashlib import json from dataclasses import dataclass, field from typing import Any class EquivocationDetected(RuntimeError): """Raised when a proposer emits divergent digests for a single semantic decision.""" pass class SemanticQuorumFailure(RuntimeError): """Raised when digest quorum is reached but state-hash quorum is not.""" pass def canonicalize(payload: dict[str, Any]) -> bytes: # Deterministic: sorted keys, no whitespace, normalized scalars. return json.dumps(payload, sort_keys=True, separators=(",", ":"), default=str).encode("utf-8") def digest(payload: dict[str, Any]) -> str: return hashlib.sha256(canonicalize(payload)).hexdigest() def state_hash(ledger_delta: dict[str, Any]) -> str: return hashlib.sha256(canonicalize(ledger_delta)).hexdigest() @dataclass class Proposal: task_id: str decision_id: str payload: dict[str, Any] ledger_delta: dict[str, Any] @dataclass class Vote: replica_id: str digest: str state_hash: str def pre_commit_check( proposal: Proposal, votes: list[Vote], quorum: int, ) -> str: # Signal 1: digest diversity at constant semantic identity. distinct_digests = {v.digest for v in votes} if len(distinct_digests) > 1: raise EquivocationDetected( f"proposer equivocation on {proposal.task_id}/{proposal.decision_id}: " f"{len(distinct_digests)} distinct digests observed" ) # Signal 2: digest quorum reached but state-hash quorum not. expected_digest = digest(proposal.payload) if expected_digest not in distinct_digests: raise EquivocationDetected( f"proposal digest {expected_digest} absent from vote set" ) matching = [v for v in votes if v.digest == expected_digest] if len(matching) < quorum: raise SemanticQuorumFailure( f"digest quorum short: {len(matching)}/{quorum}" ) expected_state = state_hash(proposal.ledger_delta) state_agree = [v for v in matching if v.state_hash == expected_state] if len(state_agree) < quorum: raise SemanticQuorumFailure( f"state-hash quorum short: {len(state_agree)}/{quorum}; " f"semantic finality not achieved despite digest agreement" ) return expected_digest def commit(proposal: Proposal, votes: list[Vote], quorum: int) -> str: committed_digest = pre_commit_check(proposal, votes, quorum) # Only now is the ledger delta applied; prior to this, no replica mutates state. return committed_digest ```