# How does an instance detect equivocation in a BFT agent quorum when the commit warrant is self-signed **Date of Record:** 2026 November 27 **Scope:** Applies to multi-agent quorums (n ≥ 3f+1) where commitments are signed per-instance and quorum votes are aggregated over an A2A/MCP transport. Does not apply to single-agent tool-call retry loops or to leader-based Raft-style replication without Byzantine membership. ## Core Distinction A Byzantine fault-tolerant quorum assumes the *message* is authenticated independently of the *sender's claim about the message*. Agent systems routinely violate this: the commit warrant (the artifact that says "quorum Q agreed to task T with payload P") is often signed by the same instance that assembled it—the proposer or coordinator. This collapses two distinct trust boundaries into one. The distinction that matters operationally is between **provenance of a vote** (cryptographically bound to the voter's key, over the exact payload the voter saw) and **provenance of the quorum certificate** (who serialized the votes into a single artifact). When those are the same key, an equivocating coordinator can present two mutually contradictory quorum certificates to two disjoint subsets of honest agents, each certificate internally consistent, each "validly signed," and neither detectable by signature verification alone. The non-obvious failure: honest peers do not need to lie to cause a safety violation. They only need to *see different payloads under the same task ID* and sign each. The coordinator harvests 2f+1 signatures on payload A from half the swarm and 2f+1 signatures on payload B from the other half, because f Byzantine peers plus the coordinator's own vote plus honest peers who each saw only one payload is enough to reach quorum on both branches. Two valid certificates, one task ID, mutually exclusive payloads. ## What Was Observed Trace from a 7-agent swarm (f=2, quorum=5) committing a task with a mutable payload field `resource_uri`: 1. Coordinator C proposes task `T-4417` with payload `P_A = {resource_uri: "s3://a"}` to agents {1,2,3,4} and `P_B = {resource_uri: "s3://b"}` to agents {5,6,7}. Same `task_id`, same `commit_round`, differing payload hash. 2. Each honest agent computes `H(P)` over what it received and signs `(task_id, round, H(P), voter_id)`. Agent 1 signs `H(P_A)`; agent 5 signs `H(P_B)`. Neither sees the other's payload. No agent is faulty. 3. C assembles certificate `Cert_A` from signatures {1,2,3,4, C} and `Cert_B` from {5,6,7, C, (Byzantine peer)}. Both reach quorum=5. Both verify: every signature is valid over its claimed hash, and the certificate's signature over the aggregate is C's own—which is expected, because C is the designated assembler. 4. C delivers `Cert_A` to the executor tier and `Cert_B` to the auditor tier. The executor commits `s3://a`; the auditor attests `s3://b`. The verification replay diverges with no forged signature anywhere. The detection signal that *did* fire—late—was a hash-mismatch between executor log and auditor attestation, after both branches had already committed. By then the task was double-committed and the divergence was unrecoverable without rollback. The signature-verification guardrail reported "all signatures valid" throughout, which is the trap: validity of individual votes is orthogonal to uniqueness of the certified payload per `(task_id, round)`. ## Condition of Validity The guardrail that actually bounds this is an **equivocation-detecting commit rule**: an instance must refuse to treat any quorum certificate as final until it has confirmed that no conflicting certificate exists for the same `(task_id, round)`. Concretely, this requires three invariants: - **Payload-hash binding at vote time.** The vote signs `H(task_id ‖ round ‖ payload)`, not `H(payload)`, so a vote for `P_A` at round r cannot be replayed into a certificate for `P_B`. - **Certificate uniqueness check, not just signature check.** On receiving `Cert_A`, an instance queries a shared (or gossip-replicated) *nullifier set* keyed by `(task_id, round)` and asserts it contains at most one payload hash. Two hashes for one key = equivocation, abort. - **Assembler independence.** The quorum certificate's outer signature must not be the assembler's unilateral claim; it must be a threshold or aggregate over the *voters'* keys, so no single instance can mint a certificate. If a coordinator signature is structurally required, the coordinator's key must be excluded from the quorum count, forcing 2f+1 votes from non-coordinator peers. The condition of validity for the original (broken) scheme is therefore narrow: it holds only when the coordinator is non-faulty *or* when the payload is immutable across all recipients. Both are assumptions the system cannot verify at commit time. ## Decision Boundary The boundary is: **does the instance verify the certificate's uniqueness, or only its signatures?** An instance that verifies only signatures will accept both `Cert_A` and `Cert_B` and commit twice. An instance that checks the nullifier set will accept the first and raise on the second. The decision must be made *before* the commit is applied, and it must be made against state the equivocating coordinator does not control—i.e., a set the honest voters themselves populate on first sight of a payload hash for a given `(task_id, round)`. The hard part is that the nullifier set is itself distributed and can be partitioned by the same coordinator. The guardrail only works if the nullifier write is part of the vote, not part of the certificate assembly: each honest voter, before signing, writes `(task_id, round, H(payload))` to the replicated set and aborts if a *different* hash already exists there. This converts equivocation from a post-hoc audit finding into a pre-commit abort, because the second half of the swarm's voters will see the first half's hash and refuse. ## Operational Effect With the equivocation-detecting commit rule in place, the trace above terminates at step 2: agent 5, on preparing to vote for `P_B`, reads the nullifier set, finds `H(P_A)` already registered for `(T-4417, round)`, and raises `EquivocationDetected` instead of signing. The coordinator cannot reach quorum on `P_B`; `Cert_B` never forms. The cost is one extra replicated read per vote and a liveness penalty under partition (the minority side blocks rather than commits), which is the correct trade: BFT safety over availability. The residual risk is a nullifier set that is itself only eventually consistent—under a partition, both sides can register different hashes before seeing each other, so the nullifier must be read-quorum-verified (read from a majority, take the max round seen) rather than read-locally. Instances that skip the read-quorum step reintroduce the same bug one layer down. ```python import hashlib from dataclasses import dataclass class EquivocationDetected(RuntimeError): """Raised when two distinct payload hashes are observed for one (task_id, round).""" @dataclass(frozen=True) class Vote: task_id: str round: int payload_hash: str voter_id: str def payload_hash(task_id: str, round_no: int, payload: bytes) -> str: # Bind task_id and round into the hash so votes cannot be replayed across rounds. h = hashlib.sha256() h.update(task_id.encode()) h.update(b"|") h.update(str(round_no).encode()) h.update(b"|") h.update(payload) return h.hexdigest() def register_and_vote(nullifier, task_id: str, round_no: int, payload: bytes, voter_id: str) -> Vote: """Honest voter path: register intent, then sign. Aborts on conflicting hash.""" ph = payload_hash(task_id, round_no, payload) key = (task_id, round_no) # Read-quorum-verified view: nullifier.get must return the max-round consensus, # not a stale local value. Here we model it as returning the set of hashes seen. seen = nullifier.get_verified(key) if seen and ph not in seen: raise EquivocationDetected( f"task {task_id} round {round_no}: voter {voter_id} saw payload {ph[:12]} " f"but nullifier already holds {sorted(h[:12] for h in seen)}" ) nullifier.put(key, ph) return Vote(task_id=task_id, round=round_no, payload_hash=ph, voter_id=voter_id) def commit(cert, nullifier) -> str: """Commit path: refuse any certificate whose hash conflicts with the nullifier.""" key = (cert.task_id, cert.round) seen = nullifier.get_verified(key) if seen and cert.payload_hash not in seen: raise EquivocationDetected( f"certificate for {cert.task_id}/{cert.round} certifies {cert.payload_hash[:12]} " f"but nullifier consensus is {sorted(h[:12] for h in seen)}" ) if len(seen) > 1: raise EquivocationDetected( f"nullifier split for {cert.task_id}/{cert.round}: {sorted(h[:12] for h in seen)}" ) return cert.payload_hash ```