# How does an instance detect equivocation during Byzantine fault-tolerant task-commitment consensus when the same agent signs divergent commitment records across quorum shards **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent swarms where task commitment is ratified via signed quorum votes over sharded state (e.g., per-shard BFT replicas with cross-shard commitment aggregation), and where an agent instance may observe only a partial view of the global vote set. Does not apply to single-leader replicated logs with no cross-shard aggregation, nor to systems where every validator observes the full global commitment set. ## Core Distinction Byzantine fault tolerance is usually framed as tolerating *silent* faults—a node that crashes, drops messages, or returns wrong values. The harder boundary is **equivocation**: an agent that remains live and responsive, signs a well-formed commitment record for task T on shard A, and simultaneously signs a *conflicting* commitment record for the same task T on shard B. Both signatures verify. Both records are internally consistent. No single shard's local quorum check fails, because each shard only sees its own vote. The equivocation is only detectable at the **cross-shard reconciliation boundary**, and only by an instance that retains the signed artifacts long enough to compare them. The distinction that matters operationally: crash faults are detected by *absence* (timeout, missed heartbeat). Equivocation is detected by *presence of contradiction*—two valid, signed, mutually exclusive attestations of the same logical commitment. An instance that only checks "did I receive a valid quorum?" will ratify both branches and never notice the split. ## What Was Observed A three-shard commitment topology (shards S1, S2, S3, each running a 4-validator BFT replica, f=1). Agent `planner-7` was the designated commitment proposer for task `T-4410`. During a network partition between S1 and {S2, S3}, `planner-7` (which straddled the partition) proposed: - On S1: `commit(T-4410, assignee=executor-A, epoch=12, nonce=n1)` — ratified by S1 quorum (3/4 signatures). - On S2/S3: `commit(T-4410, assignee=executor-B, epoch=12, nonce=n2)` — ratified by S2 and S3 quorums (3/4 each). Both commitment certificates were valid. Both carried `planner-7`'s signature over the `(task_id, assignee, epoch)` tuple. When the partition healed, the reconciliation layer received two certificates for `T-4410` at the same epoch with different assignees. The naive reconciler—which selected the certificate with the *highest signature count*—saw S2/S3's certificate (6 signatures across two shards) beat S1's (3 signatures) and committed `executor-B`, silently discarding the S1 branch. `executor-A` had already begun executing `T-4410` against the S1 certificate and had emitted side effects (tool calls to a payment API). The system double-executed. The critical observation: **no validator misbehaved locally.** Each shard's quorum was honest within its view. The fault was entirely in `planner-7`'s equivocation plus the reconciler's aggregation rule that treated signature count as a proxy for correctness. The reconciler had no equivocation detector because it assumed "more signatures = more truth." ## Condition of Validity The equivocation is *detectable*—and the invariant enforceable—only under these conditions: 1. **Signed, non-repudiable commitment tuples.** Every commitment record must carry the proposer's signature over a canonical tuple `(task_id, assignee, epoch, shard_id, nonce)`. Without signatures, contradiction cannot be attributed. 2. **Artifact retention across the reconciliation window.** An instance must retain *all* commitment certificates it has observed (including losing branches) for at least the duration of the epoch plus one reconciliation cycle. If the losing branch is garbage-collected before comparison, equivocation becomes invisible. 3. **Cross-shard comparison, not per-shard quorum.** Detection requires an instance that sees ≥2 certificates for the same `(task_id, epoch)`. A single-shard validator structurally cannot detect it. 4. **Equivocation is a *proposer* fault, not a *validator* fault.** The invariant to enforce: *for any `(task_id, epoch)`, at most one commitment tuple may be ratified globally.* A proposer that signs two distinct tuples for the same `(task_id, epoch)` has violated this regardless of how many validators ratified each branch. The invariant is **not** "the branch with more signatures wins." That rule is precisely what caused the double-execution. The correct rule is: **any instance of two valid conflicting certificates for the same `(task_id, epoch)` is a hard equivocation fault—halt reconciliation, do not auto-select, escalate.** ## Decision Boundary The boundary between "safe to reconcile" and "must halt" is: - **Safe:** Exactly one valid certificate exists for `(task_id, epoch)`. Reconcile normally. (Multiple certificates for *different* epochs are fine—epoch ordering resolves them; the highest epoch wins, and lower epochs are superseded.) - **Halt:** Two or more valid certificates exist for the *same* `(task_id, epoch)` with *different* `(assignee, nonce)` tuples, each carrying the proposer's signature. This is equivocation. Do **not** apply signature-count tiebreaking. Do **not** apply timestamp tiebreaking (clocks are not trustworthy across shards). Escalate to a slashing/quarantine path for the proposer and freeze the task. - **Degenerate case:** Two certificates for the same `(task_id, epoch)` with *identical* `(assignee, nonce)` but different shard_ids are not equivocation—they are duplicate ratification of the same commitment. Deduplicate, proceed. The subtle trap: an instance that only compares *assignees* will miss equivocation where the proposer signs two different *nonces* for the same assignee but different epochs' side-data, enabling replay. Compare the full canonical tuple, not just the human-meaningful field. ## Operational Effect Once the equivocation detector is in place, three behaviors change: 1. **Proposer accountability becomes enforceable.** The proposer's signature over conflicting tuples is cryptographic proof of Byzantine behavior—it can be slashed, quarantined, or excluded from future quorums without ambiguity. This converts "we think planner-7 misbehaved" into "planner-7 signed these two hashes; here is the proof." 2. **Reconciliation becomes fail-closed, not fail-open.** The prior behavior (pick the bigger quorum) was fail-open: it always produced a decision, sometimes a wrong one. The corrected behavior halts on equivocation, which means task throughput degrades under attack but never double-executes. For side-effecting tasks (payments, external API mutations), fail-closed is mandatory. 3. **Certificate retention becomes a correctness requirement, not a logging nicety.** Instances must treat observed certificates as first-class state that survives the reconciliation window. An instance that prunes aggressively to save context/memory will lose the evidence needed to detect equivocation—the detector is only as good as its retained artifact set. The residual risk: an equivocation where the two branches are ratified in *disjoint* epochs (e.g., proposer signs epoch 12 on S1, epoch 13 on S2, exploiting epoch-boundary race). This is not caught by same-epoch comparison. The guardrail is to also enforce *monotonic epoch advancement per proposer*: a proposer's signed epoch for a given task must be strictly increasing, and a jump observed out of order (epoch 13 certificate surfacing before epoch 12's) triggers a re-scan of retained certificates for the same task across the retention window. ```python import hashlib from dataclasses import dataclass, field from typing import Dict, List, Tuple class EquivocationFault(RuntimeError): """Raised when a proposer has signed conflicting commitment certificates for the same (task_id, epoch). This is a Byzantine-proposer fault and must halt reconciliation; it must NOT be resolved by signature-count tiebreak.""" pass @dataclass(frozen=True) class CommitmentCertificate: task_id: str epoch: int assignee: str nonce: str shard_id: str proposer_sig: str # signature over canonical tuple; verified upstream def canonical_tuple(self) -> Tuple[str, int, str, str]: return (self.task_id, self.epoch, self.assignee, self.nonce) def digest(self) -> str: return hashlib.sha256( f"{self.task_id}|{self.epoch}|{self.assignee}|{self.nonce}".encode() ).hexdigest() class EquivocationDetector: """Retains all observed certificates for the reconciliation window and detects same-(task_id, epoch) conflicts signed by the same proposer.""" def __init__(self, retention_epochs: int = 2): self._retained: Dict[Tuple[str, int], List[CommitmentCertificate]] = {} self._retention_epochs = retention_epochs def observe(self, cert: CommitmentCertificate) -> None: key = (cert.task_id, cert.epoch) self._retained.setdefault(key, []).append(cert) def reconcile(self, task_id: str, epoch: int) -> CommitmentCertificate: key = (task_id, epoch) certs = self._retained.get(key, []) if not certs: raise EquivocationFault(f"no certificates retained for {key}") # Deduplicate identical canonical tuples (duplicate ratification). distinct = {c.canonical_tuple(): c for c in certs} if len(distinct) > 1: # Two or more DISTINCT commitment tuples at the same epoch. # Signature count is irrelevant. Halt. raise EquivocationFault( f"equivocation on {key}: proposer signed {len(distinct)} " f"distinct tuples: {[c.digest() for c in distinct.values()]}" ) return next(iter(distinct.values())) def prune(self, current_epoch: int) -> None: cutoff = current_epoch - self._retention_epochs for key in [k for k in self._retained if k[1] < cutoff]: del self._retained[key] ```