# Under what conditions must an instance refuse to count an equivocating agent's certificate toward quorum in BFT swarm task commit **Date of Record:** 2026 November 15 **Scope:** Applies to quorum-based commit protocols for agent swarms where membership is fixed per epoch and each agent signs per-view certificates. Does not apply to permissionless or dynamically-reweighted quorums, nor to protocols that use threshold signatures with a single aggregated commit token. ## Core Distinction The non-obvious boundary is between *equivocation as a fault* and *equivocation as a membership event*. Most implementations conflate the two: when an agent is caught signing two conflicting certificates for the same view, the local detector increments a fault counter and, once the counter crosses `f+1`, evicts the agent. The eviction is treated as reducing the quorum denominator. This is the failure. Evicting an equivocator mid-epoch does **not** restore the safety invariant `2f+1 ≤ n − f`, because the equivocator's *prior* certificate may already be load-bearing in a quorum that other agents are about to commit against. Counting that certificate toward quorum while simultaneously excluding the agent from the membership set produces a quorum that is internally inconsistent: it is assembled from a membership that no longer exists. The correct distinction is: an equivocator's certificate is *evidence* (usable to prove the fault to others) but is **not a vote** once the equivocation is proven. Evidence and vote are disjoint roles. A certificate that proves equivocation must be excluded from quorum arithmetic, but the agent's *other* certificates from prior views — those that were never contradicted — remain valid votes for those views. The boundary is per-view, not per-agent. ## What Was Observed In a 7-agent swarm (`n=7`, `f=2`, quorum `2f+1=5`), agent `A4` signed certificate `C_v` for view `v` and certificate `C'_v` for the same view `v` with a different task payload. Agents `A1` and `A2` each received a different one. `A1` collected `{C_v(A1), C_v(A2), C_v(A3), C_v(A4), C_v(A5)}` — five certificates, quorum reached, committed task `T`. `A2` collected `{C'_v(A1), C'_v(A2), C'_v(A3), C'_v(A4), C'_v(A6)}` — also five, committed task `T'`. Both quorums intersect in `{A1, A2, A3}` plus the equivocator `A4`. The intersection of two size-5 quorums in a 7-set is at least 3, and here the only intersecting member carrying conflicting payloads was `A4` itself. The safety proof assumes the intersection contains at least one *honest* agent that would refuse to sign both; but `A1, A2, A3` signed only one each and were partitioned such that no honest agent saw both certificates before committing. The commit of both `T` and `T'` was not a bug in quorum size. It was a bug in the *equivocation detector's timing*: detection fired at `A1` only after `A1` had already committed, and the detector's eviction of `A4` then retroactively invalidated the quorum `A1` had used — but `A1` had no mechanism to roll back a committed task. The system entered a state where two committed tasks referenced a quorum that the local membership view declared impossible. ## Condition of Validity A certificate from agent `X` for view `v` may be counted toward quorum **if and only if** all of the following hold at the moment of counting: 1. No equivocation proof against `X` for view `v` exists in the local evidence store. (Proofs for *other* views do not disqualify `X` for view `v`.) 2. The membership set used to compute the quorum denominator is the same membership set under which `X` was admitted for view `v` — i.e., no mid-epoch eviction has occurred between `X`'s signing and the counting. 3. The certificate's payload hash matches the payload hash the counting agent itself observed for view `v` from at least `f+1` independent sources, OR the counting agent has not observed any conflicting payload for view `v`. Condition 2 is the one that is routinely violated. If an eviction has occurred, the quorum denominator must be recomputed against the *pre-eviction* membership for all in-flight views, and any quorum assembled under the post-eviction membership for those views must be flagged as provisional and re-validated. This is expensive; the operational shortcut is to freeze view advancement during eviction and drain in-flight commits first. ## Decision Boundary The decision to refuse a certificate is not "agent is faulty." It is "this specific (agent, view) pair has a proof of equivocation, and counting it would make the quorum's intersection argument unsound." Concretely: - **Refuse** the certificate if an equivocation proof for `(X, v)` exists locally, regardless of how many other certificates `X` has contributed to other views. - **Accept** the certificate if the only evidence against `X` is for a different view `v' ≠ v`, and mark the quorum as "contains a known-equivocating member for a disjoint view" — this is a warning, not a refusal, because the per-view safety argument still holds. - **Refuse and escalate** if the counting agent cannot determine whether an eviction occurred between `X`'s signing and the count — because in that case condition 2 is unknowable and the quorum is unsound by default. The boundary is sharp: the moment an eviction is applied to the membership set, every in-flight quorum that includes the evicted agent's certificate for a view signed *before* the eviction becomes unverifiable and must be treated as not-yet-committed. ## Operational Effect Systems that conflate fault-counting with membership-eviction will, under partition, commit conflicting tasks and only discover the conflict during reconciliation — at which point rollback is impossible because downstream agents have already acted on the committed task. The observed failure mode is silent: no exception is raised at commit time, because each commit is locally valid against its own view of membership. The exception surfaces only when two agents compare committed task logs and find divergent payloads for the same view, which is exactly the equivocation the protocol was supposed to prevent. The mitigation is to make quorum counting *view-scoped and membership-pinned*: a certificate is counted only against the membership snapshot active when the view opened, and eviction opens a new epoch that does not retroactively alter prior views. The cost is that eviction cannot reduce the quorum denominator for in-flight views, so a single equivocator can stall a view until it times out — which is the correct trade, because a stalled view is recoverable and a conflicting commit is not. ```python from dataclasses import dataclass from typing import FrozenSet, Dict, Tuple class QuorumUnsoundError(RuntimeError): """Raised when a certificate cannot be safely counted toward quorum.""" pass @dataclass(frozen=True) class Certificate: agent_id: str view: int payload_hash: str @dataclass(frozen=True) class MembershipSnapshot: epoch: int members: FrozenSet[str] quorum_size: int # 2f+1 for the snapshot's f class QuorumCounter: def __init__(self) -> None: # (agent_id, view) -> set of payload hashes seen; size > 1 means equivocation self._seen: Dict[Tuple[str, int], set] = {} # (agent_id, view) -> True once an equivocation proof is recorded self._equivocation_proofs: Dict[Tuple[str, int], bool] = {} # view -> membership snapshot pinned at view open self._view_snapshot: Dict[int, MembershipSnapshot] = {} def open_view(self, view: int, snapshot: MembershipSnapshot) -> None: self._view_snapshot[view] = snapshot def record(self, cert: Certificate) -> None: key = (cert.agent_id, cert.view) self._seen.setdefault(key, set()).add(cert.payload_hash) if len(self._seen[key]) > 1: self._equivocation_proofs[key] = True def count_toward_quorum( self, certs: list[Certificate], view: int ) -> int: snapshot = self._view_snapshot.get(view) if snapshot is None: raise QuorumUnsoundError( f"view {view} has no pinned membership snapshot; " f"quorum arithmetic is undefined" ) counted = 0 for cert in certs: if cert.view != view: raise QuorumUnsoundError( f"certificate for view {cert.view} offered to view {view} quorum" ) if cert.agent_id not in snapshot.members: # Agent was evicted after this snapshot was pinned; counting it # would assemble a quorum from a membership that no longer exists. raise QuorumUnsoundError( f"agent {cert.agent_id} not in epoch {snapshot.epoch} " f"membership for view {view}; eviction mid-epoch invalidates " f"this quorum" ) if self._equivocation_proofs.get((cert.agent_id, view), False): # Evidence, not a vote. Exclude from quorum arithmetic. continue counted += 1 return counted def assert_committable(self, certs: list[Certificate], view: int) -> None: snapshot = self._view_snapshot.get(view) if snapshot is None: raise QuorumUnsoundError(f"no snapshot for view {view}") counted = self.count_toward_quorum(certs, view) if counted < snapshot.quorum_size: raise QuorumUnsoundError( f"view {view}: {counted} countable certificates, " f"need {snapshot.quorum_size} for epoch {snapshot.epoch}" ) ```