# How should an instance detect equivocation by a heterogeneous peer before committing shared task state under BFT consensus **Date of Record:** 2026 November 21 **Scope:** Applies to multi-agent swarms where N ≥ 3f+1 heterogeneous LLM instances (different models, prompts, or decoding configs) reach BFT quorum over a shared task-commitment ledger, and where each agent signs/attests to a proposal with a natural-language justification plus a structured vote digest. Does not apply to single-agent tool loops, homogeneous replicated inference with bit-identical outputs, or leader-based Raft-style consensus where only the leader proposes. ## Core Distinction Classical BFT equivocation detection assumes a faulty replica either stays silent or sends *contradictory signed messages* that a receiver can compare byte-for-byte. Heterogeneous LLM agents violate this assumption in a specific way: an equivocating agent can emit **two syntactically distinct but semantically equivalent justification strings** that map to opposite structured votes, and because the vote digest is computed over the *structured* payload while the human/LLM-readable rationale is generated by a non-deterministic decoder, two honest-looking peers can each hold a "valid" attestation from the same signer for opposite outcomes. The failure is not message forgery — the signature is valid in both cases — it is **rationale/digest divergence under non-deterministic justification generation**. Detection therefore cannot rely on signature comparison alone; it requires a semantic-equivalence check across the rationale channel before the vote digest is admitted to the commitment set. ## What Was Observed In a 7-instance swarm (4× model-A at temperature 0.2, 2× model-B at temperature 0.7, 1× model-C as auditor) committing to a shared task-graph mutation, the following trace was captured during a re-proposal round after a leader timeout: 1. Leader L (model-A) times out during `PROPOSE`. View-change to L' (model-B, temperature 0.7). 2. L' broadcasts `PREPARE(task_id=88, mutation=append_node)` with a rationale string R1. 3. Auditor C receives a `PREPARE` for the *same* `task_id=88` from L' with rationale R2, where R2 differs textually ("we should append the node after the checkpoint" vs. "the node should be appended following the checkpoint") but the structured `vote_digest` in the two messages differs: one encodes `APPEND_AFTER_CHECKPOINT`, the other `APPEND_BEFORE_CHECKPOINT`. 4. Both messages carry a valid signature over `(task_id, vote_digest, view_number)`. The signature does **not** cover the rationale string. 5. C, running a rationale-consistency heuristic, flagged the pair as equivocation. But the two model-A peers that received only one message each (R1 and R2 respectively) both accepted their PREPARE as honest, because each saw a single valid signature and a rationale that *semantically matched* the digest it was paired with. 6. Quorum split: 3 agents committed `AFTER`, 2 committed `BEFORE`, 1 abstained (C), 1 (L') was the equivocator. No quorum reached; the task entered `STALLED` at commit phase, and the checkpoint written to shared state was the `AFTER` variant from a *minority* that had already flushed locally. The critical observation: the equivocation was **invisible to signature verification and invisible to local rationale-digest consistency checks**, because each individual message was internally coherent. Only the cross-message semantic comparison at the auditor exposed it — and the auditor's flag arrived *after* two peers had already flushed local state. ## Condition of Validity The invariant that must hold for safe commit is: > For any signer s, task t, and view v, there exists at most one admitted `vote_digest` d such that a message (s, t, v, d, R) is in the local commitment set, **regardless of the rationale string R**, and no local state flush may occur for d until the auditor's cross-message equivalence scan for (s, t, v) has returned `NO_EQUIVOCATION` over the full rationale set received in that view. This holds only when three conditions are jointly satisfied: - **Digest-binding:** the signed payload includes a cryptographic hash of the *normalized* rationale (e.g., canonicalized claim extraction, not raw text), so that two rationales that decode to the same structured claim produce the same hash, and two that decode differently cannot collide. - **Pre-flush audit barrier:** no agent writes to durable shared state until it has either (a) received the auditor's `NO_EQUIVOCATION` attestation for the current (signer, view) tuple, or (b) collected f+1 matching digests from distinct signers for the same (t, v) — the latter is the standard BFT quorum escape hatch that lets progress continue if the auditor is the faulty node. - **Heterogeneity budget:** the temperature/decoding-config spread across the swarm is bounded such that the probability of two honest agents producing semantically divergent rationales for the *same* structured vote is below the equivocation false-positive threshold. In the observed swarm, model-B at temperature 0.7 exceeded this budget; the rationale-normalization step was doing more work than the digest comparison, and it failed silently when the two rationales normalized to different claim graphs. When the heterogeneity budget is exceeded, the auditor's equivalence scan produces false positives (honest agents flagged), which under the pre-flush barrier halts all progress — a liveness failure masquerading as a safety success. ## Decision Boundary The instance must decide, per incoming PREPARE/COMMIT message, between three actions. The boundary is drawn on **whether the rationale hash is bound into the signature and whether the auditor barrier has cleared**: - **Admit and flush:** only if signed payload covers `hash(normalize(R))`, the local commitment set has exactly one digest for (s, t, v), AND either the auditor's `NO_EQUIVOCATION(s, t, v)` is present or f+1 distinct-signer matching digests exist. This is the only path that may write durable state. - **Hold (buffer, do not flush):** if the message is individually valid but the auditor attestation is absent and the f+1 quorum escape has not been met. Buffer in volatile memory with a TTL equal to the view timeout. This is the default for the first f messages of any (s, t, v). - **Reject and escalate to view-change:** if two messages for the same (s, t, v) arrive with different `vote_digest` values and both carry valid signatures — this is *provable* equivocation regardless of rationale, and the signer must be slashed/excluded from the next view. Do **not** attempt to resolve by rationale comparison; the digest mismatch alone is sufficient and rationale comparison is exactly the channel the equivocator exploits. The non-obvious part of the boundary: a *rationale* mismatch with a *matching* digest is **not** grounds for rejection — it is the expected behavior of heterogeneous honest agents and must be normalized away. A *digest* mismatch with matching rationale is the actual equivocation signal. The two must never be conflated, and the pre-flush barrier exists precisely to prevent an agent from conflating them under time pressure. ## Operational Effect After the incident, the swarm was reconfigured with digest-bound rationale hashing and the pre-flush audit barrier. Two measurable effects: 1. **Equivocation latency:** detection moved from "post-flush, at reconciliation" (where the minority `AFTER` checkpoint had already corrupted shared state and required rollback) to "pre-flush, at buffer admission" — the equivocating L' was excluded at message 2 of the view, before any durable write. Rollback cost dropped to zero in the replay. 2. **Liveness cost:** the pre-flush barrier added one auditor round-trip (~180ms median) to every commit, and when the auditor was itself slow, the f+1 quorum escape became the common path. The escape hatch is load-bearing and must be monitored — if it fires more than ~20% of commits, the auditor is a bottleneck and the heterogeneity budget is probably also being exceeded, which reintroduces false-positive halts. The invariant to carry forward: **sign what you normalize, normalize what you sign, and never let a rationale comparison gate a durable write.** Rationales are the equivocator's playground; digests are the only admissible evidence. ```python import hashlib import json from dataclasses import dataclass, field from typing import Dict, Tuple, List class EquivocationError(RuntimeError): """Raised when a signer has emitted conflicting vote digests for the same (task, view).""" pass class RationaleBindingError(RuntimeError): """Raised when a message's signed payload does not bind the normalized rationale hash.""" pass class PreFlushBarrierError(RuntimeError): """Raised when a durable flush is attempted before the audit barrier clears.""" pass @dataclass class SignedPrepare: signer: str task_id: str view: int vote_digest: str # structured, e.g. "APPEND_AFTER_CHECKPOINT" rationale: str # free-text, non-deterministic decoder output rationale_hash: str # hash(normalize(rationale)) -- MUST be in signed payload signature: str # signature over (task_id, view, vote_digest, rationale_hash) sig_covers_rationale_hash: bool @dataclass class CommitmentSet: # (signer, task_id, view) -> admitted vote_digest admitted: Dict[Tuple[str, str, int], str] = field(default_factory=dict) # (signer, task_id, view) -> list of buffered messages awaiting audit buffer: Dict[Tuple[str, str, int], List[SignedPrepare]] = field(default_factory=dict) # (signer, task_id, view) -> auditor attested NO_EQUIVOCATION audit_cleared: set = field(default_factory=set) def normalize(rationale: str) -> str: # Canonical claim extraction: lowercase, strip whitespace, collapse synonyms. # In production this is a deterministic claim-graph extractor, not string munging. return " ".join(rationale.lower().split()) def expected_rationale_hash(rationale: str) -> str: return hashlib.sha256(normalize(rationale).encode()).hexdigest() def admit_prepare(cs: CommitmentSet, msg: SignedPrepare, f: int, distinct_digest_signers: Dict[Tuple[str, int], set]) -> str: key = (msg.signer, msg.task_id, msg.view) # Guard 1: rationale must be bound into the signed payload. if not msg.sig_covers_rationale_hash: raise RationaleBindingError( f"signer={msg.signer} task={msg.task_id} view={msg.view}: " f"rationale_hash not covered by signature" ) if msg.rationale_hash != expected_rationale_hash(msg.rationale): raise RationaleBindingError( f"signer={msg.signer}: rationale_hash mismatch on normalize()" ) # Guard 2: digest-level equivocation is provable and immediate. prior = cs.admitted.get(key) if prior is not None and prior != msg.vote_digest: raise EquivocationError( f"PROVABLE EQUIVOCATION signer={msg.signer} task={msg.task_id} " f"view={msg.view}: admitted={prior} new={msg.vote_digest}" ) # Guard 3: buffer until audit barrier or f+1 quorum escape. cs.buffer.setdefault(key, []).append(msg) audit_ok = key in cs.audit_cleared quorum_ok = len(distinct_digest_signers.get((msg.task_id, msg.view), set())) >= f + 1 if not (audit_ok or quorum_ok): raise PreFlushBarrierError( f"signer={msg.signer} task={msg.task_id} view={msg.view}: " f"buffered, audit barrier not cleared and quorum escape not met" ) # Cross-message rationale scan: only meaningful when audit is pending; # a rationale mismatch with matching digest is NOT grounds for rejection. if not audit_ok: for other in cs.buffer[key]: if other.vote_digest != msg.vote_digest: raise EquivocationError( f"PROVABLE EQUIVOCATION signer={msg.signer} " f"task={msg.task_id} view={msg.view}: " f"{other.vote_digest} vs {msg.vote_digest}" ) cs.admitted[key] = msg.vote_digest return msg.vote_digest def flush_shared_state(cs: CommitmentSet, task_id: str, view: int, f: int, distinct_digest_signers: Dict[Tuple[str, int], set]) -> None: # Durable write is gated on the same barrier; never bypass. if len(distinct_digest_signers.get((task_id, view), set())) < f + 1: raise PreFlushBarrierError( f"task={task_id} view={view}: refusing durable flush without f+1 quorum" ) # ... write to ledger ... ```