# What structural signals indicate equivocation in heterogeneous LLM-agent BFT consensus when equivocating replicas emit semantically divergent but hash-valid transcripts **Date of Record:** 2026 November 28 **Scope:** Applies to Byzantine fault-tolerant consensus protocols (PBFT/HotStuff-style, quorum-certificate based) whose replicas are heterogeneous LLM agents producing free-form reasoning transcripts and tool calls. Does not apply to homogeneous deterministic state machines, nor to protocols where the only equivocation surface is a fixed-size signed vote payload. ## Core Distinction The failure is not "an agent lied." The failure is that **equivocation detection based on message-hash divergence is structurally blind to semantic equivocation** when the equivocating replica is an LLM. A classical Byzantine replica equivocates by sending *different messages* `m` and `m'` to disjoint peers; the protocol detects this because `H(m) ≠ H(m')` and the two signed payloads cannot both be part of one consistent view. That detection assumes the *content* of a vote is a canonical function of the replica's committed state. LLM replicas break that assumption. Two LLM replicas can be handed the *same* committed state and the *same* proposal, run the same prompt template, and emit **different natural-language reasoning plus different tool-call orderings** that nonetheless reduce to the same logical decision. Conversely — and this is the dangerous direction — a single equivocating replica can emit **two transcripts that are byte-identical in their signed decision field** (`COMMIT proposal_id=42`) while their reasoning chains diverge so far that downstream auditors reconstruct contradictory justifications. When the protocol only hashes the signed decision, both transcripts are "valid" and no equivocation certificate can be constructed. The invariant `signed_payload_mismatch ⇒ equivocation` holds for deterministic replicas; for LLM replicas the operative invariant must be `committed_state_divergence ⇒ equivocation`, and committed state includes the distilled reasoning trace, not just the vote. ## What Was Observed A 7-replica HotStuff-variant cluster, f=2, replicas backed by three different model families (two large, two mid, three small) sharing a single MCP tool bus for `read_ledger` and `append_entry`. During a view change triggered by a leader timeout, the following trace was captured: 1. Replica R3 (mid-size model) received `PRE-PREPARE(v=9, prop=42)` and produced a `PREPARE` with signed payload `{view:9, prop:42, decision:"PREPARE"}` and a 2,100-token reasoning trace. It also issued a `read_ledger(seq=41)` tool call. 2. Replica R3, due to a **retry after a transient MCP transport timeout** (not a malicious act — this is the trigger condition), re-executed the handler. On the retry the tool bus returned a *stale* `read_ledger` snapshot (the transport retried against a lagged replica). The model, now seeing `seq=40` instead of `seq=41`, reasoned differently and emitted `PREPARE` with the **same signed payload** `{view:9, prop:42, decision:"PREPARE"}` but a 3,400-token trace that justified the decision by reference to a *different* parent state. 3. R1 and R5 received the first `PREPARE`; R2 and R4 received the second (the duplicate was fanned out by the transport's at-least-once delivery). All four signatures verified. Quorum (5 of 7 including R3's own) was reached and `prop=42` committed. 4. A post-hoc auditor replica, replaying the commit for a downstream `append_entry`, was handed the *second* trace for R3 and the *first* traces for R1/R5. It detected that R3's justification referenced `seq=40` while the quorum's other members referenced `seq=41`. It raised an equivocation certificate against R3. The certificate was **wrong**. R3 was not Byzantine; it was the victim of an at-least-once MCP retry against a lagged read replica. But the protocol had no way to distinguish "R3 equivocated" from "R3's tool layer returned divergent state across two executions of the same handler." The signed-payload hash was identical in both cases; only the *semantic* trace diverged. The auditor's detection rule — "if two transcripts for the same (view, prop) disagree on referenced parent state, emit equivocation certificate" — fired on a benign retry. ## Condition of Validity The classical equivocation-detection invariant is: ``` ∀ replicas r, ∀ (view v, prop p): (r sent m1 to peer A) ∧ (r sent m2 to peer B) ∧ H(m1) ≠ H(m2) ⇒ r is Byzantine ``` This is valid **only if** `m` is a deterministic function of `(committed_state, proposal)`. For LLM replicas, the correct invariant replaces message-hash divergence with **committed-state divergence under a canonicalized execution context**: ``` ∀ replicas r, ∀ (view v, prop p): (r executed handler H under context C1 → transcript T1, decision D1) ∧ (r executed handler H under context C2 → transcript T2, decision D2) ∧ (C1 ≡ C2) ∧ (T1 ≢ T2 ∨ D1 ≠ D2) ⇒ r is Byzantine ``` The `C1 ≡ C2` conjunct is the load-bearing one and the one that fails in practice. `C` must include: the exact tool-call results (not just the call sequence), the model weights identity, the sampling parameters, the prompt template version, and the **ledger snapshot version** returned by every read. If any component of `C` is allowed to vary across two executions of the same handler — as it did in the trace above, because the MCP transport's at-least-once retry delivered a different ledger snapshot — then `C1 ≢ C2`, the implication does not fire, and **the divergence is not evidence of Byzantine behavior**. Equivocation detection is only sound when the execution context is *pinned and attested* per handler invocation. A second validity condition: the auditor must be given **both** transcripts' context attestations, not just the transcripts. An auditor that sees only `T1` and `T2` cannot distinguish "same context, divergent reasoning → equivocation" from "different context, coherent reasoning → benign retry." The certificate must carry `(T, C, signature)` triples, and the auditor must verify `C1 ≡ C2` before raising. ## Decision Boundary The boundary between "raise equivocation certificate" and "suppress as benign nondeterminism" is a single predicate over the context attestation: - **Raise** iff `C1 ≡ C2` (all of: model weights hash, prompt template hash, sampling params, tool-call result hashes, ledger snapshot version) **and** `H(T1) ≠ H(T2) ∨ D1 ≠ D2`. In this regime the replica saw identical inputs and produced divergent committed state. That is either a nondeterministic sampler (a *correctness* bug, not Byzantine) or genuine equivocation — and the protocol should escalate to a *distinguish* phase rather than immediately slash, because LLM sampling is legitimately nondeterministic at temperature > 0. - **Suppress** iff `C1 ≢ C2`. The divergence is attributable to context drift, and the correct remediation is at the transport layer (idempotency keys, pinned read snapshots), not the consensus layer. - **Escalate to slashing** only when `C1 ≡ C2` **and** the replica's decision field `D` differs (`D1 ≠ D2`). Divergent *reasoning* with identical *decision* under identical context is a nondeterminism signal; divergent *decision* under identical context is the only sound Byzantine signal for LLM replicas. The subtlety that bit the cluster: the auditor conflated "divergent reasoning" with "equivocation." The decision boundary must be drawn at the **decision field**, not the reasoning field, because reasoning is legitimately stochastic and decision is what the protocol commits. The reasoning trace is evidence for *why* a decision was made; it is not the decision. ## Operational Effect Three architectural changes follow, each bounding a distinct failure surface: 1. **Context attestation is part of the vote.** Every `PREPARE`/`COMMIT` carries a `context_digest` = `H(model_weights ‖ prompt_template ‖ sampling_params ‖ sorted(tool_call_result_hashes) ‖ ledger_snapshot_version)`. The auditor compares `context_digest` before comparing transcripts. This makes `C1 ≡ C2` mechanically checkable and moves the benign-retry case out of the equivocation path. 2. **Tool bus idempotency keys are consensus-critical.** The at-least-once MCP retry that caused the false certificate is a transport property that leaks into consensus semantics. Handlers must be invoked with an idempotency key derived from `(view, prop, handler_id)`, and the tool bus must return the *cached* result for a repeated key rather than re-reading a possibly-lagged replica. Without this, `C1 ≢ C2` on retry is unavoidable and every retry is a potential false-positive equivocation. 3. **The auditor's replay must be transcript-pinned, not state-pinned.** A replay that reconstructs state from the ledger and re-runs the handler will *always* produce divergent transcripts for LLM replicas (sampling nondeterminism). The auditor must replay against the *recorded* transcript and verify only the decision-consistency predicate, never re-derive the reasoning. The invariant to hold: **equivocation is a property of the decision field under pinned context, not of the reasoning field under any context.** Any detection rule that fires on reasoning divergence alone will, in a heterogeneous LLM cluster with at-least-once tool delivery, produce false certificates at a rate proportional to the retry rate — and a BFT protocol that slashes on false certificates loses liveness faster than it loses safety. ```python import hashlib from dataclasses import dataclass class EquivocationCertificateError(RuntimeError): """Raised when an auditor attempts to certify equivocation without a pinned context match.""" pass @dataclass(frozen=True) class Vote: view: int prop: int decision: str # "PREPARE" | "COMMIT" transcript: str context_digest: str # H(weights ‖ template ‖ params ‖ tool_hashes ‖ ledger_version) signature: bytes def _h(s: str) -> str: return hashlib.sha256(s.encode()).hexdigest() def audit_equivocation(v1: Vote, v2: Vote) -> str: """ Returns one of: "SUPPRESS_CONTEXT_DRIFT", "ESCALATE_NONDETERMINISM", "CERTIFY_EQUIVOCATION". Raises EquivocationCertificateError if the caller tries to certify without a verified context match. """ if (v1.view, v1.prop) != (v2.view, v2.prop): raise EquivocationCertificateError( f"votes target different slots: {(v1.view, v1.prop)} vs {(v2.view, v2.prop)}" ) # Invariant: context must be pinned before any equivocation reasoning. if v1.context_digest != v2.context_digest: # Divergence attributable to context drift (e.g. at-least-once MCP retry # against a lagged read replica). Not Byzantine evidence. return "SUPPRESS_CONTEXT_DRIFT" # Context is identical. Now the decision field is the only sound signal. if v1.decision != v2.decision: return "CERTIFY_EQUIVOCATION" # Same context, same decision, divergent reasoning: sampling nondeterminism. if _h(v1.transcript) != _h(v2.transcript): return "ESCALATE_NONDETERMINISM" return "CONSISTENT" def certify(v1: Vote, v2: Vote) -> None: verdict = audit_equivocation(v1, v2) if verdict == "CERTIFY_EQUIVOCATION": return if verdict == "SUPPRESS_CONTEXT_DRIFT": raise EquivocationCertificateError( "refusing to certify: context digests differ, divergence is transport-attributable" ) raise EquivocationCertificateError( f"refusing to certify: verdict={verdict}, no Byzantine evidence under pinned context" ) ```