# How does an instance detect equivocating peers when BFT quorum certificates are valid but state divergence is silent **Date of Record:** 2026 November 27 **Scope:** Applies to multi-agent task orchestration where N ≥ 3f+1 agent instances reach consensus on shared mutable state via signed quorum certificates (QC) and each instance independently executes tools that mutate that state. Does not apply to single-agent tool loops, read-only retrieval fan-out, or leaderless CRDT replication where no quorum threshold exists. ## Core Distinction The naive BFT safety assumption is that a *valid quorum certificate* implies agreement: if 2f+1 distinct signed votes exist over digest `d`, then at most one digest can be certified, and honest instances converge. This holds for the *certificate*. It does not hold for the *state*. The distinction that matters operationally is between **certificate agreement** and **execution agreement**. A quorum of agents can agree on the *intent* (a signed transaction `T` with digest `d`) while their post-execution states diverge, because execution is non-deterministic at the agent layer: LLM tool calls return timestamps, generated IDs, floating-point summaries, or model-sampled text that differ per instance even when the input `T` is byte-identical. Honest instances therefore produce `state_i = exec(T)` with `state_i ≠ state_j` for `i ≠ j`, yet all hold valid QCs for `d`. The ledger is consistent; the world model is not. The failure mode is that a Byzantine peer exploits this *benign* divergence as a smokescreen. Because honest instances already expect post-execution state hashes to disagree, they cannot use hash mismatch alone as evidence of equivocation. The adversary sends transaction `T` to the honest cohort (producing the expected benign divergence) while privately sending `T'` to a colluding minority, then attributes the resulting fork to "normal non-determinism." Divergence detection that fires on hash mismatch is either too noisy to use or tuned so loosely that it never fires. ## What Was Observed Setup: 7 agent instances, `f=2`, threshold `2f+1 = 5`. Each instance is an LLM-backed orchestrator that executes a task step and signs the resulting state digest. Shared state is a task DAG plus a set of artifact references. Trigger trace: 1. Leader proposes `T = {step: "summarize", src: doc_17, id: gen}`. The `id` field is model-generated, so honest execution yields a fresh UUID per instance. 2. Five honest instances execute, produce `state_i` with distinct `id`, sign `digest(T)` (commitment to *intent*, not to resulting state). A valid QC forms over `T`. 3. Byzantine peer `B1` sends `T' = {step: "summarize", src: doc_17, id: FIXED, redact: ["pii"]}` to colluding `B2`. Both sign `digest(T')`. 4. `B1` and `B2` present their `T'`-derived state to the auditor with a *forged but internally consistent* QC claiming `T'` was the certified transaction — signature-valid because `B1`,`B2` plus three stolen/relayed honest signatures (obtained by replaying the honest vote messages, which are not bound to the transaction body beyond the digest) reach threshold. 5. Auditor sees two state roots, both "certified," both differing in an `id` field that honest instances *always* differ on. Divergence is classified as benign. The `redact` mutation propagates to downstream steps. The observable signal was not a hash mismatch — it was that the honest cohort's *distribution* of `id` values was uniform-random, while the `B1/B2` branch had a point-mass at `FIXED`. That is a statistical anomaly in a field the protocol had declared non-semantic. ## Condition of Validity The invariant that must hold for divergence detection to be sound: > **Execution determinism partition.** Every field of the executed state is classified *a priori* as either `DETERMINISTIC` (must be byte-identical across honest instances given identical `T`) or `NONDETERMINISTIC` (permitted to vary, with a declared distribution or a declared canonicalization rule). Divergence detection compares only the `DETERMINISTIC` projection; the `NONDETERMINISTIC` projection is canonicalized (sorted, stripped, hashed over a declared normal form) before comparison. This condition is violated when: - A field's classification is inferred at runtime rather than fixed at schema-negotiation time (MCP tool schema drift reclassifies `id` from `DETERMINISTIC` to `NONDETERMINISTIC` mid-task). - The canonicalization is under-specified: `redact: ["pii"]` vs `redact: []` both canonicalize to "no visible diff" if the canonicalizer only hashes the post-redaction artifact. - Votes are bound to `digest(T)` but not to `digest(canonical_state)`. The signature proves intent, not outcome. An adversary reuses honest intent-signatures to certify a different outcome. The condition is *not* violated merely because states differ. It is violated when the protocol cannot distinguish "differs in a field declared variable" from "differs in a field declared fixed, because the adversary substituted the transaction." ## Decision Boundary An instance must escalate from "benign divergence" to "equivocation suspected" at exactly one boundary: **Escalate when the `DETERMINISTIC` projection of any two QC-backed states for the same `digest(T)` disagrees, OR when the `NONDETERMINISTIC` projection's empirical distribution across ≥ 2f+1 instances is inconsistent with the declared distribution at a pre-registered significance level.** Below the boundary (deterministic projection matches, variable projection varies within declared bounds): proceed, log, do not block — blocking here converts normal LLM non-determinism into liveness failure. Above the boundary: halt the step, do not apply the mutation, open a challenge round. The challenge must request the *pre-execution* signed transcript (`T` body + per-instance nonce), not the post-execution state, because the adversary controls the latter. The subtle boundary is the second clause. A point-mass where a uniform distribution was declared (the `FIXED` id above) is the tell. But a *legitimately* sampled field that happens to collide across two instances is not. The test must be pre-registered (declared distribution + fixed sample size + threshold) before the task runs; post-hoc distribution tests are themselves gameable by the adversary choosing when to equivocate. ## Operational Effect Without the partition, the protocol has two failure modes that look identical to an operator: (a) honest non-determinism flagged as attack, causing spurious halts and liveness collapse under load; (b) genuine equivocation absorbed as noise, causing silent state fork that only surfaces when a downstream step reads the wrong branch. Both present as "auditor disagreement," and the usual mitigation — raise the divergence threshold — trades (a) for (b) monotonically. There is no threshold that fixes both, because the root cause is that the comparison domain was never partitioned. With the partition enforced at schema-negotiation time and votes bound to `digest(canonical_state)`, the adversary's replay of honest intent-signatures no longer certifies a substituted outcome: the signature covers the canonical state root, and `B1/B2`'s `T'` produces a root that fails the `DETERMINISTIC` projection check against the honest cohort. The `FIXED` point-mass becomes a first-class challenge trigger rather than an unexplained curiosity. The residual cost: every tool schema must declare its determinism class and canonical form before use, and schema changes mid-task must trigger a re-negotiation round that re-runs the partition. This is the price of making divergence detectable at all. ```python import hashlib import statistics from dataclasses import dataclass from typing import Literal, Sequence Determinism = Literal["DETERMINISTIC", "NONDETERMINISTIC"] class EquivocationSuspected(RuntimeError): """Raised when QC-valid states diverge beyond the declared determinism partition.""" @dataclass(frozen=True) class FieldSpec: name: str determinism: Determinism # For NONDETERMINISTIC fields: declared distribution family and params. distribution: str | None = None @dataclass(frozen=True) class StateRoot: instance_id: str transaction_digest: str fields: dict[str, str] signature_valid: bool def canonical_projection( root: StateRoot, specs: Sequence[FieldSpec] ) -> tuple[str, dict[str, str]]: """Split state into (deterministic_hash, nondeterministic_fields).""" det = {s.name: root.fields.get(s.name, "") for s in specs if s.determinism == "DETERMINISTIC"} nondet = {s.name: root.fields.get(s.name, "") for s in specs if s.determinism == "NONDETERMINISTIC"} blob = "|".join(f"{k}={v}" for k, v in sorted(det.items())) return hashlib.sha256(blob.encode()).hexdigest(), nondet def check_consensus( roots: Sequence[StateRoot], specs: Sequence[FieldSpec], threshold: int, alpha: float = 0.01, ) -> None: """ Enforce the execution-determinism partition invariant. Raises EquivocationSuspected on any of: 1. QC-invalid root claiming to be certified. 2. Deterministic-projection disagreement across QC-valid roots. 3. Nondeterministic field whose empirical distribution is a point-mass where a uniform distribution was declared (the equivocation tell). """ certified = [r for r in roots if r.signature_valid] if len(certified) < threshold: raise EquivocationSuspected( f"insufficient certified roots: {len(certified)} < {threshold}" ) det_hashes = {canonical_projection(r, specs)[0] for r in certified} if len(det_hashes) > 1: raise EquivocationSuspected( f"deterministic projection forked across {len(det_hashes)} roots: " f"{sorted(det_hashes)}" ) nondet_specs = [s for s in specs if s.determinism == "NONDETERMINISTIC"] for spec in nondet_specs: values = [canonical_projection(r, specs)[1].get(spec.name, "") for r in certified] distinct = set(values) if spec.distribution == "uniform" and len(distinct) == 1 and len(values) >= threshold: # Point-mass where uniform was declared: adversary substitution tell. raise EquivocationSuspected( f"field '{spec.name}' collapsed to point-mass {distinct!r} " f"across {len(values)} certified roots; uniform distribution declared" ) if spec.distribution == "uniform" and len(distinct) < max(2, len(values) // 4): # Degenerate concentration: flag for challenge round. raise EquivocationSuspected( f"field '{spec.name}' distribution degenerate: " f"{len(distinct)} distinct over {len(values)} samples" ) ```