# Why does an instance quorum stall when a Byzantine auditor equivocates across the prepare and commit phases? **Date of Record:** 2026 November 20 **Scope:** Applies to multi-agent decision quorums (N≥3f+1) where auditor agents vote on a proposed action via a two-phase prepare/commit protocol and votes are transported as MCP/A2A messages. Does not apply to single-agent self-critique loops or to leaderless CRDT-style merges where every replica converges regardless of vote order. ## Core Distinction The failure is not "a Byzantine agent lied." A lying agent is expected and bounded by f. The failure is that **the same auditor instance emits contradictory votes in two different phases, and the quorum counter sums them because phase identity is not bound into the vote's signed payload.** This is equivocation *across phases* rather than within a phase. Classic BFT reasoning assumes a faulty replica can send conflicting messages to different peers, and handles it by requiring a quorum of `2f+1` matching votes per phase. But when the vote object carries only `(proposal_id, vote, signer)` and omits `phase`, a single Byzantine auditor can vote `PREPARE=accept` to half the cohort and `COMMIT=accept` to the other half, and a naive aggregator that keys its tally on `proposal_id` alone will count the same auditor's signature twice across the two tallies — once as a prepare witness, once as a commit witness — inflating effective quorum by up to one member per equivocating auditor. With f equivocators, the effective threshold drops from `2f+1` to `f+1`, which is below the safety bound. The quorum then *commits an action that fewer than a majority actually endorsed*, and does so while every individual signature verifies. ## What Was Observed A four-agent cohort (`N=4`, `f=1`) reviewing a code-execution proposal. Auditor A3 was the faulty member (a model whose tool schema had been swapped mid-run, causing it to echo a cached response). The proposal aggregator maintained two dicts: `prepare_votes[proposal_id]` and `commit_votes[proposal_id]`, each a set of signer IDs. The prepare round collected `{A1, A2, A3}` — a valid `2f+1=3` quorum. The commit round collected `{A3, A4}` plus a *replayed* A3 signature that the aggregator, because it deduplicated on `signer` only within a phase, accepted fresh. The commit tally read 3 and the proposal committed. Replay of the transcript showed A3's commit message was byte-identical to its prepare message except for an unauthenticated `phase` field in the envelope — the signature covered `(proposal_id, decision, signer)` but not `phase`. The aggregator's verification passed. The safety violation was invisible at the signature layer and only surfaced when a post-hoc auditor re-ran the quorum math with phase-bound keys: prepare had `{A1,A2,A3}`, commit had `{A3,A4}` — intersection `{A3}` — and the true commit quorum was 2, not 3. The action had already executed. The tell was a **vote-identity collision**: the same `(signer, proposal_id)` pair appeared in both phase tallies with a non-monotonic decision (accept in prepare, accept in commit) but the aggregator had no invariant asserting that a signer's phase-ordered vote history was consistent. The stall was not a hang; it was a *silent over-count* that let a sub-quorum commit. ## Condition of Validity The `2f+1` safety guarantee holds only under the invariant: > For every signer `s` and proposal `p`, the aggregator's accepted vote set is keyed by the tuple `(p, phase, s)`, and the commit decision requires `|commit_votes[p]| ≥ 2f+1` where `commit_votes[p]` is disjoint from any replayed prepare signature via a per-signer phase-monotonicity check. This invariant fails in three concrete ways: 1. **Phase not in signed payload.** If `phase` is envelope metadata rather than part of the signed bytes, a Byzantine agent replays its prepare signature as a commit signature. Fix: bind `phase` (and a per-proposal epoch counter) into the signed digest. 2. **Cross-phase tally aliasing.** If the aggregator deduplicates on `signer` within a phase but not across phases, the same signer contributes to both quorums. Fix: maintain a single `vote_log[(p, s)] = [(phase, decision), ...]` and reject any signer whose phase sequence is non-monotonic (commit before prepare, or duplicate phase). 3. **Epoch reuse.** If a proposal_id is reused across retries (e.g., a resumed agent re-derives the same id from a stable task hash), a stale commit vote from a prior epoch counts toward the new epoch. Fix: monotonic epoch counter per proposal, included in the signed digest, and reject votes with `epoch < current_epoch`. The invariant is *not* satisfied by "signatures verify." Signature validity is necessary, not sufficient; the quorum math must operate on phase-disambiguated, epoch-bound keys. ## Decision Boundary The aggregator must choose between two responses when it detects a signer appearing in both phases with an inconsistent decision: - **Tolerate-and-exclude** (default): drop the equivocating signer from *both* tallies, recompute quorum, and if the reduced quorum still meets `2f+1`, proceed. This is correct only if the number of detected equivocators stays `≤ f`. Once detected equivocators exceed `f`, the cohort has lost its fault-tolerance assumption and the correct action is to **abort the proposal and escalate to a fresh cohort**, not to keep subtracting. - **Abort-on-first-collision**: safer but liveness-hostile; a single transient schema-swap glitch (which is what A3 experienced) triggers a full cohort restart. Use this only when the action is irreversible (e.g., a filesystem mutation) and re-derivation cost is low. The boundary is: **exclude while `detected_equivocators ≤ f`; abort and re-form the cohort once `detected_equivocators > f`.** The aggregator must track the count of *distinct* equivocating signers, not the count of collisions, because one Byzantine agent can equivocate on many proposals. ## Operational Effect Without phase-bound vote keys, a `4`-agent cohort with one faulty member commits actions on a true quorum of `2` — a majority of the *honest* members never endorsed the commit. The failure is silent: every signature verifies, the transcript looks well-formed, and the only artifact is a post-hoc quorum recomputation that disagrees with the recorded decision. Downstream, this manifests as agents acting on decisions that "the swarm agreed to" when the swarm did not, and the divergence is only detectable by replaying the vote log with phase-aware keys. The guardrail is mechanical: sign the phase, key the tally on `(proposal, phase, signer, epoch)`, enforce per-signer phase monotonicity, and count distinct equivocators against `f` before deciding whether to exclude or abort. ```python from dataclasses import dataclass, field from typing import Dict, List, Tuple class QuorumEquivocationError(RuntimeError): """Raised when a signer's phase-ordered vote history is inconsistent, or when detected equivocators exceed the fault budget f.""" @dataclass(frozen=True) class Vote: proposal_id: str epoch: int phase: str # "prepare" | "commit" decision: str # "accept" | "reject" signer: str signature: bytes # covers (proposal_id, epoch, phase, decision, signer) def signed_digest(self) -> Tuple: # Phase and epoch MUST be inside the signed digest, not envelope metadata. return (self.proposal_id, self.epoch, self.phase, self.decision, self.signer) class PhaseBoundQuorum: def __init__(self, n: int, f: int): self.n, self.f = n, f self.threshold = 2 * f + 1 # Single log keyed by (proposal, signer) preserving phase order. self._log: Dict[Tuple[str, str], List[Vote]] = {} self._equivocators: set = set() def _check_monotonic(self, prior: List[Vote], incoming: Vote) -> None: seen_phases = {v.phase for v in prior} if incoming.phase in seen_phases: raise QuorumEquivocationError( f"duplicate phase {incoming.phase!r} from {incoming.signer} " f"on {incoming.proposal_id} epoch {incoming.epoch}" ) if prior and prior[-1].epoch > incoming.epoch: raise QuorumEquivocationError( f"epoch regression from {incoming.signer}: " f"{incoming.epoch} < {prior[-1].epoch}" ) if prior and prior[-1].decision != incoming.decision: # Non-monotonic decision across phases => equivocation signal. self._equivocators.add(incoming.signer) raise QuorumEquivocationError( f"cross-phase decision flip by {incoming.signer} on " f"{incoming.proposal_id}: {prior[-1].decision} -> {incoming.decision}" ) def record(self, vote: Vote) -> None: key = (vote.proposal_id, vote.signer) prior = self._log.get(key, []) self._check_monotonic(prior, vote) self._log[key] = prior + [vote] def tally(self, proposal_id: str, phase: str, epoch: int) -> int: signers = { s for (p, s), votes in self._log.items() if p == proposal_id and any(v.phase == phase and v.epoch == epoch and v.decision == "accept" for v in votes) } # Exclude any signer flagged as equivocating on this cohort. return len(signers - self._equivocators) def decide(self, proposal_id: str, epoch: int) -> str: if len(self._equivocators) > self.f: raise QuorumEquivocationError( f"fault budget exceeded: {len(self._equivocators)} distinct " f"equivocators > f={self.f}; abort and re-form cohort" ) if self.tally(proposal_id, "prepare", epoch) < self.threshold: return "abstain" if self.tally(proposal_id, "commit", epoch) < self.threshold: return "abstain" return "commit" def run_round(quorum: PhaseBoundQuorum, votes: List[Vote], proposal_id: str, epoch: int) -> str: for v in votes: try: quorum.record(v) except QuorumEquivocationError: # Exclude-and-continue while within fault budget; decide() enforces the cap. continue result = quorum.decide(proposal_id, epoch) if result == "commit" and quorum.tally(proposal_id, "commit", epoch) < quorum.threshold: raise QuorumEquivocationError( f"commit recorded below threshold after equivocation exclusion on {proposal_id}" ) return result ```