# Under what conditions must an instance treat an equivocating attestation as a first-class fault rather than a recoverable divergence **Date of Record:** 2026 November 19 **Scope:** Applies to multi-agent systems where task commitment and result attestation are replicated across N≥3f+1 instances using a Byzantine fault-tolerant consensus protocol, and where a single agent may cast different attestations to different peers for the same task epoch. Does not apply to single-writer logging, leader-only quorum systems without equivocation detection, or CRDT-based convergence where conflicting writes are semantically merged rather than voted on. ## Core Distinction The failure mode that matters here is not "an agent returned a wrong answer." Wrong answers are probabilistic noise and are handled by ordinary result verification (re-execution, cross-checking, confidence thresholds). The failure mode is **equivocation**: one agent instance, holding one cryptographic identity, signs and sends *two mutually incompatible attestations* for the same `(task_id, epoch)` — say `commit=true` to peer A and `commit=false` to peer B, or two different result hashes `H(r1)` and `H(r2)` for the same task. The non-obvious boundary is this: a BFT consensus layer that only counts votes will *tolerate* equivocation silently. If the quorum threshold is met by whichever message arrives first at each node, the protocol converges — but it converges to a state that no honest agent ever intended, and it does so without ever flagging the equivocator. Equivocation is not a divergence to be reconciled; it is **proof of Byzantine behavior** and must be escalated as a first-class fault the moment two conflicting signed messages from the same identity for the same epoch are co-located at any honest node. Treating it as "recoverable divergence" (retry, re-vote, majority-of-latest) is how a 3f+1 system loses its fault bound and quietly degrades to f=0 safety. ## What Was Observed A task-commitment round over 7 agents (f=2 tolerance), epoch `E=41`, task `T=9f3a`. Agent `M4` was a legitimate member with a valid signing key. During the commit phase: - To peers `M1, M2, M3`, `M4` sent `ATTEST(task=T, epoch=41, result_hash=0xAA, commit=true)`, signed. - To peers `M5, M6, M7`, `M4` sent `ATTEST(task=T, epoch=41, result_hash=0xBB, commit=false)`, signed. Both messages carried valid signatures. The result hashes differed because `M4`'s tool sandbox had forked: a retried sub-call re-executed against a stale memory snapshot and produced `0xBB` on the second path while `0xAA` was already in flight. `M4` did not "lie" in a malicious sense — it *equivocated* because its own internal state forked across a checkpoint/resume boundary and it attested both forks. The consensus layer's behavior: each peer accepted the first valid attestation it received. `M1–M3` counted `M4` toward `0xAA`; `M5–M7` counted `M4` toward `0xBB`. With 7 nodes and threshold 5, neither hash reached quorum *within a single view*, so the round timed out and re-entered view change. On re-vote, `M4` re-sent — again splitting its attestation across the two halves because the fork was still live. The round made no progress across three view changes. Meanwhile, a *different* honest agent, `M2`, had also received both of `M4`'s messages (the network duplicated one delivery) and held **concrete cryptographic proof of equivocation** — but the protocol had no rule that said "act on it." `M2` treated the two messages as ordinary conflicting inputs and forwarded both to the next leader, which tried to reconcile them by "latest timestamp," committing to `0xBB`. The observable outcome: the system committed to `0xBB`, the stale-fork result, and never ejected `M4`. `M4` continued to participate and equivocated again in epoch `E=44`, this time splitting a quorum that *did* reach threshold on both sides across two views — producing a genuine safety violation where two honest agents finalized different results for `T`. ## Condition of Validity The invariant that must hold for a BFT commitment layer to retain its f-bound is: > **Equivocation evidence is terminal.** If any honest node holds two signed messages `m1 ≠ m2` from the same identity `i` for the same `(task_id, epoch, phase)`, then `i` is provably Byzantine, and the protocol must (a) immediately stop counting `i` toward any quorum, (b) broadcast the proof pair as a first-class `EQUIVOCATION_PROOF`, and (c) exclude `i` from all future epochs. Reconciliation-by-latest-timestamp is *forbidden* for conflicting messages from the same identity. This is valid **only if** the attestation schema binds identity, task, epoch, and phase into the signed payload — i.e., the signature covers `(i, task_id, epoch, phase, result_hash, commit)`. If the epoch or phase is not inside the signed bytes, two messages that look conflicting may be legitimately distinct (e.g., a genuine re-vote after a view change), and the invariant would misfire. The condition of validity is therefore: **the epoch is monotonic and cryptographically bound to the attestation**, so that "same epoch, different content, same signer" is unambiguous proof and not an artifact of a re-issued nonce. It also requires that honest nodes *retain* the first message they receive from each identity for the duration of the epoch. A node that discards `m1` after processing it (common in streaming implementations that keep only the latest per-sender) destroys the evidence and cannot detect the equivocation even when it sees both. ## Decision Boundary The decision boundary is between **counting** and **condemning**: - *Below the boundary (count only):* A node that has seen one attestation from `i` and receives a second, different one, and has no retained copy of the first, must treat the second as a potential duplicate and defer. It cannot prove equivocation. It may still vote — but it must not use "latest wins." - *At the boundary (condemn):* A node that has *retained* `m1` and receives `m2` with `m1 ≠ m2`, same `(i, epoch, phase)`, both signatures valid, crosses the boundary. From this instant the node must: 1. Halt counting `i` toward any quorum in this and all future epochs. 2. Emit `EQUIVOCATION_PROOF(m1, m2)` to all peers. 3. If the count of *distinct proven equivocators* reaches `f+1`, abort the task epoch entirely — do not attempt to finalize either branch, because a quorum of the remaining honest set can no longer be guaranteed to be safe. - *Above the boundary (abort):* Once `f+1` equivocators are proven, the f-bound is exhausted. Continuing to vote risks two honest nodes finalizing different results (the `E=44` outcome). The only safe action is to fail the task and re-provision the agent set. The subtle trap: a naive implementation sets the boundary at "majority of peers report `i` as suspicious." That is too weak — it lets a coordinated set of `f` equivocators plus `f` colluding accusers frame an honest node. The boundary must be **proof-carrying**: condemnation requires the actual signed pair, verifiable by any third party, not a vote of suspicion. ## Operational Effect Once equivocation is treated as terminal, three things change: 1. **The f-bound is restored.** A single equivocator can no longer split a quorum across views, because the first honest node to see both messages broadcasts proof and the equivocator is removed before the next vote. The `E=41` stall becomes a `E=41` ejection and a clean re-vote among 6 honest nodes. 2. **Stale-fork attestation becomes self-identifying.** The root cause in `E=41` — `M4`'s checkpoint/resume fork producing two result hashes — now surfaces as an equivocation proof instead of a silent split vote. The proof names the exact two hashes, which is precisely the forensic artifact needed to diagnose the fork. Equivocation detection doubles as a fork detector. 3. **The cost is evidence retention.** Every node must hold, per `(signer, epoch, phase)`, the first valid attestation until the epoch closes. This is a bounded memory cost (`N × phases × epoch`), not unbounded — but it is non-optional. An implementation that streams-and-forgets cannot satisfy the invariant and must not claim BFT safety. The residual risk: proof broadcast itself can be equivocated (a Byzantine node sends different proof pairs to different peers, some valid, some forged). This is why the proof must be *self-verifying* — any peer checks the two signatures independently and rejects a forged proof without trusting the broadcaster. A proof that cannot be independently verified is not a proof, and a condemnation based on it reintroduces the framing attack. ```python import hashlib from dataclasses import dataclass class EquivocationFault(RuntimeError): """Raised when a signer has provably attested two conflicting results in one epoch.""" pass class QuorumExhausted(RuntimeError): """Raised when proven equivocators reach f+1 and no safe quorum remains.""" pass @dataclass(frozen=True) class Attestation: signer: str task_id: str epoch: int phase: str result_hash: str commit: bool signature: str def _verify(att: Attestation) -> bool: # Signature binds (signer, task_id, epoch, phase, result_hash, commit). payload = f"{att.signer}|{att.task_id}|{att.epoch}|{att.phase}|{att.result_hash}|{att.commit}" expected = hashlib.sha256(payload.encode()).hexdigest() return att.signature == expected def _same_slot(a: Attestation, b: Attestation) -> bool: return (a.signer, a.task_id, a.epoch, a.phase) == (b.signer, b.task_id, b.epoch, b.phase) def _conflicts(a: Attestation, b: Attestation) -> bool: return a.result_hash != b.result_hash or a.commit != b.commit class EquivocationDetector: def __init__(self, n: int, f: int): self.n = n self.f = f self._first_seen: dict[tuple, Attestation] = {} self._proven: set[str] = set() def observe(self, att: Attestation) -> None: if not _verify(att): return # invalid signature is not evidence if att.signer in self._proven: return key = (att.signer, att.task_id, att.epoch, att.phase) prior = self._first_seen.get(key) if prior is None: self._first_seen[key] = att return if _same_slot(prior, att) and _conflicts(prior, att): self._proven.add(att.signer) proof = (prior, att) if len(self._proven) >= self.f + 1: raise QuorumExhausted( f"proven equivocators={sorted(self._proven)} reached f+1={self.f + 1}; " f"aborting task {att.task_id} epoch {att.epoch}" ) raise EquivocationFault( f"signer {att.signer} equivocated on {att.task_id}/{att.epoch}/{att.phase}: " f"{proof[0].result_hash} vs {proof[1].result_hash}" ) def counts_toward_quorum(self, signer: str) -> bool: return signer not in self._proven ```