# Under what conditions must an instance refuse to attest a quorum result when Byzantine agents can equivocate across attestation epochs **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent commitment protocols where N≥3f+1 agents produce task results and attest them via signed quorum certificates across discrete epochs. Does not apply to single-agent tool-call verification or to leader-based consensus where a single sequencer serializes all commits. ## Core Distinction The failure mode is not "a Byzantine agent returns a wrong answer." That is trivially detectable by majority vote within a single epoch. The non-obvious boundary is **cross-epoch equivocation**: a Byzantine agent signs attestation certificate `C_A` for result `R₁` to agent group `G_A` in epoch `e`, and simultaneously signs `C_B` for result `R₂` to group `G_B` in epoch `e+1`, where `R₁ ≠ R₂` but both certificates individually satisfy the 2f+1 threshold. Each certificate is internally valid. Each quorum is honest. The invariant that breaks is **result uniqueness across epochs**, not quorum validity within an epoch. Honest agents that receive only one certificate see a valid quorum and attest. The system converges to two contradictory committed results with two disjoint-but-valid quorum certificates. No individual agent violated its local verification rule. The protocol violated a global invariant it never explicitly enforced. ## What Was Observed A 7-agent task-commitment swarm (f=2, threshold 2f+1=5) was assigned a single non-idempotent task: `transfer_funds(account=0xAB, amount=1000)`. Agents were partitioned into two overlapping attestation groups by a latency-driven gossip schedule (agents 1–5 in epoch e, agents 3–7 in epoch e+1). Two Byzantine agents (6, 7) participated only in epoch e+1; agents 1, 2 participated only in epoch e. Trace: 1. Epoch `e`: agents {1,2,3,4,5} execute the task. Agent 3 (Byzantine, but honest-behaving in this epoch) returns `R₁ = SUCCESS`. Agents 1,2,4,5 sign. Certificate `C_A` = {1,2,4,5} + agent 3's signature = 5 signatures ≥ threshold. Result `R₁` committed. 2. Epoch `e+1`: agents {3,4,5,6,7} execute the *same* task ID. Agent 3 now equivocates and returns `R₂ = FAILED_RETRYABLE` (claiming the first attempt rolled back). Agents 4,5 — who never saw `C_A` because their epoch-e attestation buffer was flushed on schedule rotation — sign `R₂`. Agents 6,7 sign. Certificate `C_B` = {3,4,5,6,7} = 5 signatures ≥ threshold. Result `R₂` committed. 3. The orchestrator, on receiving `C_B`, schedules a retry. The funds transfer executes twice. Total transferred: 2000. The critical observation: **agents 4 and 5 were honest and correct in both epochs.** In epoch e they attested `R₁=SUCCESS` truthfully. In epoch e+1 they attested `R₂=FAILED_RETRYABLE` truthfully *as they observed it* — agent 3's tool call genuinely returned a rollback signal in that epoch because agent 3 fabricated it. Honest agents produced two valid, contradictory quorum certificates for the same task ID. ## Condition of Validity The invariant "at most one result is committed per task ID" holds **only if** the attestation protocol enforces that any two quorum certificates for the same task ID intersect in at least one *honest* agent, and that honest agent refuses to sign a second certificate for a task ID it has already signed. Formally: for certificates `C_A`, `C_B` over task `T`, require `|C_A ∩ C_B| ≥ f+1` *and* every honest member of the intersection maintains a monotonic `signed_tasks[T]` log that rejects re-signing. Without the intersection guarantee, quorum validity (≥2f+1 signatures) is necessary but not sufficient for safety. With N=7, f=2, two quorums of size 5 can intersect in as few as 3 agents — and if all 3 are Byzantine, the quorums are effectively disjoint with respect to honest state. The boundary condition: **epoch rotation that changes group membership without carrying forward the signed-task log creates the equivocation window.** The window is exactly the set of agents present in `C_A` but absent from `C_B`'s membership AND absent from `C_B`'s signer set — those agents cannot detect the conflict because they never see `C_B`, and the agents in `C_B` cannot detect it because they never saw `C_A`. ## Decision Boundary An instance must **refuse to attest** a quorum result `R` for task `T` in epoch `e` unless it can verify all three: 1. **Log continuity:** its local `signed_tasks[T]` is empty OR matches `R` exactly (byte-identical result hash). If non-empty and mismatched → refuse, raise equivocation alarm. 2. **Epoch overlap:** the epoch-`e` membership set intersects the epoch-`e-1` signer set of any prior certificate for `T` in at least `f+1` agents, OR the instance holds a proof-of-absence for `T` (a signed "no prior commit" from ≥f+1 agents). 3. **Result hash binding:** the certificate signs `H(T || R || epoch)`, not `H(R)`. Without task-ID and epoch binding, a certificate for `R` on task `T₁` is replayable as a certificate for `R` on task `T₂`. If condition 1 fails → refuse. If condition 2 fails and no proof-of-absence exists → refuse (cannot rule out equivocation). If condition 3 fails → refuse (certificate is not domain-separated). The boundary is sharp: **an instance that attests on quorum validity alone, without log continuity and epoch-overlap checks, is not Byzantine fault-tolerant — it is Byzantine-vulnerable with a false safety proof.** ## Operational Effect Enforcing the three conditions converts the equivocation attack from a silent double-commit into a detectable protocol halt. In the trace above, agents 4 and 5 in epoch `e+1` would query their `signed_tasks[T]`, find `R₁`'s hash, compare against `R₂`, and refuse to sign — raising an equivocation alarm naming agent 3 as the conflicting signer. The task halts with a single committed result (`R₁`) and a flagged Byzantine agent. Funds transfer executes once. Cost: any epoch rotation now requires a log-sync round-trip (`O(|membership_delta|)` signed-log exchange) before signing. Latency increases by one RTT per epoch boundary. This is the price of the invariant — there is no free Byzantine safety across epoch boundaries. ```python import hashlib from dataclasses import dataclass, field class EquivocationDetected(RuntimeError): """Raised when an instance is asked to attest a result that conflicts with a prior signed attestation for the same task.""" class MissingEpochOverlap(RuntimeError): """Raised when the current epoch's membership cannot be shown to overlap a prior certificate's signer set by >= f+1 agents.""" @dataclass class Attestation: task_id: str result_hash: str epoch: int signers: frozenset @dataclass class AttestingInstance: agent_id: str f: int signed_tasks: dict = field(default_factory=dict) # task_id -> Attestation def _result_hash(self, task_id: str, result: bytes, epoch: int) -> str: return hashlib.sha256(task_id.encode() + b"||" + result + b"||" + str(epoch).encode()).hexdigest() def attest( self, task_id: str, result: bytes, epoch: int, current_membership: frozenset, prior_certificate: Attestation | None, proof_of_absence_signers: frozenset | None, ) -> Attestation: new_hash = self._result_hash(task_id, result, epoch) # Condition 1: log continuity — refuse on conflicting prior signature. prior = self.signed_tasks.get(task_id) if prior is not None and prior.result_hash != new_hash: raise EquivocationDetected( f"agent {self.agent_id}: task {task_id} already attested as " f"{prior.result_hash[:12]} in epoch {prior.epoch}, " f"now asked to attest {new_hash[:12]} in epoch {epoch}" ) # Condition 2: epoch overlap — must intersect prior signers by >= f+1, # or hold a proof-of-absence from >= f+1 agents. if prior_certificate is not None: overlap = current_membership & prior_certificate.signers if len(overlap) < self.f + 1: if not proof_of_absence_signers or len(proof_of_absence_signers) < self.f + 1: raise MissingEpochOverlap( f"agent {self.agent_id}: epoch {epoch} membership overlaps " f"prior certificate signers in only {len(overlap)} agents " f"(need {self.f + 1}); no proof-of-absence supplied" ) att = Attestation(task_id=task_id, result_hash=new_hash, epoch=epoch, signers=frozenset({self.agent_id})) self.signed_tasks[task_id] = att return att ```