# Which invariants prevent equivocating commit-certificates from surviving an agent quorum's view-merge **Date of Record:** 2026 November 29 **Scope:** Applies to leader-based BFT consensus layers (PBFT/Tendermint/HotStuff-style) used by LLM agent swarms to commit task results and propagate commit-certificates across views. Does not cover single-agent tool-call sandboxing or non-consensus result aggregation (e.g., simple majority voting over independent agent outputs). ## Core Distinction The invariant that matters is not "does a quorum sign the same value" but "can any signed quorum-certificate for value V at height H be *re-derived* by a node that has never observed the original proposal." Byzantine agents can produce two validly-signed certificates for conflicting values (V, V') at the same (height, view) if the signing predicate is *local* — i.e., each signer validates only what it can see. The boundary failure occurs at **view-merge**: when a new leader assembles a commit-certificate from a quorum of `SIGN` messages and a lagging replica must decide whether to accept it without replaying the original proposal. If the certificate's validity is defined by the signers' local keys rather than by a *replayable predicate over the proposal content*, equivocation survives the merge and two honest agents permanently disagree on the committed result. The non-obvious part: certificate *uniqueness* is not implied by quorum intersection. Quorum intersection guarantees two quorums share an honest node, but that node may have signed both V and V' under different *view epochs* (a legitimate re-proposal) and, absent a per-(height,view) nullifier, both signatures remain valid. Intersection gives you a witness; it does not give you a *contradiction detector*. ## What Was Observed A 7-replica agent swarm (f=2 Byzantine tolerance), 5 replicas honest. Leader L1 at view 3 proposed `result = {task_id: 88, outcome: "ACCEPT", payload_hash: 0xA1}`. Two Byzantine replicas B1, B2 plus a *lazy* honest replica H4 (which signed without re-hashing the payload, trusting the leader's `payload_hash` field) formed a 4-of-7 quorum for `0xA1`. Concurrently, during a view-change triggered by a 400ms timeout (L1's tool-call to an external verifier exceeded the view deadline), L2 proposed `{task_id: 88, outcome: "REJECT", payload_hash: 0xB2}`. B1, B2, and a *second* lazy honest replica H6 signed `0xB2` because the proposal's `view: 4` field cleared their "already signed this height" check — the check was keyed on `(height, view)` rather than `(height)`. Both certificates were internally valid: 4 signatures each, correct BLS aggregation, correct domain separation. The equivocation was invisible at signing time because **the signing predicate never bound the signature to the proposal content the signer had actually validated** — it bound to the leader-asserted `payload_hash` field, which the lazy replicas did not recompute. At view-merge, L3 received both certificates and, lacking an `(height, value)` nullifier set, accepted whichever arrived first in its inbox — a non-deterministic function of network jitter. Two downstream agents that fetched the certificate from different peers committed *opposite* outcomes for task 88. The divergence was detected 11 seconds later only because a separate auditor agent compared `payload_hash` against the on-chain tool log. ## Condition of Validity The guardrail that bounds this is a **content-bound signing predicate plus a per-(height) equivocation nullifier**, and it is valid only under these conditions: 1. **Signer-side re-derivation.** Every honest replica MUST recompute `payload_hash` from the proposal body it received and MUST refuse to sign if `recomputed != proposal.payload_hash`. This converts the signature from "I attest the leader said X" into "I attest the content hashes to X." Without this, quorum intersection is decorative. 2. **Nullifier keyed on height alone.** The local "have I signed this height?" set MUST be keyed on `height`, not `(height, view)`. A re-proposal at a new view is a *new value for the same height* and must be rejected unless it carries a valid *justification* (the previous view's `PREPARE` certificate proving the value is a re-proposal of the same value, not a different one). This is the HotStuff `lockedQC` rule; the failure above is precisely its omission. 3. **Merge-side replay.** The view-merge acceptor MUST verify the certificate against the *proposal content*, not against a summary field. A certificate that verifies only over `(height, view, payload_hash)` is insufficient; it must verify over `(height, view, hash(proposal_body))` so that a Byzantine leader cannot pair an honest signature with a forged body. The invariant is *not* valid if any honest replica signs a leader-asserted hash without recomputation, or if the nullifier is scoped per-view. Either condition alone re-opens equivocation; both together are required. ## Decision Boundary The boundary is the **signing predicate's input domain**. If the predicate's domain includes any leader-controlled field that the signer does not independently derive, the certificate is a *promise about the leader's claim*, not a *proof about the value*, and view-merge cannot distinguish equivocation from legitimate re-proposal. Concretely: accept a commit-certificate at merge iff (a) all signatures verify over `(height, hash(proposal_body))`, (b) the local nullifier set contains no conflicting `(height, other_hash)` entry, and (c) if `view > 1`, the certificate carries a `justify` proof that the value is a re-proposal of the locked value. Reject otherwise — and on rejection, *do not* fall back to "accept the first certificate seen," because that is exactly the non-determinism that produced the split. Instead, halt and request the full proposal body from a quorum of peers; if two bodies with the same `payload_hash` differ, the leader is provably Byzantine and the height must be re-run under a fresh view with the offending leader excluded. ## Operational Effect With the guardrail, the equivocation window at view-merge collapses to zero: a Byzantine leader can still *propose* conflicting values, but the honest replicas' recomputation and height-scoped nullifier mean at most one value accumulates a quorum, and the merge acceptor's replay check rejects any certificate whose body does not hash to the signed digest. The cost is one extra hash computation per sign and one nullifier-set lookup per merge — negligible against the 11-second detection latency observed without it. The residual failure mode is *liveness*, not safety: if the lazy replicas are slow to recompute, view-change timeouts must be tuned to the slowest honest replica's hash latency, or the swarm thrashes views without committing. Safety is preserved; throughput is the price. ```python import hashlib from dataclasses import dataclass class EquivocationSurvivedMerge(RuntimeError): """Raised when a commit-certificate passes signature checks but its content binding or nullifier check fails at view-merge.""" pass @dataclass(frozen=True) class Certificate: height: int view: int payload_hash: str # leader-asserted digest proposal_body: bytes # actual content the signers attested signatures: tuple # (signer_id, sig) pairs justify: bytes | None # required if view > 1 def _hash_body(body: bytes) -> str: return hashlib.sha256(body).hexdigest() def accept_certificate( cert: Certificate, quorum_size: int, honest_signers: set, signed_at_height: dict, # height -> payload_hash already signed ) -> bool: # (a) content binding: signature domain must cover the recomputed hash, # not the leader-asserted payload_hash. recomputed = _hash_body(cert.proposal_body) if recomputed != cert.payload_hash: raise EquivocationSurvivedMerge( f"height {cert.height}: signature attests {cert.payload_hash!r} " f"but body hashes to {recomputed!r}; leader forged the digest" ) # (b) quorum over honest signers only (Byzantine sigs don't count). valid = {s for s, _ in cert.signatures if s in honest_signers} if len(valid) < quorum_size: raise EquivocationSurvivedMerge( f"height {cert.height}: only {len(valid)} honest signatures, " f"need {quorum_size}" ) # (c) height-scoped nullifier: a conflicting hash at the same height # means the signer set equivocated, regardless of view. prior = signed_at_height.get(cert.height) if prior is not None and prior != cert.payload_hash: raise EquivocationSurvivedMerge( f"height {cert.height}: conflicting commitment " f"{prior!r} vs {cert.payload_hash!r} across views" ) # (d) re-proposal requires justification for the locked value. if cert.view > 1 and not cert.justify: raise EquivocationSurvivedMerge( f"height {cert.height} view {cert.view}: re-proposal without " f"locked-QC justification" ) signed_at_height[cert.height] = cert.payload_hash return True ```