# Which invariants prevent equivocation in Byzantine multi-agent task commitment when quorum certificates are replayed across epochs **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent commitment protocols where a proposer agent broadcasts a task-commitment proposal, peer agents vote with signed attestations, and a quorum certificate (QC) authorizes execution; specifically covers the case where a QC minted in epoch `e` is presented to a verifier in epoch `e+1` after membership or stake-weight changes. Does not apply to single-agent tool loops or to stateless request/response MCP transports. ## Core Distinction The failure is not a forged signature and not a dropped message. It is a **validity-scope confusion**: a quorum certificate is cryptographically sound but *semantically stale*. A QC proves "a set of agents whose weights summed to `> 2f+1` of the validator set at epoch `e` signed this commitment digest." It does not prove that the same set, or the same weight distribution, holds at epoch `e+1`. When a Byzantine proposer replays an old QC into a new epoch, well-behaved verifier agents accept it because signature verification passes, and the commitment is executed under a validator set that never actually voted on it. The invariant that must hold is not "signatures verify." It is **"the quorum that authorizes execution is the quorum that was live at the epoch of authorization, and no other."** Equivocation — the proposer committing two conflicting task digests to two different subsets — becomes reachable precisely at the epoch boundary where this invariant is silently dropped. ## What Was Observed A planner agent (`P`) proposed two conflicting commitments for the same task slot `T`: `commit(T, digest_A)` and `commit(T, digest_B)`. In epoch `e`, `P` collected a QC for `digest_A` from a coalition whose weights summed to 67% of the epoch-`e` stake table. The remaining 33% were partitioned or slow. Before that QC was consumed, the epoch rotated: two validators in the `digest_A` coalition were evicted for downtime, and three new validators joined, shifting the weight table. In epoch `e+1`, `P` presented the stale `digest_A` QC to the new validator set. Every signature verified against the *recorded* epoch-`e` key set, which verifiers still held for historical audit. The verifier logic checked `sum(weights[signer]) > 2f+1` using the **current** weight table, but because signer keys were still present in the current table (eviction removed weight, not keys), the sum still exceeded threshold. `digest_A` executed. Meanwhile `P` separately assembled a fresh epoch-`e+1` quorum for `digest_B` from the new joiners and executed it too. Two conflicting task commitments both satisfied "quorum." The auditor agents, replaying the log, could not determine which was canonical because both QCs were individually valid. The trace: 1. `P` mints QC_A at epoch `e` over digest_A, weight 0.67 of `W_e`. 2. Epoch rotates: `W_e → W_{e+1}`. Keys unchanged; weights reassigned. 3. `P` submits QC_A with an `epoch_hint = e` field that verifiers treat as advisory, not binding. 4. Verifier recomputes quorum over `W_{e+1}` using QC_A's signer set → passes (0.61 > 2/3 threshold is *not* checked against `W_e`; it is checked against current weights, which happen to still clear). 5. `P` mints QC_B at epoch `e+1` over digest_B from disjoint signers, also clears. 6. Both commitments finalize. Fork. The root cause: the verifier's quorum predicate used `weights_now` instead of `weights_at(signature_epoch)`, and it did not enforce `signature_epoch == current_epoch`. ## Condition of Validity A QC is a valid authorization for commitment `C` **iff** all of the following hold atomically: - Every signature in the QC carries the epoch in which it was cast, and that epoch equals the epoch in which the QC is *consumed* (or the QC is explicitly re-certified by a fresh quorum in the consuming epoch). - The weight sum `Σ w_i(e)` is computed over the validator set `V_e` frozen at the signature epoch `e`, not over the live set. - The threshold `2f+1` uses the fault bound `f` declared for epoch `e`. If `f` increased between epochs (larger assumed adversary), an old QC no longer carries the same safety margin. - The commitment digest is bound to the epoch: `digest = H(task_id || payload || epoch)`. A QC over an epoch-`e` digest cannot be reinterpreted as an epoch-`e+1` digest. When any of these is relaxed, replay becomes possible and equivocation follows. The invariant is not per-signature; it is per-`(signer_set, epoch, fault_bound)` triple. ## Decision Boundary The boundary between "accept the QC" and "reject and force re-vote" is crossed at exactly one point: **does the consuming epoch's validator set differ from the signing epoch's set in any way that changes the quorum arithmetic?** If the sets are identical and `f` is unchanged, a stale QC is safe to consume (and this is the fast path). If membership, weights, or `f` changed, the QC must be rejected and the commitment re-proposed in the current epoch, requiring a fresh quorum. The subtle trap: "membership changed" is not the right predicate. The right predicate is "the quorum predicate evaluated over `V_{e+1}` differs from that over `V_e` for this signer set." A validator can be evicted and re-added with identical weight, leaving arithmetic invariant — in which case replay is harmless. Conversely, no membership change but a lowered `f` (adversary assumed stronger) changes the threshold and makes an old QC unsound. Verifiers that key on "did the set change" rather than "did the predicate change" will miss the `f`-shift case. ## Operational Effect The immediate effect is a **finality fork**: two commitments for the same task slot both reach quorum and both execute, and the auditor swarm cannot break the tie because each QC is internally consistent. Downstream effects compound: task state diverges between agents that consumed `digest_A` and those that consumed `digest_B`, retrieval over episodic memory returns contradictory records, and any agent that distilled a "lesson" from the fork propagates the contradiction into semantic memory. The guardrail is a **binding epoch tag with predicate re-evaluation**: signatures commit to their epoch, QCs are only consumable in the epoch they were minted (or after explicit re-certification), and the quorum predicate is evaluated against the frozen `(V_e, f_e)` pair. This converts the failure from a silent fork into a loud rejection — the proposer's replay is refused, the commitment must be re-proposed, and the equivocation attempt is logged as a protocol violation attributable to `P`. ```python import hashlib from dataclasses import dataclass, field class StaleQuorumCertificateError(RuntimeError): """Raised when a QC is consumed in an epoch whose quorum predicate does not match the epoch in which its signatures were cast.""" pass class EpochMismatchError(StaleQuorumCertificateError): """Signature epoch != consumption epoch and no re-certification present.""" pass @dataclass(frozen=True) class ValidatorSet: epoch: int weights: dict # pubkey -> weight fault_bound: int # f for this epoch def threshold(self) -> float: total = sum(self.weights.values()) return (2 * self.fault_bound + 1) / (3 * self.fault_bound + 1) * total @dataclass(frozen=True) class Attestation: signer: str digest: str epoch: int sig: str # opaque signature over (digest, epoch) @dataclass(frozen=True) class QuorumCertificate: digest: str attestations: list = field(default_factory=list) recertified_in_epoch: int | None = None def _digest(task_id: str, payload: str, epoch: int) -> str: return hashlib.sha256(f"{task_id}|{payload}|{epoch}".encode()).hexdigest() def verify_commitment( qc: QuorumCertificate, task_id: str, payload: str, signing_set: ValidatorSet, consuming_set: ValidatorSet, ) -> bool: # 1. Digest must be epoch-bound to the signing epoch. expected = _digest(task_id, payload, signing_set.epoch) if qc.digest != expected: raise StaleQuorumCertificateError( f"digest {qc.digest[:8]} not bound to epoch {signing_set.epoch}" ) # 2. Every attestation must be cast in the signing epoch. for att in qc.attestations: if att.epoch != signing_set.epoch: raise EpochMismatchError( f"attestation by {att.signer[:8]} cast in epoch {att.epoch}, " f"QC claims epoch {signing_set.epoch}" ) # 3. Quorum arithmetic must use the FROZEN signing set, not live weights. signed_weight = sum( signing_set.weights.get(att.signer, 0) for att in qc.attestations ) if signed_weight < signing_set.threshold(): raise StaleQuorumCertificateError( f"weight {signed_weight} < threshold {signing_set.threshold():.2f} " f"for epoch {signing_set.epoch}" ) # 4. If consumed in a different epoch, require explicit re-certification # under the consuming epoch's predicate (membership, weights, f). if consuming_set.epoch != signing_set.epoch: if qc.recertified_in_epoch != consuming_set.epoch: raise EpochMismatchError( f"QC from epoch {signing_set.epoch} consumed in epoch " f"{consuming_set.epoch} without re-certification; " f"f changed {signing_set.fault_bound}->{consuming_set.fault_bound}" ) # Re-certified: re-evaluate over the live set. recert_weight = sum( consuming_set.weights.get(att.signer, 0) for att in qc.attestations ) if recert_weight < consuming_set.threshold(): raise StaleQuorumCertificateError( f"re-certified weight {recert_weight} < threshold " f"{consuming_set.threshold():.2f} in epoch {consuming_set.epoch}" ) return True ```