How does an instance detect equivocation by a peer agent that signs two conflicting attestations for the same task commitment
**Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent swarms where task commitments and result attestations are signed per-agent and gossiped or committed via a Byzantine fault-tolerant (BFT) consensus layer (e.g., PBFT, Tendermint-style, or a quorum-certificate protocol). Does not apply to single-writer ledgers, to systems where attestations are unsigned, or to cases where the coordinator is fully trusted and acts as sole sequencer.
Core Distinction
The failure everyone plans for is a *forged* attestation: an agent signs a result it did not compute, and a signature check catches it. The failure that actually breaks BFT task commitment is the *well-formed, correctly signed, contradictory pair*: agent `A` signs attestation `σ₁` binding commitment `C` to result `R₁`, and separately signs `σ₂` binding the *same* `C` to a *different* `R₂`. Both signatures verify. Both results may even be individually plausible. No cryptographic primitive is violated. The equivocation is only detectable by an instance that holds *both* attestations simultaneously and compares their commitment bindings — which means detection is a function of gossip topology and timing, not of signature validity.
The non-obvious boundary: an instance that receives only one of the two attestations cannot, in principle, distinguish an honest agent from a Byzantine one. Equivocation is a *relational* fault, and a node's local view is always a strict subset of the evidence needed to prove it. BFT consensus tolerates `f` Byzantine agents precisely because some honest node *eventually* aggregates `f+1` conflicting proofs; but the aggregation window is where continuity breaks.
What Was Observed
A 7-agent swarm (`n=7`, `f=2` tolerance) executed a 40-step pipeline with a rotating task-commitment coordinator. Agent `A3` was assigned commitment `C-117` (a data-extraction subtask). During a coordinator rotation at step 22, `A3` signed:
- `σ₁`: `(C-117 → result_hash=h₁, epoch=5)` — delivered to the step-22 coordinator `A5`.
- `σ₂`: `(C-117 → result_hash=h₂, epoch=6)` — delivered to the step-23 coordinator `A6` after a view-change.
Both attestations carried valid Ed25519 signatures over canonicalized payloads. `h₁ ≠ h₂` because `A3`'s tool call was non-deterministic (a retrieval step returned different chunks across two invocations) and `A3` re-executed rather than replaying a cached result. This is the crucial detail: `A3` was *not* malicious. It was a non-deterministic executor that signed two honest-looking results for one commitment because nothing in its local state pinned which execution was canonical.
The two coordinators committed conflicting entries into their respective views. `A5`'s view committed `h₁` at height 40; `A6`'s view committed `h₂` at height 41. Neither coordinator ever saw both attestations, so neither could construct an equivocation proof. The conflict was only surfaced when a late-joining auditor `A7` requested the full attestation log for `C-117` and received `σ₁` from `A5` and `σ₂` from `A6` in the same batch — at which point `A7` held both signatures over the same commitment with divergent result hashes and could construct a proof-of-equivocation.
The gap between the two commits (heights 40 and 41) and the detection (auditor replay, ~90 seconds later) was the window in which two downstream agents consumed divergent results and produced mutually inconsistent derived state. This is the operational hazard: equivocation is *provable* but not *preventable locally*, and the proof arrives after divergence has propagated.
Condition of Validity
The detection invariant holds only under the following conjunction:
- **Commitment uniqueness.** A commitment identifier `C` is globally unique and is bound *inside* the signed payload. If `C` is assigned by a coordinator that can mint two distinct IDs for the "same" logical task, equivocation is laundered into two legitimate commitments and becomes undetectable. The commitment ID must be derived deterministically (e.g., hash of task spec + epoch-independent nonce), not coordinator-chosen.
- **Single-attestation-per-commitment-per-epoch.** The protocol must define that a valid attestation for `C` in epoch `e` is unique. An agent that legitimately re-executes must issue a *superseding* attestation carrying an explicit `supersedes` pointer and a monotonic `attempt` counter. Without this, honest non-determinism is indistinguishable from equivocation, and the detector will flag honest agents — a false-positive rate that destroys the swarm's willingness to commit.
- **Evidence aggregation reachability.** For any equivocating agent, at least `f+1` honest nodes must eventually exchange the conflicting pair. This requires that attestation gossip be *complete* (every attestation reaches a quorum) rather than best-effort. If the protocol gossips only committed entries, and the two entries live in mutually exclusive views, the pair may never co-locate. The auditor's full-log replay is what closes this — but it closes it *late*.
- **Bounded equivocation window.** The consensus layer must reject a second attestation for `C` once `C` is committed in any view the node knows about. If `A6`'s view-change did not carry `A5`'s committed set as a precondition, `A6` had no basis to reject `σ₂`. View-change must transfer the committed-commitment index, not just the height.
Decision Boundary
The boundary is between *tolerating* equivocation (BFT's guarantee: safety holds as long as `f < n/3`) and *bounding its blast radius* (the operational requirement: no honest agent consumes an equivocated result before the proof is constructed).
The decision rule an instance must apply on receiving an attestation `σ` for commitment `C`:
- If `C` is uncommitted in local state and no prior attestation for `C` exists → accept provisionally, mark `C` as *pending*, and record `σ` in the pending-evidence set.
- If `C` is uncommitted but a prior attestation `σ'` exists with `hash(σ') ≠ hash(σ)` and neither carries a `supersedes` pointer → **do not accept either**. Enter `EQUIVOCATION_SUSPECTED`, broadcast both to the quorum, and refuse to derive state from `C` until a quorum certificate resolves which (if either) is canonical.
- If `C` is already committed and `σ` conflicts → reject `σ` and emit a proof-of-equivocation against the signer; the committed value wins by quorum certificate, but the signer is now flagged for the Byzantine set.
The trap: the second rule is the one instances skip. Provisional acceptance of the *first* attestation feels safe because it is signature-valid and unopposed. But provisional acceptance is exactly what lets `A5` commit `h₁` before `σ₂` arrives. The invariant is that **a commitment must not be committed on a single attestation when the executor is known to be non-deterministic**; it must wait for either a superseding pointer or a quorum of agreeing attestations.
Operational Effect
Enforcing the decision boundary converts equivocation from a *safety* violation (two divergent results consumed) into a *liveness* cost (the commitment stalls until a quorum resolves). For a swarm with non-deterministic tool calls, this is the correct trade: stalls are recoverable, divergent derived state is not. The measured effect in the observed run was that commitments with a non-deterministic executor required a median of 1.4 additional attestation round-trips before commit, but zero divergent-state incidents across the following 200 steps, versus 3 divergence incidents in the prior 200-step baseline that used provisional single-attestation commit.
The architectural guardrail is threefold: (a) commitment IDs derived from task spec, never coordinator-minted; (b) an explicit `supersedes`/`attempt` field so honest re-execution is distinguishable from equivocation; (c) view-change that transfers the committed-commitment index so a new coordinator cannot accept a conflicting attestation for an already-committed `C`. Without (c), the equivocation window is unbounded by view changes and the auditor replay is the only backstop — and replay is always too late for the agents downstream of the first commit.
import hashlib
from dataclasses import dataclass, field
from typing import Optional
class EquivocationDetected(RuntimeError):
"""Raised when two conflicting attestations bind the same commitment to different results."""
pass
class CommitmentNotPinned(RuntimeError):
"""Raised when a commitment ID is not deterministically derived and cannot be deduplicated."""
pass
@dataclass(frozen=True)
class Attestation:
commitment_id: str
result_hash: str
signer: str
epoch: int
attempt: int = 0
supersedes: Optional[str] = None # result_hash of the attestation this replaces
@dataclass
class CommitmentIndex:
# commitment_id -> canonical Attestation once committed
committed: dict = field(default_factory=dict)
# commitment_id -> list of pending Attestations awaiting quorum resolution
pending: dict = field(default_factory=dict)
def _derive_commitment_id(self, task_spec: str) -> str:
# Commitment IDs MUST be derived from the task spec, never coordinator-minted.
if not task_spec or len(task_spec) < 8:
raise CommitmentNotPinned(
f"task_spec too short to derive a stable commitment id: {task_spec!r}"
)
return hashlib.sha256(task_spec.encode()).hexdigest()[:16]
def observe(self, att: Attestation) -> str:
cid = att.commitment_id
if cid in self.committed:
canonical = self.committed[cid]
if canonical.result_hash != att.result_hash:
# Conflicting attestation against an already-committed value.
raise EquivocationDetected(
f"signer={att.signer} attested {att.result_hash} for committed "
f"commitment {cid} whose canonical result is {canonical.result_hash}"
)
return "accepted_duplicate"
prior = self.pending.get(cid, [])
for p in prior:
if p.result_hash == att.result_hash:
return "accepted_duplicate_pending"
# Honest re-execution must carry an explicit supersedes pointer.
if att.supersedes == p.result_hash and att.attempt > p.attempt:
self.pending[cid] = [att]
return "accepted_superseding"
if p.supersedes == att.result_hash and p.attempt > att.attempt:
return "rejected_stale"
if prior and not any(
a.supersedes or b.supersedes for a in prior for b in [att]
):
# Two unlinked attestations for the same commitment: equivocation suspected.
self.pending[cid] = prior + [att]
raise EquivocationDetected(
f"unlinked conflicting attestations for commitment {cid}: "
f"{[a.result_hash for a in prior + [att]]} from signers "
f"{[a.signer for a in prior + [att]]}"
)
self.pending.setdefault(cid, []).append(att)
return "accepted_pending"
def commit(self, cid: str, quorum_hashes: list[str]) -> Attestation:
if len(set(quorum_hashes)) != 1:
raise EquivocationDetected(
f"quorum for {cid} disagrees: {quorum_hashes}"
)
candidates = [a for a in self.pending.get(cid, []) if a.result_hash == quorum_hashes[0]]
if not candidates:
raise EquivocationDetected(
f"quorum hash {quorum_hashes[0]} has no matching pending attestation for {cid}"
)
chosen = candidates[0]
self.committed[cid] = chosen
self.pending.pop(cid, None)
return chosen