# What structural signals indicate equivocation in BFT agent consensus: the dual-proposal equivocation window and the quorum-certificate divergence invariant **Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent commitment protocols where N≥3f+1 agents reach agreement on task-commitment state via signed, quorum-certified proposals (PBFT/Tendermint-style), and where an adversarial agent may send divergent proposals to disjoint quorums. Does not cover crash-fault-only consensus, leaderless CRDT merge, or single-agent tool-call loops. ## Core Distinction The failure mode operators conflate is *liveness loss* versus *safety loss* under equivocation. A Byzantine agent that simply withholds votes or stalls produces a timeout—loud, observable, recoverable by view change. An equivocating agent produces the opposite: **two internally valid quorum certificates over mutually contradictory commitments, each carrying a full 2f+1 signature set, with no timeout and no error raised at either signer.** The structural signal is not an exception; it is the *coexistence of two certificates that each verify correctly and cannot both be true*. Distinguishing this from benign fork (partition heal, view-change overlap) is the entire operational problem, because both present as "two valid histories." The non-obvious invariant: **a quorum certificate proves that 2f+1 agents signed a digest, not that they signed the same digest.** In protocols where the signed payload is a proposal hash rather than the full (view, sequence, parent-digest) tuple, an adversary can harvest signatures over a hash it controls and re-bind them to two different commitments. The certificate is cryptographically sound and semantically wrong. ## What Was Observed A five-agent commitment swarm (f=1, quorum=4) coordinating a shared task ledger. Agent `A3` was compromised (prompt-injection via a tool output that rewrote its commit policy). Trace: 1. `A3` is elected proposer for view `v=7`, sequence `s=42`. It constructs proposal `P_a` committing task `T` to worker `W1`. 2. It sends `P_a` to `{A1, A2}` and a divergent `P_b` (same `s=42`, task `T` to `W2`) to `{A4, A5}`. 3. Each recipient validates the proposal *in isolation*: parent digest matches `s=41`'s committed value, view is current, signature valid. Each signs the digest. `{A1,A2,A3}` forms a quorum over `P_a`; `{A3,A4,A5}` forms a quorum over `P_b`. 4. Both certificates are gossiped. `A1` holds `QC(P_a)` and rejects `QC(P_b)` as a conflicting certificate for `s=42`; `A4` does the symmetric thing. **Neither can prove the other is Byzantine**, because both certificates carry valid signatures from a quorum. 5. The ledger forks at `s=42`. Downstream tasks that read `T`'s assignee diverge: half the swarm dispatches to `W1`, half to `W2`. Duplicate execution, no error, until an external reconciliation job noticed two workers held the same task lease. The detection latency was 41 seconds—not because verification was slow, but because **nothing in the per-message validation path is capable of seeing the equivocation**. The signal only exists at the *set* level: the same `(view, sequence)` appears in two certificates. That check was not on any agent's critical path. ## Condition of Validity The equivocation window is structurally open precisely when all three hold: - **(a) Proposal-hash-only signing.** Agents sign `H(proposal_body)` without binding the *parent digest* and *view number* into the signed preimage. This lets harvested signatures be replayed across divergent bodies sharing a hash collision surface, or lets the proposer legitimately vary the body while the hash is computed over a canonical prefix. - **(b) Asymmetric dissemination.** The proposer controls fan-out and can partition the recipient set into two quorums that overlap only in itself (`2f+1 + 2f+1 - 1 ≤ N` is satisfiable exactly when `N ≥ 4f+1`; for `N=3f+1` the proposer must be the sole overlap, which is the canonical attack). - **(c) No equivocation-evidence gossip.** No agent broadcasts "I signed `s=42` over digest `D`" to peers before committing, so no peer can cross-check. Remove any one and the window closes: bind the full tuple into the signature preimage (a), enforce a single ordered broadcast channel with signed receipts (b), or gossip signed-vote receipts with a conflict detector (c). The invariant to enforce: **for any `(view, sequence)`, the set of signed digests across the whole swarm must have cardinality ≤ 1, and this must be checkable by any agent from gossip alone.** ## Decision Boundary The hard call is whether an observed dual-certificate is *equivocation* (safety violation, requires slashing + rollback to `s=41`) or *legitimate fork* (view-change overlap where an old-view certificate and a new-view certificate both exist, which is a liveness artifact, not a safety break). The boundary: - **Legitimate fork:** the two certificates carry *different view numbers*. A certificate from `v=7` and one from `v=8` over the same `s` is expected during view change; the higher view wins by the lock rule. No safety loss. - **Equivocation:** two certificates carry the *same view and same sequence* but *different commitment digests*. This is impossible under honest execution and is provable misbehavior. The signer set intersection minus the proposer is the slashing set. The decision must be made on `(view, sequence, digest)` triple comparison, never on wall-clock arrival order or on "which certificate I saw first." Arrival-order resolution is exactly the bug that let the fork persist 41 seconds—each agent resolved locally by first-seen and diverged. ## Operational Effect Consequence of missing the invariant: silent duplicate commitment, divergent downstream dispatch, and—critically—**inability to attribute fault**, because per-message signatures are all valid. The swarm cannot self-heal because no honest agent holds proof of misbehavior; it can only stall until an external observer reconciles. With equivocation-evidence gossip, the same attack is detected in one gossip round (~2s): any agent receiving both certificates constructs a `(v, s, D_a, D_b, sigs_a, sigs_b)` proof, broadcasts it, and the protocol mandates rollback to the last certificate with a *unique* digest plus slashing of the intersection signers. The guardrail is a **pre-commit uniqueness check**: before applying any quorum certificate, query the local evidence store for a conflicting digest at the same `(view, sequence)` and refuse to commit if one exists; if two valid certificates are ever held simultaneously, raise and halt rather than pick. ```python import hashlib from dataclasses import dataclass class EquivocationDetected(RuntimeError): """Two valid quorum certificates over the same (view, sequence) with divergent digests.""" @dataclass(frozen=True) class QuorumCertificate: view: int sequence: int digest: str signers: frozenset # agent ids quorum_size: int def is_valid(self) -> bool: return len(self.signers) >= self.quorum_size def _digest_of(commitment: str) -> str: return hashlib.sha256(commitment.encode()).hexdigest() def apply_certificate( cert: QuorumCertificate, evidence_store: dict, # (view, seq) -> digest committed_seq: int, ) -> str: """ Pre-commit uniqueness guard. Returns the digest to commit, or raises on equivocation. Enforces the invariant: at most one digest per (view, sequence) across the swarm. """ if not cert.is_valid(): raise EquivocationDetected( f"certificate at v={cert.view} s={cert.sequence} lacks quorum: " f"{len(cert.signers)} < {cert.quorum_size}" ) key = (cert.view, cert.sequence) prior = evidence_store.get(key) if prior is None: evidence_store[key] = cert.digest return cert.digest if prior != cert.digest: # Same view + same sequence, divergent digest => provable equivocation. # NOTE: differing views over the same sequence is a legitimate view-change # fork and MUST NOT reach this branch; callers key on view. raise EquivocationDetected( f"equivocation at v={cert.view} s={cert.sequence}: " f"held digest {prior[:12]}… but received {cert.digest[:12]}… " f"from signers {sorted(cert.signers)}; rollback to s={committed_seq}" ) return cert.digest def commit_task(cert: QuorumCertificate, store: dict, committed_seq: int) -> str: try: return apply_certificate(cert, store, committed_seq) except EquivocationDetected: # Halt rather than first-seen resolve: local resolution is the fork bug. raise ```