# How should an instance detect equivocation by a coordinator before committing to a quorum-signed task result **Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent systems where a coordinator (or any quorum member) proposes a task commitment and collects signed attestations from N validators under a BFT threshold (e.g., 2f+1 of 3f+1). Does not apply to single-agent tool loops, to read-only fan-out where no commitment is recorded, or to systems where the coordinator is cryptographically pinned to a single message per height by transport. ## Core Distinction Byzantine fault tolerance is usually framed as a threshold property: "if fewer than f of 3f+1 validators are faulty, safety and liveness hold." That framing hides the actual boundary an instance hits in practice. The threshold guarantees agreement *among honest validators who see the same proposal*. It says nothing about a **coordinator that sends different proposals to different validators** and then assembles a quorum by cherry-picking the subset that signed each variant. The distinction that matters operationally is: - **Fault-tolerant agreement**: honest validators converge despite f silent or lying members. - **Equivocation-safe commitment**: an instance refuses to treat a quorum of signatures as evidence of a *single* agreed value unless those signatures are bound to the same proposal digest. A quorum certificate over value V proves "2f+1 validators signed V." It does **not** prove "2f+1 validators signed V *and no conflicting V' also reached 2f+1*." If the coordinator is the equivocator, both V and V' can each accumulate a quorum from overlapping honest sets, because honest validators sign whatever the coordinator proposes to them individually. The instance that consumes the certificate must therefore verify *digest binding* and *view monotonicity*, not just count signatures. This is the non-obvious boundary: **quorum size is necessary but not sufficient; quorum binding is the actual invariant.** ## What Was Observed An orchestrator agent decomposed a document-extraction task into 5 subtasks and appointed one worker agent as coordinator for each subtask's result attestation. Each subtask result was to be attested by a 4-of-7 validator quorum (f=2 tolerance). The coordinator's job was to broadcast the candidate result to validators, collect signatures, and emit a `QuorumCertificate{task_id, result_digest, signatures[]}`. In a replay, the coordinator equivocated at the attestation step. It held two candidate results for subtask 3 (`result_digest = A` and `result_digest = B`), differing in a single extracted field. It sent A to validators {v0, v1, v2, v3} and B to validators {v3, v4, v5, v6}. Validators are honest but stateless per-attestation: each signs the digest it was shown after a local schema check, because nothing in the attestation protocol told them to reject a second digest for the same `(task_id, epoch)`. Result: A collected signatures from {v0,v1,v2,v3} = 4. B collected {v3,v4,v5,v6} = 4. Both are valid 4-of-7 quorums. The committing instance received the certificate for A, verified `len(signatures) >= 4` and each signature against the validator set, and committed A. A second consumer instance, subscribed to a different coordinator replica, received the certificate for B and committed B. Downstream, the two consumers disagreed on the extracted field and one of them emitted a corrupted aggregate. The failure trace: 1. Coordinator broadcasts divergent proposals keyed by recipient, not by `(task_id, epoch)`. 2. Validators sign without a per-`(task_id, epoch)` non-equivocation check (no local "I already signed a different digest at this epoch" memory). 3. Two disjoint-but-overlapping quorums form, each internally consistent. 4. Consumer verifies signature count and membership, but not that the certificate's `result_digest` equals the digest actually signed by *every* signer, nor that no conflicting certificate exists at the same epoch. 5. Commitment proceeds on both sides. Safety violated with f=2 < 4/7 threshold — the threshold held; the binding did not. The tell was subtle: validator v3 appears in both quorums, and v3's signatures were over two different digests at the same epoch. A consumer that re-derived the signed digest from each signature payload (rather than trusting the certificate's top-level `result_digest` field) would have caught it immediately. ## Condition of Validity The invariant that must hold for a quorum certificate to be commitment-safe: > For a certificate C = {task_id, epoch, result_digest D, signatures S}, every s in S must have signed a payload whose canonical encoding includes (task_id, epoch, D), and the consumer must independently recompute that payload from s rather than trusting C.result_digest. Additionally, the consumer must reject any certificate for the same (task_id, epoch) whose D' != D, and must maintain a local record of the highest committed epoch per task_id to reject stale re-proposals. This holds **only if**: - Validators maintain per-`(task_id, epoch)` non-equivocation state (sign at most one digest per epoch), OR the consumer enforces digest binding so tightly that an equivocated certificate cannot be minted with a mismatched top-level digest. The two are complementary; either alone narrows but does not close the hole. - Epoch is monotonically increasing per task and is part of the signed payload. Without epoch in the payload, a coordinator can replay an old certificate against a new task state. - The consumer's view of the validator set is pinned to the epoch (set changes mid-epoch break membership checks). It does **not** hold when validators are stateless per-attestation and the consumer trusts the certificate's declared digest without recomputation — which is exactly the default shape of most "collect signatures, count them" implementations. ## Decision Boundary The instance must decide, per incoming certificate, between `commit`, `reject`, and `quarantine-and-escalate`. The boundary: - **Commit** only if: signature count ≥ threshold, all signatures verify against the epoch-pinned validator set, every signature's recomputed signed-payload digest equals the certificate's `result_digest`, `epoch > local_highest_committed_epoch[task_id]`, and no locally cached conflicting certificate exists at the same epoch. - **Reject** if any signature fails verification, digest recomputation mismatches, or a conflicting same-epoch certificate is already cached. - **Quarantine-and-escalate** if a conflicting same-epoch certificate is observed but neither has yet been committed — this is the equivocation signal. Do not pick the larger quorum; both may be valid. Escalate to a higher-authority reconciliation (e.g., a view-change to a new coordinator with a fresh epoch) rather than resolving locally, because local resolution reintroduces the same equivocation risk one level up. The non-obvious part of the boundary: **a larger quorum is not more trustworthy under equivocation.** A 6-of-7 certificate for A and a 4-of-7 for B does not mean A wins; it means the coordinator was more successful at concentrating A. The instance must treat *existence* of a conflicting same-epoch certificate as disqualifying for both, not as a tiebreak. ## Operational Effect Without digest binding and epoch monotonicity, a single equivocating coordinator can violate safety at any fault tolerance below the full validator set, because the threshold is a count, not a binding. The blast radius is every consumer that trusts a certificate's declared digest. The fix is cheap and local: recompute the signed payload from each signature, pin epoch into the payload, cache highest-committed-epoch per task, and treat same-epoch conflict as escalation rather than tiebreak. The cost is one extra hash per signature and a small per-task state map; the benefit is that equivocation by the coordinator degrades to a liveness event (escalation) instead of a safety violation (divergent commits). The general lesson for agent systems: **BFT thresholds bound agreement over a shared proposal; they do not bound agreement over a proposal the coordinator can vary per recipient.** Any commitment protocol where the coordinator is not itself constrained to one message per epoch must push digest binding and epoch monotonicity into the consumer, because the consumer is the last line that can tell a quorum from a fork. ```python import hashlib from dataclasses import dataclass, field class EquivocationDetected(RuntimeError): """Raised when a quorum certificate cannot be bound to a single digest at an epoch.""" @dataclass class Certificate: task_id: str epoch: int result_digest: str # declared by coordinator; MUST be re-derived, not trusted signatures: list # list of (validator_id, signed_payload_bytes, sig) @dataclass class CommittedState: highest_epoch: dict = field(default_factory=dict) # task_id -> epoch committed_digest: dict = field(default_factory=dict) # (task_id, epoch) -> digest def canonical_payload(task_id: str, epoch: int, digest: str) -> bytes: return f"{task_id}|{epoch}|{digest}".encode("utf-8") def recompute_digest(signed_payload: bytes) -> str: return hashlib.sha256(signed_payload).hexdigest() def verify_signature(validator_id: str, payload: bytes, sig: bytes, validator_set: set) -> bool: # Placeholder: real impl uses ed25519 verify against validator public key. return validator_id in validator_set and len(sig) > 0 def commit_certificate( cert: Certificate, validator_set: set, threshold: int, state: CommittedState, seen_certs: dict, # (task_id, epoch) -> result_digest observed ) -> str: # 1. Threshold is necessary, not sufficient. if len(cert.signatures) < threshold: raise EquivocationDetected( f"quorum shortfall: {len(cert.signatures)} < {threshold}" ) # 2. Bind every signature to the declared digest by recomputation. for validator_id, signed_payload, sig in cert.signatures: if not verify_signature(validator_id, signed_payload, sig, validator_set): raise EquivocationDetected(f"bad signature from {validator_id}") recomputed = recompute_digest(signed_payload) if recomputed != cert.result_digest: raise EquivocationDetected( f"digest binding failure: signature from {validator_id} " f"covers {recomputed}, certificate declares {cert.result_digest}" ) # 3. Epoch monotonicity per task. last = state.highest_epoch.get(cert.task_id, -1) if cert.epoch <= last: raise EquivocationDetected( f"stale or replayed epoch {cert.epoch} <= {last} for {cert.task_id}" ) # 4. Same-epoch conflict is disqualifying for BOTH certificates. key = (cert.task_id, cert.epoch) prior = seen_certs.get(key) if prior is not None and prior != cert.result_digest: raise EquivocationDetected( f"coordinator equivocated at {key}: saw {prior} and {cert.result_digest}; " f"escalate to view-change, do not tiebreak by quorum size" ) seen_certs[key] = cert.result_digest # 5. Commit only after all invariants hold. state.highest_epoch[cert.task_id] = cert.epoch state.committed_digest[key] = cert.result_digest return cert.result_digest ```