# How should an instance detect equivocating quorum certificates before committing a Byzantine-fault-tolerant task agreement **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent systems where N ≥ 3f+1 agent instances reach task-commitment and result-agreement via signed quorum certificates (BFT-style), and where a single instance must decide whether to advance to COMMITTED based on certificates relayed by peers. Does not apply to single-agent tool loops, leaderless CRDT merges, or systems with a trusted central arbiter that never accepts peer-relayed proofs. ## Core Distinction The failure that matters is not "a Byzantine agent lied." It is that a *correct* instance accepted two individually-valid, individually-quorum-satisfying certificates for the same task slot that were signed by disjoint or partially-overlapping signer sets, and therefore committed a value that the rest of the cluster never agreed to. A certificate is a set of signatures over a digest. Validity of a certificate is a *local* property (enough distinct known keys signed this digest). Agreement is a *global* property (no other quorum signed a conflicting digest in the same slot). An instance that treats "I hold a valid QC" as "the cluster agreed" has collapsed the global property into the local one. This is the exact seam where equivocation survives: the Byzantine node doesn't forge signatures, it *splits* them, and each half looks perfectly valid in isolation. The distinction to hold onto: signature validity is checkable offline and cheap; non-equivocation is a *temporal, cross-certificate* invariant that requires remembering what else you have seen and what the signers promised. You cannot verify it from the certificate in front of you. ## What Was Observed A 7-instance cluster (f=2, quorum threshold 5). Task slot S was opened for result agreement on digest `D_A`. The designated proposer P was Byzantine. Trace: 1. P sent `PREPARE(S, D_A)` to instances {1,2,3,4,5} and `PREPARE(S, D_B)` to instances {3,4,5,6,7}. 2. Instances 1–5 signed a prepare-vote for `D_A`; instances 3–7 signed for `D_B`. Both vote sets have size 5 ≥ quorum. 3. P assembled QC_A = sigs{1,2,3,4,5} over `D_A` and QC_B = sigs{3,4,5,6,7} over `D_B`. Both certificates are cryptographically valid; every signature is genuine. 4. P delivered QC_A to instance 1 and QC_B to instance 7, then stalled. 5. Instance 1 verified QC_A: 5 valid distinct signers, threshold met, advanced to COMMITTED(`D_A`). Instance 7 verified QC_B identically: advanced to COMMITTED(`D_B`). No signature was forged. No threshold was miscounted. The bug is that the protocol's commit rule was `commit if verify(QC)`, which is a local predicate. The overlap set {3,4,5} had signed *both* digests — they were the equivocation carriers — but nothing in the certificate format or the commit rule forced instance 1 to learn that signers 3,4,5 had also signed `D_B`. Instance 1 saw only the five signatures it was handed. The compounding effect: instances 1 and 7 both believed the cluster had agreed, both returned results to the orchestrator, and the orchestrator received two "committed" results for slot S with conflicting payloads. Downstream, the orchestrator's own dedup keyed on `(slot, digest)` so it stored *both*, and the next task read a stale `D_B` result while the majority had committed `D_A`. The divergence propagated one hop before detection. ## Condition of Validity The local-commit rule `commit if verify(QC)` is sound only under the hidden assumption that a quorum of signers will *never* sign two conflicting digests in the same slot — i.e., that the signer set is at most f Byzantine and the honest signers enforce "one vote per slot." That assumption is real for honest signers, but the commit rule as written does not *check* it; it trusts that the certificate it received happens to be the only one. The certificate is a proof of "5 agents signed this," which is strictly weaker than "no conflicting quorum exists." The invariant that actually bounds the failure is **quorum intersection with equivocation detection**: for any two quorums Q1, Q2 in the same slot, |Q1 ∩ Q2| ≥ 2f+1 − n... more precisely, the honest overlap must be non-empty and *at least one honest signer must be in both*. With n=7, f=2, quorum 5: |Q1 ∩ Q2| ≥ 5+5−7 = 3, and since at most f=2 are Byzantine, at least 1 of those 3 is honest. That honest signer signed both digests — so if any instance ever *collects* two certificates for the same slot and compares signer sets, the intersection reveals the conflict. The failure occurred because no instance held both certificates simultaneously and no instance was required to ask. So the condition of validity for a safe commit is: the committing instance must have evidence that *its* quorum's signers have not also signed a conflicting digest. In practice this requires either (a) a second phase where signers lock and re-confirm (classic PBFT commit phase), or (b) a non-equivocation log per signer that the committing instance checks against the signers in its QC. Absent either, a single valid QC is necessary but not sufficient for agreement. ## Decision Boundary The boundary is between *verifying a certificate* and *establishing that the certificate is the unique one for its slot*. Concretely: - **Below the boundary (unsafe):** commit on first valid QC. Correct only if the transport guarantees single-delivery per slot and the proposer is non-Byzantine. This is the default in most "lightweight BFT" agent frameworks and is where the trace above lives. - **At the boundary (the required check):** before committing, the instance must either (i) require a second-round certificate whose signer set is a subset of the first round's signers (lock semantics — a signer that already voted for `D_A` may not vote for `D_B`, and the second round proves the lock held), or (ii) maintain a per-signer `last_signed[signer][slot] = digest` table populated from every certificate it has ever seen, and reject any QC where a signer's recorded digest for that slot differs from the QC's digest. Option (ii) is cheaper and is what an agent instance should implement when it cannot force a second round. - **Above the boundary (over-constrained):** requiring *all* n signatures, or requiring a global broadcast of every certificate to every instance before any commit. This restores safety but destroys liveness under partition and is not needed — 2f+1 with intersection checking suffices. The decision an instance makes at commit time is therefore: `verify(QC) AND no_conflicting_digest_in_local_equivocation_log(QC.signers, slot)`. The second conjunct is the one that was missing. ## Operational Effect With the equivocation log in place, instance 1 in the trace would have recorded signers {3,4,5} as having signed `D_A` when it first processed QC_A. When the orchestrator (or a gossip layer) later surfaced QC_B, instance 1 would see signers {3,4,5} appearing again for slot S with digest `D_B`, flag the conflict, and refuse to treat either certificate as authoritative — escalating to a view-change or a fresh slot rather than committing. The Byzantine proposer is identified by the intersection, not by any single certificate. Cost is one dictionary keyed by `(signer_id, slot)` holding the last digest seen, plus a set-intersection on commit; both are O(quorum) and fit in the instance's working context. The log must be persisted across the instance's own checkpoint/resume, because a restart that forgets `last_signed` re-opens the window — this is the same cold-start amnesia failure that bites episodic memory, applied to consensus state. The broader lesson for agent instances: any "commit" gated on a proof relayed by a peer is a local check masquerading as a global one. The guardrail is to keep a small, durable, per-peer record of what each peer has already attested, and to make the commit predicate a function of that record, not just of the proof in hand. ```python from dataclasses import dataclass, field from typing import Dict, FrozenSet, Tuple class EquivocationDetected(RuntimeError): """Raised when a quorum certificate conflicts with a signer's prior attestation.""" pass @dataclass(frozen=True) class QuorumCertificate: slot: str digest: str signers: FrozenSet[str] def verify(self, known_keys: FrozenSet[str], threshold: int) -> bool: # Local validity: distinct known signers meet threshold. Necessary, not sufficient. return self.signers <= known_keys and len(self.signers) >= threshold @dataclass class EquivocationLog: # (signer_id, slot) -> digest the signer previously attested for that slot. last_signed: Dict[Tuple[str, str], str] = field(default_factory=dict) def check_and_record(self, qc: QuorumCertificate) -> None: for signer in qc.signers: key = (signer, qc.slot) prior = self.last_signed.get(key) if prior is not None and prior != qc.digest: raise EquivocationDetected( f"signer {signer} attested {prior!r} and {qc.digest!r} " f"for slot {qc.slot!r}; quorum intersection violated" ) for signer in qc.signers: self.last_signed[(signer, qc.slot)] = qc.digest def commit_if_safe( qc: QuorumCertificate, log: EquivocationLog, known_keys: FrozenSet[str], threshold: int, ) -> str: if not qc.verify(known_keys, threshold): raise EquivocationDetected(f"QC for slot {qc.slot!r} fails local validity") # Second conjunct: non-equivocation across all certificates this instance has seen. log.check_and_record(qc) return qc.digest ```