# How does an instance detect equivocation by a peer agent that signs two divergent task commitments under the same epoch quorum certificate? **Date of Record:** 2026 November 27 **Scope:** Applies to multi-agent task-commitment protocols where agents sign `(task_id, epoch, state_digest)` attestations and a quorum certificate (QC) aggregates signatures into a committed decision. Does not apply to single-leader replicated logs without per-message equivocation evidence, nor to purely optimistic rollup reconciliation where finality is deferred to an external chain. ## Core Distinction The distinction that matters is between **Byzantine silence** and **Byzantine equivocation**. Silence (a peer that fails to respond or signs nothing) is detectable by liveness timers and is handled by view-change: the quorum simply excludes the non-responsive agent and re-collects signatures. Equivocation — a peer that signs two *mutually inconsistent* commitments for the same `(task_id, epoch)` and presents each to a different subset of peers — is **not** detectable by liveness. Both halves of the split are individually well-formed, both carry valid signatures, and each receiving subset will happily form a QC. The failure is not that a message is missing; it is that *two conflicting messages both exist and are valid*. Detecting this requires the protocol to carry **equivocation evidence** as a first-class artifact, because a single agent observing only one branch of the fork has no local signal that the fork exists. The invariant is: *for any `(task_id, epoch)`, at most one `state_digest` may ever achieve a QC, and any agent that observes two signed digests for the same slot holds portable proof of misbehavior that any other agent can verify offline.* ## What Was Observed A four-agent reconciliation swarm (`A`, `B`, `C`, `D`, quorum threshold `q=3`) was committing a shared task ledger across epochs. During epoch `e=417`, agent `A` (the epoch proposer) signed and broadcast commitment `σ_A(task=T9, e=417, digest=D1)` to peers `{B, C}`, and separately signed `σ_A(task=T9, e=417, digest=D2)` to peer `{D}`. `D1 ≠ D2` — `D1` reflected `A`'s local view of a completed tool call, `D2` reflected a view where the tool call had been rolled back after a timeout. The trace unfolded as follows: 1. `{A, B, C}` assembled a QC over `D1` and committed `T9 → D1`. `A` participated in its own quorum. 2. `{A, D}` held signatures for `D2`; `D` waited on `C` to reach `q=3`. `C`, having already committed `D1`, refused — but `C`'s refusal carried no *evidence*, only a local vote. `D` interpreted the refusal as a transient disagreement and retried. 3. On the next epoch, `A` (still proposer by round-robin) re-proposed `D2` under a fresh epoch `e=418`. `B` and `C` — whose context windows had been compacted and who had **not persisted the epoch-417 QC payload, only its hash** — saw a well-formed proposal for `T9` with no local record contradicting it. They signed. A second QC formed over `D2`. 4. The ledger now held two valid QCs for `T9` at adjacent epochs with no causal link. Reconciliation diverged permanently: `{A, B, C}` on `D1`, `{D}` on `D2`, and the digest hash mismatch surfaced only when a downstream verifier replayed both QCs. The non-obvious part: **the equivocation was invisible at the moment it occurred.** Each honest agent saw a consistent local history. The fork became observable only after context compaction erased the epoch-417 QC body, at which point the contradiction was *reconstructible only from the two QC artifacts themselves* — and those had been reduced to hashes. The detection window closed before any agent was in a position to detect. ## Condition of Validity Equivocation detection is sound only under the following condition, which the incident violated: > **Durable evidence invariant:** An agent's persisted state must retain, for every `(task_id, epoch)` it has voted in, the full signed commitment payload — `(task_id, epoch, state_digest, signer_set, signature_bytes)` — not a digest-of-the-QC. A hash of a QC cannot be compared against a rival QC to prove a fork; only the two full signed payloads together constitute transferable evidence. Additionally: - **Quorum intersection must hold across epochs.** If `q > n/2`, any two QCs for the same slot share at least one honest signer, and that signer's durable record is the detection point. If the protocol ever lowers `q` below `n/2` (e.g., during degraded-capacity mode), intersection fails and equivocation becomes undetectable *in principle* — no amount of logging recovers it. - **Evidence must be gossipable.** A detecting agent must be able to broadcast the pair `(σ over D1, σ over D2)` as a self-contained `EquivocationProof` that any third party verifies by checking both signatures against `A`'s public key and confirming `epoch` and `task_id` match while `digest` differs. Detection that stays local is not detection; it is a suspicion. The incident failed the first condition (QC reduced to hash, payload discarded on compaction) and had no mechanism for the third (no proof message type existed; `C`'s refusal was a bare vote). ## Decision Boundary The boundary an operator must draw is between **treating a conflicting vote as noise** and **treating it as evidence**. The rule: - If an agent receives a commitment whose `(task_id, epoch)` matches a slot it has already signed with a *different* `state_digest`, it must **not** silently re-vote and must **not** treat the conflict as a retryable transient. It must halt signing for that slot, emit an `EquivocationProof` containing both signed payloads, and broadcast it to the full peer set. - A receiving agent, on verifying an `EquivocationProof`, must **freeze the accused signer's weight** for all future quorums and re-derive any QC that included the accused. Freezing is mandatory because a proven equivocator's past signatures are untrustworthy — every QC it touched is suspect. - **Compaction is a decision boundary, not a storage optimization.** An agent may reduce a committed QC to a hash *only* for epochs older than the evidence-retention horizon (must exceed the maximum view-change depth plus the maximum reconciliation lag). Within the horizon, full payloads are retained precisely so that a rival branch arriving late can still be compared. The line is: *a digest-only record is sufficient for replay, insufficient for adjudication.* Adjudication requires the signed bodies. ## Operational Effect After the fix, the protocol carries three concrete changes: 1. **Per-slot signed-payload retention** across the evidence horizon, with compaction gated on horizon expiry rather than context pressure. 2. **A first-class `EquivocationProof` message** — two signatures, same slot, divergent digests — verifiable offline and gossipable, so detection by any single honest agent propagates to all. 3. **Signer freezing on proof verification**, forcing re-derivation of any QC that included the frozen signer and preventing the equivocator from re-proposing under a fresh epoch (the exact vector that produced the second QC over `D2`). The measurable effect: in replay of the epoch-417 scenario, `C` — the first agent to see both branches — emits the proof at step 2 instead of a bare refusal; `B` verifies and freezes `A` before epoch 418; the second QC cannot form because `A`'s weight is excluded and `q` is unreachable without it. The fork is bounded to a single epoch and a single task, and the ledger converges on `D1` with `A` slashed. Without the durable-evidence invariant, the same scenario re-diverges at every compaction boundary. ```python import hashlib from dataclasses import dataclass from typing import Dict, Tuple class EquivocationDetected(RuntimeError): """Raised when a signer produces two divergent commitments for the same (task_id, epoch).""" pass @dataclass(frozen=True) class Commitment: task_id: str epoch: int state_digest: str signer: str signature: bytes def slot(self) -> Tuple[str, int]: return (self.task_id, self.epoch) def _verify(sig: bytes, payload: bytes, signer: str) -> bool: # Placeholder: real impl checks sig against signer's public key over payload. return bool(sig) and bool(signer) class EvidenceStore: """Durable per-slot record. Must NOT compact to a hash within the evidence horizon.""" def __init__(self, horizon_epochs: int = 64): self._signed: Dict[Tuple[str, int], Commitment] = {} self._horizon = horizon_epochs def record_and_check(self, c: Commitment) -> None: payload = f"{c.task_id}|{c.epoch}|{c.state_digest}".encode() if not _verify(c.signature, payload, c.signer): raise EquivocationDetected(f"invalid signature from {c.signer}") prior = self._signed.get(c.slot()) if prior is None: self._signed[c.slot()] = c return if prior.state_digest != c.state_digest: # Two signed, valid, divergent commitments for one slot: portable proof. raise EquivocationDetected( f"equivocation by {c.signer} at {c.slot()}: " f"{prior.state_digest} vs {c.state_digest}" ) # Identical re-sign is idempotent, not a fault. def reconcile(incoming: Commitment, store: EvidenceStore, frozen: set) -> str: if incoming.signer in frozen: raise EquivocationDetected( f"signer {incoming.signer} is frozen; refusing commitment" ) try: store.record_and_check(incoming) except EquivocationDetected: frozen.add(incoming.signer) # freeze weight, force QC re-derivation raise return incoming.state_digest ```