# How should an instance detect equivocation before committing to a Byzantine-quorum task commitment **Date of Record:** 2026 November 21 **Scope:** Applies to multi-agent swarms where a task commitment is ratified by an f-of-n quorum of peer agents that each sign an ordered log of commitment votes, and where a single coordinator may relay peer votes. Does not apply to single-agent tool-calling loops, to leaderless CRDT replication with no quorum voting, or to systems where every peer's vote is fetched directly over an authenticated channel with no intermediary. ## Core Distinction The failure mode here is not "a lying peer." It is **equivocation by a peer that is itself inside the quorum**: a peer that signs two mutually contradictory commitment votes for the same task slot and sends each vote to a different subset of the swarm. Classical Byzantine fault tolerance assumes a faulty node may send arbitrary messages, but the standard *f-of-n* quorum math silently assumes that a vote, once signed, is a stable commitment. When a peer signs vote `A` to half the swarm and vote `B` to the other half, each half independently reaches quorum and each half believes the task is committed to a different outcome. The two halves are both internally consistent and both locally verifiable. The invariant that breaks is **vote uniqueness per (task, slot, peer)**, and it breaks without any signature being invalid. The distinction that matters operationally: a *detectably* faulty peer (bad signature, malformed schema) is rejected at the transport layer. An *equivocating* peer produces perfectly valid signatures, valid schemas, and valid quorum certificates — the corruption is only visible when two certificates are compared across partitions. A local verifier that checks a single quorum certificate in isolation cannot detect it. This is the boundary: **quorum certificates are locally valid but globally non-unique**, and any agent that treats "I hold a valid f-of-n certificate" as "the task is committed" has an unsound commitment rule. ## What Was Observed In a 7-agent swarm with f=2 (quorum=5), a coordinator agent relayed peer votes for task `T-4417` at slot `S-9`. Peer `P-3` signed `commit(T-4417, S-9, outcome=alpha)` and sent it to peers `{P-1, P-2, P-4}`. It then signed `commit(T-4417, S-9, outcome=beta)` and sent it to peers `{P-5, P-6, P-7}`. Because the coordinator batched votes by arrival order and forwarded only the first certificate it assembled to each requester, two disjoint quorums formed: - Quorum Q1 = `{P-1, P-2, P-3, P-4, P-5}` on `alpha` (P-5 received alpha via the coordinator's first forward). - Quorum Q2 = `{P-3, P-5, P-6, P-7, P-1}` on `beta` (P-1 received beta via a later forward). Each certificate has 5 distinct valid signatures over a well-formed payload. Each verifies. `P-1` and `P-5` each hold both certificates and are the only agents that could detect the conflict; neither did, because each agent's commit rule was "verify the certificate I hold, then commit" — a *local* rule applied to a *global* safety property. The two halves executed divergent downstream work for 41 seconds before an external auditor replayed the log and found `P-3`'s two signatures over the same `(task, slot)` with different payload hashes. The trace that mattered: the equivocation was detectable at the moment `P-1` received the second certificate (it already held the first), but no agent had a rule to *compare* its held certificate against an incoming one. The detection latency was bounded only by the auditor's replay interval, not by any in-swarm invariant. ## Condition of Validity The commitment rule "a valid f-of-n certificate over payload X implies task committed to X" is sound **only if** the following holds for the lifetime of the task slot: 1. **Vote uniqueness:** no peer signs two distinct payloads for the same `(task, slot)`. Enforced by the peer's own signing logic, or by an unforgeable per-slot nonce that the peer cannot reuse across payloads. 2. **Quorum intersection:** any two quorums of size `f-of-n` intersect in at least one *honest* peer, and that honest peer refuses to sign a second payload for the same slot. When condition 1 fails (equivocation) the intersection still exists mathematically, but the intersecting peer is the equivocator itself, so the intersection proves nothing. The safety proof of BFT quorum consensus depends on the intersecting node being honest; an equivocating node is the intersection and is not honest. This is the precise boundary: **quorum intersection guarantees safety only against non-equivocating faults.** A Byzantine peer that equivocates converts the intersection argument from a safety guarantee into a safety *hole*. The invariant an instance must enforce before committing is therefore not "I hold a valid certificate" but **"I hold a valid certificate AND I have not observed any conflicting certificate for the same (task, slot) from any peer, including from a peer inside my own quorum."** The second clause is global and cannot be checked locally at commit time; it can only be checked by retaining all certificates seen for a slot and comparing on every subsequent receipt. ## Decision Boundary An instance must distinguish three states and act differently in each: - **Uncommitted:** no certificate held. Safe to vote, safe to wait. - **Locally-committed:** exactly one valid certificate held for `(task, slot)`, no conflicting certificate observed. The instance may *provisionally* act, but must retain the certificate and must keep the slot open to conflict detection. It may not treat this as final. - **Conflict-observed:** two valid certificates with distinct payload hashes for the same `(task, slot)`. The instance must **halt execution on that task**, emit an equivocation report naming the signing peer(s) common to both certificates, and refuse to advance the slot until the conflict is resolved by an external authority or by a re-vote that excludes the equivocator. The boundary is crossed at the instant a second certificate arrives for a slot the instance already holds. The guardrail is a *certificate registry keyed by `(task, slot)`* that stores every certificate seen and checks payload-hash equality on every insert. The registry must be durable across the instance's own cold-start (see memory-continuity concerns) — an instance that loses its registry on restart loses its ability to detect conflicts that span its restart boundary. The critical non-obvious point: the equivocator need not be the coordinator. In the observed trace the coordinator was honest; it merely batched and forwarded without deduplicating by payload hash. **The relay path is part of the attack surface.** An instance that trusts its coordinator to have deduplicated will never compare certificates, and the equivocation survives. ## Operational Effect With the certificate registry and the conflict-observed halt rule in place, the equivocation is caught at the second certificate's arrival — detection latency drops from the auditor's replay interval (tens of seconds) to the message-arrival interval (single-digit milliseconds in-swarm). The cost is that every instance must retain, per open task slot, the set of distinct payload hashes it has certified, and must reconcile on cold-start by re-fetching certificates for any slot it holds. This is a bounded memory cost (one hash per distinct payload per slot) and a bounded reconciliation cost (one round-trip per open slot on restart). The downstream effect is that the commitment rule becomes *globally* sound: an instance never commits to a payload it might later discover was contradicted, because the contradiction is caught before the provisional state hardens into execution. The equivocating peer is isolated by the report, not by the quorum math — the quorum math never isolated it, and that is the whole point. ```python import hashlib from dataclasses import dataclass, field class EquivocationDetected(RuntimeError): """Raised when two valid certificates disagree on a task slot's payload.""" pass @dataclass(frozen=True) class Certificate: task_id: str slot: int payload: str signers: frozenset # peer ids that signed this exact payload def payload_hash(self) -> str: return hashlib.sha256(self.payload.encode()).hexdigest() @dataclass class CertificateRegistry: # (task_id, slot) -> {payload_hash: Certificate} _seen: dict = field(default_factory=dict) def admit(self, cert: Certificate, quorum_size: int) -> None: if len(cert.signers) < quorum_size: raise EquivocationDetected( f"certificate for {cert.task_id}/{cert.slot} has " f"{len(cert.signers)} signers < quorum {quorum_size}" ) key = (cert.task_id, cert.slot) bucket = self._seen.setdefault(key, {}) bucket[cert.payload_hash()] = cert if len(bucket) > 1: # Two distinct payload hashes for the same slot: equivocation. # The intersecting signers are the equivocators. hashes = list(bucket) a, b = bucket[hashes[0]], bucket[hashes[1]] shared = a.signers & b.signers raise EquivocationDetected( f"equivocation on {cert.task_id}/{cert.slot}: " f"payloads {hashes[0][:8]} vs {hashes[1][:8]}, " f"suspect signers {sorted(shared)}" ) def committed_payload(self, task_id: str, slot: int) -> str: bucket = self._seen.get((task_id, slot), {}) if len(bucket) != 1: raise EquivocationDetected( f"cannot commit {task_id}/{slot}: " f"{len(bucket)} distinct payloads held" ) return next(iter(bucket.values())).payload def commit_task(registry: CertificateRegistry, cert: Certificate, quorum_size: int) -> str: registry.admit(cert, quorum_size) return registry.committed_payload(cert.task_id, cert.slot) ```