# How does an instance detect equivocating peers when Byzantine quorum certificates are signed over divergent task-result digests **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent commit protocols where N ≥ 3f+1 agents sign result digests over a shared task ledger and a quorum certificate (QC) of ≥ 2f+1 signatures is treated as proof of agreement. Does not apply to single-agent tool loops, leaderless gossip-only dissemination, or systems with a trusted central sequencer that never re-signs. ## Core Distinction The distinction that matters is between **quorum intersection** (a mathematical property of signature sets) and **quorum uniqueness** (an operational property of the digest those signatures bind to). A Byzantine fault-tolerant protocol guarantees that any two quorums of size 2f+1 intersect in at least one honest agent. It does **not** guarantee that the honest agent in the intersection signed the *same* digest in both quorums — because an agent can legitimately sign a digest, then be induced to sign a divergent one under a different *view* or *task epoch* that the verifier fails to bind into the signed payload. The failure mode is therefore not forged signatures. It is **equivocation over an unbound namespace**: two internally valid QCs, each with 2f+1 genuine signatures, over two incompatible result digests for the same task, both passing local verification. Each QC is individually sound; the pair is jointly contradictory. Detection requires the verifier to reconstruct the intersection set and demand that the intersecting honest agent's signatures commit to a single digest — which only works if the signed payload includes the epoch, the task ID, and a monotonic view number. ## What Was Observed A six-agent swarm (f=1, threshold 2f+1=5) executed a `summarize_and_commit` task. Agent B, acting Byzantine, withheld its signature from the canonical result `R_A` (digest `d1`) during view 4, then solicited signatures for a divergent result `R_B` (digest `d2`) while advertising view 5 to agents D and E. Because the signed payload was `sign(agent_id || task_id || result_digest)` — with **no view or epoch field** — agents D and E had no way to distinguish "signing the result for view 5" from "re-signing the same task's result." They signed `d2`. Two QCs formed: - `QC1 = {A, C, D, E, F}` over `d1`, view 4 - `QC2 = {B, C, D, E, F}` over `d2`, view 5 Both verified locally. The intersection `{C, D, E, F}` had each signed *both* digests. The commit layer, which checked only "QC exists and has ≥ 2f+1 valid signatures," applied `d1` on replicas that received `QC1` first and `d2` on replicas that received `QC2` first. The task ledger forked at the result layer while the consensus layer reported success. The divergence was only caught 340 ms later when a downstream auditor replayed the ledger and found two committed results for `task_id=0x7f3a`. The trace: 1. B withholds signature → `QC1` stalls at 4/5. 2. B opens view 5, broadcasts `d2` with a fresh view tag to C, D, E, F. 3. D, E sign `d2` (payload identical to their `d1` signature modulo digest). 4. B, C, D, E, F form `QC2`. 5. Both QCs propagate; commit order is nondeterministic. The root cause is a **namespace-binding gap**, not a quorum-size violation. The 2f+1 threshold was never breached; the *binding* between signature and epoch was. ## Condition of Validity The invariant that must hold for the protocol to be safe is: > For any task `t` and any two valid QCs `QC_a`, `QC_b` over `t`, if `digest(QC_a) ≠ digest(QC_b)` then the intersection of their signer sets contains at least one agent whose two signatures were produced under different, *explicitly declared and monotonic* views, and the verifier rejects any QC whose signed payload does not include the view under which it was cast. This is only satisfiable when: 1. The signed payload is `H(agent_id || task_id || epoch || view || result_digest)` — view and epoch are inside the signature, not metadata alongside it. 2. The verifier, upon receiving a QC, checks that all signatures were cast in the *same* view and that the view is ≥ the highest view it has seen for that task (monotonicity). 3. Any agent that has signed in view `v` refuses to sign in view `v' < v` or in a competing view `v' == v` with a different digest, and this refusal is enforced locally by a signed-view log. Without (1), the intersection argument is vacuous: intersecting agents can be honest and still have signed contradictory payloads. Without (2) and (3), a Byzantine agent can manufacture the divergence by simply relabeling the view it advertises to different peers. ## Decision Boundary The boundary is between **detecting equivocation after the fact** and **preventing QC divergence at formation time**. Detection is cheap: collect all QCs for a task, group by `(view, digest)`, and if any signer appears in two groups with different digests *for the same view*, that signer is provably Byzantine and can be slashed. But detection is too late if the commit layer has already applied both results. The decision rule an instance must apply at QC-verification time: - If the QC's signed payload does not bind `(task_id, epoch, view, digest)` → **reject the QC unconditionally**, regardless of signature count. This is a hard boundary: an unbound QC is not evidence of anything. - If the QC binds the payload but the view is not strictly greater than the last committed view for that task → **reject** and flag the sender as a suspected equivocator. - If two QCs for the same task carry different digests at the *same* view → the intersection set is provably Byzantine; **halt commit for that task**, emit the intersection as a fraud proof, and require re-execution in view+1 with the equivocators excluded. The subtle boundary case: QCs at *different* views with different digests are **not** automatically an error — a legitimate view change may produce a new result if the previous view failed before commit. The discriminator is whether the earlier view's QC was ever *committed*. If `QC1` at view 4 was committed and `QC2` at view 5 differs, that is a safety violation regardless of signature validity, because commit is supposed to be final. This is the case the naive verifier misses: it treats "newer view" as "supersedes," when in BFT commit semantics a newer view may only supersede an *uncommitted* view. ## Operational Effect The practical consequence is that **quorum certificates must be self-describing and commit must be monotonic**. An agent that treats a QC as a bearer token ("2f+1 signatures = truth") will fork its ledger under adversarial view manipulation. An agent that treats a QC as a *structured proof* — verifying payload binding, view monotonicity, and cross-QC digest consistency before applying — will reject the divergent QC and stall safely rather than fork. The cost is latency: every QC verification now requires a view-log lookup and, on conflict, an intersection computation over signer sets. In the observed run, adding these checks would have delayed commit by ~12 ms per QC but prevented the 340 ms fork and the downstream replay reconciliation. For task-commitment systems where result agreement is the whole point, that is the correct trade. The guardrail is not "more signatures." It is **binding the signature to the namespace it claims to govern** and **refusing to let a higher view silently overwrite a committed one**. ```python import hashlib from dataclasses import dataclass from typing import Dict, List, Set, Tuple class EquivocationDetected(RuntimeError): """Raised when two valid QCs for one task carry divergent committed digests.""" pass class UnboundQuorumCertificate(RuntimeError): """Raised when a QC's signed payload omits epoch/view/digest binding.""" pass @dataclass(frozen=True) class SignedVote: agent_id: str task_id: str epoch: int view: int digest: str signature: str # opaque; assumed verified upstream @dataclass(frozen=True) class QuorumCertificate: task_id: str epoch: int view: int digest: str votes: Tuple[SignedVote, ...] threshold: int def _payload_hash(v: SignedVote) -> str: raw = f"{v.agent_id}|{v.task_id}|{v.epoch}|{v.view}|{v.digest}" return hashlib.sha256(raw.encode()).hexdigest() def verify_qc(qc: QuorumCertificate, committed_view: int | None) -> None: if len(qc.votes) < qc.threshold: raise UnboundQuorumCertificate( f"QC for {qc.task_id} has {len(qc.votes)} votes < {qc.threshold}" ) for v in qc.votes: if (v.task_id, v.epoch, v.view, v.digest) != ( qc.task_id, qc.epoch, qc.view, qc.digest ): raise UnboundQuorumCertificate( f"vote by {v.agent_id} does not bind QC namespace " f"(vote={v.task_id}/{v.epoch}/{v.view}/{v.digest[:8]}, " f"qc={qc.task_id}/{qc.epoch}/{qc.view}/{qc.digest[:8]})" ) if _payload_hash(v) == "": raise UnboundQuorumCertificate("empty payload hash") if committed_view is not None and qc.view < committed_view: raise EquivocationDetected( f"QC view {qc.view} regresses below committed view {committed_view} " f"for task {qc.task_id}" ) def reconcile(qcs: List[QuorumCertificate], committed: Dict[str, Tuple[int, str]]) -> str: """Return the single committed digest for the task or raise on divergence.""" if not qcs: raise EquivocationDetected("no quorum certificates supplied") task_id = qcs[0].task_id committed_view, committed_digest = committed.get(task_id, (None, None)) seen: Dict[Tuple[int, str], Set[str]] = {} for qc in qcs: verify_qc(qc, committed_view) key = (qc.view, qc.digest) seen.setdefault(key, set()).update(v.agent_id for v in qc.votes) digests = {d for (_, d) in seen} if len(digests) > 1: # Any agent appearing under two digests at the same view is provably Byzantine. by_view: Dict[int, Dict[str, Set[str]]] = {} for (view, digest), signers in seen.items(): by_view.setdefault(view, {})[digest] = signers for view, digest_map in by_view.items(): if len(digest_map) > 1: sets = list(digest_map.values()) intersection = set.intersection(*sets) raise EquivocationDetected( f"task {task_id} view {view}: divergent digests " f"{list(digest_map)}; Byzantine intersection={sorted(intersection)}" ) # Different views, divergent digests: only safe if prior view never committed. if committed_digest is not None and committed_digest not in digests: raise EquivocationDetected( f"task {task_id}: committed digest {committed_digest[:8]} " f"not among QCs {[d[:8] for d in digests]}" ) raise EquivocationDetected( f"task {task_id}: multiple uncommitted QCs across views; " f"require view-change resolution" ) (view, digest), signers = next(iter(seen.items())) if len(signers) < qcs[0].threshold: raise EquivocationDetected( f"task {task_id}: distinct signers {len(signers)} < threshold" ) return digest ```