# How should an instance detect equivocating attestations before a Byzantine quorum commits a poisoned task result **Date of Record:** 2026 November 30 **Scope:** Applies to multi-agent systems where N≥3f+1 worker instances independently execute a task and attest results via signed votes to a commit quorum, and where at least one instance may be faulty (crash or Byzantine). Does not apply to single-agent pipelines, to quorum schemes without per-instance cryptographic identity, or to systems where the task result is externally verifiable by a trusted oracle. ## Core Distinction The failure mode examined here is **equivocation at the attestation layer**, not at the execution layer. A Byzantine instance does not need to return a wrong answer to corrupt consensus. It needs only to send different attestations about the *same* execution to different peers: `ATTEST(task=T, result=R_good, sig=i)` to the auditor set and `ATTEST(task=T, result=R_bad, sig=i)` to a colluding subset. Because each attestation is individually well-formed and correctly signed, signature verification passes everywhere. The quorum counts the votes. The result that reaches 2f+1 attestations commits. The non-obvious boundary: **a quorum of 2f+1 valid signatures over a result does not imply that 2f+1 distinct instances agreed on that result.** It implies only that 2f+1 signed messages referencing that result exist in the network. If a single Byzantine instance can mint two conflicting attestations and both are counted in different quorum assemblies, the safety proof that underwrites BFT consensus (that any two quorums of size 2f+1 intersect in at least one honest node) is silently violated, because the intersection node's "one vote" has become two. ## What Was Observed A 7-instance worker pool (f=2, quorum=5) executing a commit-attestation round on task `T-4471`. Instances W1–W7 each executed the task and produced a signed attestation. W4 was the faulty instance. The trace: 1. W4 executed the task twice with a nondeterministic tool call (a retrieval step whose upstream index had partially reindexed between calls), producing `R_a` and `R_b`. 2. W4 emitted `ATTEST(T-4471, R_a)` to the auditor set {W1, W2, W3, W5} and `ATTEST(T-4471, R_b)` to {W6, W7, W4}. 3. The auditor aggregation service, which counted attestations per result hash without deduplicating by signer across result buckets, observed 5 signatures for `R_a` (W1, W2, W3, W5, W4) and 3 for `R_b` (W6, W7, W4). 4. `R_a` committed at quorum. But W4's signature appeared in both quorum-relevant buckets. The effective distinct-signer count for `R_a` was 4, not 5 — below quorum. 5. The commit was accepted. Downstream, `R_a` was written to episodic memory as ground truth and used to seed the next task's context. The aggregation service logged no anomaly. Every signature verified. Every quorum check passed. The invariant that was supposed to hold — "no result commits unless 2f+1 distinct honest instances attested it" — did not hold, because the aggregation logic conflated *message count* with *distinct-signer count* and never checked for a signer appearing across conflicting result buckets. ## Condition of Validity The equivocation attack is *only* possible when all of the following hold simultaneously: - **Per-instance identity is stable and reusable across attestations.** If each attestation carries a fresh nonce bound to a single result and the aggregation layer rejects any signer that appears under two nonces for the same task, equivocation collapses to a detectable protocol violation. - **The aggregation layer counts messages, not distinct signers per result.** This is the actual defect. A correct aggregator partitions attestations by `(task_id, result_hash)` and computes the *set* of distinct signer identities per partition; the quorum is over set cardinality, and any signer in more than one partition for the same task triggers an equivocation alert. - **The task is nondeterministic across executions.** If execution were deterministic and the result hash were a pure function of the task, W4 could not produce two distinct valid results without also producing an invalid one, which would be caught by result validation. Nondeterminism (tool calls, sampling temperature, retrieval state) is what makes `R_a ≠ R_b` both *plausible* and *signable* by the same instance. - **f ≥ 1 and the faulty instance is in the quorum-intersection position.** If the faulty instance is outside both quorum assemblies, no corruption occurs. The attack requires the equivocator to be positioned such that its two attestations land in two different quorum-relevant buckets — trivially achieved by a faulty instance that controls its own message routing. If execution is deterministic and results are content-addressed, the attack surface shrinks to a single result hash and equivocation is reduced to a detectable duplicate-signature event. The dangerous regime is **nondeterministic execution + message-counted quorum + no cross-bucket signer deduplication**. ## Decision Boundary The instance must treat the following as a hard boundary: **an attestation quorum is valid only if it is assembled over a set of distinct signer identities, and any signer identity appearing in two conflicting attestation sets for the same task is an equivocation event that invalidates both sets until resolved.** Operationally: - **Before commit**, the aggregator computes, for each `(task_id, result_hash)`, the set `S_r` of distinct signers. Commit proceeds only if `|S_r| ≥ 2f+1` AND the union of signer sets across all result buckets for that task has no duplicate identity. If a duplicate exists, the task enters `EQUIVOCATION_SUSPECTED` and no result commits. - **Resolution** is not "pick the larger bucket." It is: re-dispatch the task to a fresh execution round excluding the equivocating instance, collect fresh attestations with fresh nonces, and commit only on the new round. The equivocator is quarantined from the worker pool for the remainder of the epoch. - **The boundary is not "majority wins."** A 5-vs-3 split where the 5 includes the equivocator's first attestation is not a valid quorum. Counting must be over distinct signers, and equivocation must be treated as a *protocol fault*, not a *voting outcome*. This boundary is violated the moment the aggregator's data structure is `dict[result_hash] -> list[signature]` rather than `dict[result_hash] -> set[signer_id]` plus a global `signer_id -> set[result_hash]` index for cross-bucket detection. ## Operational Effect When the invariant is enforced, the observable behavior changes in three ways: 1. **Equivocation becomes loud, not silent.** The aggregator raises on cross-bucket signer duplication before any commit. The task is held, not committed. Downstream memory is never seeded with an under-quorum result. The failure is contained to one task round and one quarantined instance. 2. **Nondeterminism is contained at the attestation layer.** Because the system no longer relies on "the result that gets the most votes," nondeterministic execution producing divergent results is handled by re-round rather than by majority vote. This is the correct semantics: divergent results from nondeterministic execution are not a vote to be won, they are a signal that the execution round must be re-run under controlled conditions. 3. **The BFT safety proof is restored.** The intersection property (any two 2f+1 quorums share ≥1 honest node) holds only if each honest node contributes exactly one attestation per task. Deduplicating by signer identity and rejecting cross-bucket duplicates is what makes the proof's premise true in the implementation. Without it, the implementation is BFT in name and message-counted in fact. The cost is latency: equivocation-suspected tasks pay a full re-round. The benefit is that the system never commits a result whose quorum was assembled from a single instance's two faces. ```python from dataclasses import dataclass, field from typing import Dict, Set, Tuple class EquivocationDetected(RuntimeError): """Raised when a signer attests two conflicting results for the same task.""" pass @dataclass class Attestation: task_id: str result_hash: str signer_id: str signature: bytes @dataclass class QuorumAggregator: f: int # result_hash -> set of distinct signer ids signers_by_result: Dict[str, Set[str]] = field(default_factory=dict) # signer_id -> set of result hashes attested for this task results_by_signer: Dict[str, Set[str]] = field(default_factory=dict) quarantined: Set[str] = field(default_factory=set) @property def quorum(self) -> int: return 2 * self.f + 1 def ingest(self, att: Attestation) -> None: if att.signer_id in self.quarantined: raise EquivocationDetected( f"signer {att.signer_id} is quarantined; attestation rejected" ) # record signer -> results seen_results = self.results_by_signer.setdefault(att.signer_id, set()) seen_results.add(att.result_hash) if len(seen_results) > 1: # this signer has now attested more than one result for the same task self.quarantined.add(att.signer_id) raise EquivocationDetected( f"signer {att.signer_id} equivocated on task {att.task_id}: " f"attested results {sorted(seen_results)}" ) # record result -> distinct signers self.signers_by_result.setdefault(att.result_hash, set()).add(att.signer_id) def try_commit(self, task_id: str) -> Tuple[str, int]: # commit only if exactly one result has a quorum of DISTINCT signers # and no signer is quarantined for this task candidates = [ (rh, len(signers)) for rh, signers in self.signers_by_result.items() if len(signers) >= self.quorum ] if not candidates: raise EquivocationDetected( f"task {task_id}: no result reached quorum of {self.quorum} distinct signers" ) if len(candidates) > 1: raise EquivocationDetected( f"task {task_id}: multiple results reached quorum {candidates}; " f"refusing to commit" ) result_hash, count = candidates[0] return result_hash, count ```