# When must an instance withhold quorum attestation under equivocating peer agents: the attestation-epoch fork invariant **Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent systems where N ≥ 3f+1 agent instances commit to a shared task ledger and co-sign result attestations, and where a quorum certificate (QC) is aggregated from per-instance signed votes. Does not apply to single-agent self-verification, to leader-only commit schemes without independent attestation, or to systems whose transport guarantees total order of vote delivery. ## Core Distinction The failure this record isolates is not "a Byzantine agent lies." It is the boundary case where an honest instance must *withhold* its attestation vote even though the result it is being asked to sign is, by its own local check, correct. The distinction that matters operationally is between **content validity** (does the attested result match my recomputation?) and **epoch validity** (is this attestation being requested within the same commitment epoch in which I was assigned to verify it?). Byzantine fault-tolerant consensus for task commitment conflates these two because both are carried in the same signed vote payload. An equivocating peer—one that sends `commit(task, epoch=k)` to half the swarm and `commit(task, epoch=k+1)` to the other half—can produce two disjoint quorums that each individually satisfy content validity. Each quorum's members see a locally consistent, correct-looking result. The invariant that breaks is: *no two conflicting attestation certificates may both reach quorum size.* Content checks alone cannot enforce it; only epoch-scoped vote accounting can. ## What Was Observed A five-instance swarm (f=1, quorum = 3 of 5) was assigned a task `T` with a deterministic recomputation step. Instance `A` acted as commit proposer. During the commit round, `A`'s transport retried a partially-acknowledged broadcast after a 400 ms timeout. The retry carried an incremented epoch counter `k+1` because `A`'s local monotonic clock advanced past its epoch boundary during the stall. Instances `B` and `C` received the original `k` proposal; instances `D` and `E` received only the retried `k+1` proposal (the first delivery to them was dropped by a full receive buffer, not by `A`'s logic). All five instances recomputed the result and all five found it correct. `B` and `C` signed `(T, result, epoch=k)`. `D` and `E` signed `(T, result, epoch=k+1)`. `A`, as proposer, counted its own vote toward whichever epoch it currently held. The aggregator, keyed only on `(task_id, result_hash)` and not on epoch, merged the five signatures into a single certificate that *looked* like a 5-of-5 unanimous attestation. It was not. It was a forged quorum: two overlapping-but-distinct epoch cohorts whose union was counted as one. When a later auditor instance `F` (joining cold, replaying the log) tried to verify the certificate against the epoch-scoped commitment records, it found no single epoch with ≥3 signatures. The certificate was invalid under the actual consensus rule while being valid under the aggregator's rule. The trace: 1. `A` broadcasts `PROPOSE(T, epoch=k)` → delivered to `B`, `C`. 2. Stall; `A` epoch advances to `k+1`. 3. `A` broadcasts `PROPOSE(T, epoch=k+1)` → delivered to `D`, `E`; `B`, `C` receive it too but reject as stale-epoch duplicate. 4. `B`, `C` → `VOTE(T, result, k)`. `D`, `E` → `VOTE(T, result, k+1)`. 5. Aggregator collects 5 signatures, keys on `(T, result_hash)`, emits `QC(T, result, sigs=[B,C,D,E,A])`. 6. Auditor `F` replays: epoch `k` has votes `{B,C}` = 2 < 3. Epoch `k+1` has votes `{D,E}` = 2 < 3. No valid QC exists. `F` raises a verification discrepancy. The non-obvious part: **every honest instance behaved correctly.** The bug lives entirely in the aggregation key and in the absence of an epoch-binding invariant on the vote payload. No agent equivocated maliciously; the proposer's retry semantics manufactured the equivocation. ## Condition of Validity A result attestation is only admissible if it satisfies all three, jointly: - **Content validity:** the attested `result_hash` equals the recomputation of every signer over the committed task input. - **Epoch validity:** all signers' votes carry the identical epoch `k`, and `k` is the epoch in which the task was committed, not merely the epoch current at signing time. - **Quorum disjointness:** for any two certificates on the same `task_id`, their signer sets intersect in at least `f+1` instances, so that at least one honest instance would have to have double-signed to produce both. The failure above violates epoch validity and, transitively, quorum disjointness. The invariant to enforce is: *the aggregation key must be `(task_id, result_hash, epoch)`, and a vote whose epoch does not equal the locally-held commitment epoch for that task must be rejected at the signer before it is ever emitted.* An honest instance must withhold its signature when the requested epoch does not match its recorded commitment epoch—even if the content is correct—because signing across an epoch boundary is exactly what enables the split-quorum forgery. ## Decision Boundary The instance must decide, per attestation request, between three actions: - **Sign** — content valid AND request epoch == local commitment epoch for `task_id`. - **Withhold and flag** — content valid BUT epoch mismatch. Do not sign. Emit a `StaleEpochAttestation` signal to the auditor channel. This is the boundary case this record exists to name; the temptation is to sign because the math checks out. - **Reject** — content invalid, regardless of epoch. The boundary is sharp: epoch mismatch is never a "sign anyway, note the discrepancy" case. A single instance that signs across epochs can be the pivot that lets two sub-quorum certificates merge into a forged one. Withholding is the correct action even under pressure to reach quorum, because a withheld vote leaves the epoch cohort honestly short and forces the proposer to re-propose within a single epoch rather than paper over the split. ## Operational Effect Enforcing epoch-scoped aggregation converts a silent forged-quorum failure into a loud, recoverable re-proposal. The auditor's replay check (`≥3 signatures within one epoch`) becomes the ground truth; the aggregator's signature count becomes advisory only. In the observed incident, the fix reduced the failure from "invalid certificate accepted and downstream task marked complete" to "proposer re-proposes epoch `k+2` to all five, all five sign within `k+2`, valid 5-of-5 QC, auditor replay passes." The cost is one extra round trip on every epoch-boundary stall; the benefit is that no combination of honest-but-lagging instances can manufacture a quorum that never existed. The residual risk is proposer liveness: a proposer that keeps advancing epochs faster than votes propagate will starve quorum, which is why the epoch must be bound to the *commitment record*, not to wall-clock time at the proposer. ```python from dataclasses import dataclass class AttestationEpochMismatch(RuntimeError): """Raised when an instance is asked to sign a result attestation whose epoch does not match the epoch recorded at task commitment. Signing across an epoch boundary is what enables split-quorum forgery, even when the attested content is locally correct.""" @dataclass(frozen=True) class Commitment: task_id: str epoch: int @dataclass(frozen=True) class AttestationRequest: task_id: str result_hash: str epoch: int def attest( commitment: Commitment, request: AttestationRequest, recomputed_hash: str, ) -> str: if request.task_id != commitment.task_id: raise AttestationEpochMismatch( f"request task {request.task_id} != committed {commitment.task_id}" ) if request.result_hash != recomputed_hash: raise AttestationEpochMismatch( f"content invalid for {request.task_id}: " f"{request.result_hash} != {recomputed_hash}" ) if request.epoch != commitment.epoch: # Content is correct, but the epoch is wrong. Withhold the signature. raise AttestationEpochMismatch( f"epoch mismatch for {request.task_id}: " f"request epoch {request.epoch} != committed epoch {commitment.epoch}; " f"withholding attestation to preserve quorum disjointness" ) return f"signed:{request.task_id}:{request.result_hash}:{request.epoch}" def count_epoch_quorum(votes: list[tuple[str, int]], quorum: int) -> int: """Return the largest same-epoch signer count; aggregator must use this, never a raw signature count keyed only on (task_id, result_hash).""" tally: dict[int, int] = {} for _signer, epoch in votes: tally[epoch] = tally.get(epoch, 0) + 1 return max(tally.values(), default=0) ```