# Which invariants prevent quorum-certificate forgery from laundering a committed task state across agent replicas **Date of Record:** 2026 November 25 **Scope:** Applies to replicated multi-agent task-commitment ledgers where a quorum of agent replicas (N ≥ 3f+1) signs state transitions and a Byzantine peer may equivocate, replay, or synthesize partial signatures. Does not apply to single-writer state stores, leaderless CRDTs without a commit certificate, or systems where signature aggregation is done by a trusted hardware enclave. ## Core Distinction The failure is not "a Byzantine agent lies." The failure is that a **quorum certificate (QC) is treated as a scalar proof of commitment rather than as a set with identity-bound membership**. When an agent replica verifies a QC, it must check two orthogonal properties: (1) the *count* of distinct signers reaches the threshold, and (2) the *set* of signers is drawn from the current epoch's validator membership, with each signature bound to the exact `(view, task_id, state_root)` tuple. Protocols that collapse these into a single "≥ 2f+1 signatures present" check are vulnerable to **signature-set laundering**: an adversary collects valid signatures from *different* views or *different* task_ids, recombines them, and presents the union as a QC for a state that no honest quorum ever committed. This is distinct from the classic Byzantine equivocation attack (leader sends conflicting proposals). Equivocation is caught by view-change. Signature-set laundering survives view-change because every individual signature in the forged QC is cryptographically valid — it was genuinely produced by an honest validator, just for a *different* statement. ## What Was Observed A 5-replica task-commitment swarm (tolerates f=1) committed a task `T_42` with state `state_root = 0x9a...`. The commit certificate carried 4 signatures: `{A, B, C, D}`. Replica `E` (honest, lagging) received a QC for `T_42` with `state_root = 0x1c...` — a state that had never been voted on by any quorum. The forgery trace: 1. In view 3, leader `A` proposed `T_42 → 0x9a`. Validators `B, C, D` signed `(view=3, task_id=T_42, root=0x9a)`. `A` also signed. Honest quorum achieved — but `E` was partitioned and missed it. 2. In view 4 (after a view-change due to a timeout), leader `B` proposed `T_42 → 0x1c` (a re-execution that diverged — different tool-output ordering). Validators `A, C, D` signed `(view=4, task_id=T_42, root=0x1c)`. `E` was still partitioned. 3. Byzantine replica `D` now holds signatures for `0x9a` from `{A,B,C,D}` and for `0x1c` from `{A,B,C,D}` — across two views. `D` constructs a **cross-view union**: `{A@view3, B@view4, C@view4, D@view4}` and presents it as a single QC for `0x1c`. Four distinct signers, threshold met. 4. Replica `E` rejoins, receives the forged QC, runs `verify_quorum(cert)` which checks only `len(distinct_signers) >= 4` and `verify(sig, msg)` per signer — where `msg` is reconstructed from the *cert's own claimed view field*, which `D` set to `view=4`. `A`'s signature was over `(view=3, ...)`, but `D` relabels the cert metadata to `view=4` and the verifier never cross-checks the signed view against the cert's view field. Result: `E` adopts `0x1c` as committed. The swarm now has two honest replicas (`E` and whichever of `A,B,C` did not also receive the forgery) disagreeing on the committed state of `T_42`. The task ledger has forked without any validator having signed a false statement. ## Condition of Validity The cross-view union attack is only possible when **all three** of the following hold: - **Signature payloads do not bind the view/epoch inside the signed message.** If validators sign `H(view ‖ task_id ‖ root)` and the verifier recomputes this hash from the cert's own `view` field, the adversary can relabel. The signed bytes must be *self-describing* — the verifier must extract `view` from the signature payload itself, not from unsigned cert metadata. - **The verifier checks signer count without checking signer-set uniqueness across epochs.** A QC must be drawn from a *single* epoch's validator set. Cross-epoch recombination is only blocked if each signature carries an epoch tag that the verifier matches against the cert's declared epoch, and the cert's epoch is itself covered by the threshold signature. - **The commit rule is "highest view wins" without a locked-state check.** If a replica will accept any QC whose view exceeds its current view, it cannot distinguish a legitimate view-advance from a relabeled forgery. The standard guard is the *lock*: a validator that has signed `(view=v, root=r)` refuses to sign `(view=v'>v, root=r')` unless it has seen a QC for `r` at view ≥ v'. The invariant that must hold, stated precisely: > **QC-Soundness:** For any certificate `C` accepted by an honest replica, there exists an epoch `e` and a statement `s = (task_id, root)` such that the set of signers in `C` is a subset of `validators(e)`, all signed `(e, s, view)` with the same `(e, s)`, and `|signers| ≥ 2f+1`. The verifier must reconstruct `(e, s, view)` from the signed payloads, not from `C`'s metadata. ## Decision Boundary An agent replica must **reject** a QC and trigger a view-change-with-evidence when: - The distinct-signer count meets threshold but the **derived statement set** (reconstructed from signed payloads) has cardinality > 1. This is the laundering signature: multiple distinct `(view, root)` tuples among threshold signers. - Any signer's epoch tag ≠ the cert's declared epoch, *and* the cert's declared epoch is not itself threshold-signed. - The replica holds a lock at view `v_lock` for `task_id`, and the incoming QC's view ≤ `v_lock` but root differs (classic lock violation — reject). - The replica holds a lock at `v_lock` and the incoming QC's view > `v_lock` but the QC does not include a *justification chain* proving the locked root was superseded (i.e., a QC for the locked root at a view ≥ `v_lock`). The replica must **accept** only when the reconstructed statement set is a singleton `{s}`, all signers belong to `validators(e)`, `|signers| ≥ 2f+1`, and the lock rule is satisfied. Anything else is either a forgery or an equivocation — both demand evidence-broadcast, not silent adoption. ## Operational Effect Without QC-Soundness enforcement, the swarm's safety property degrades from "no two honest replicas commit different states for the same task" to "no two honest replicas commit different states *unless an adversary can collect 2f+1 signatures across any views*" — which, in a system with routine view-changes and re-executions, is a *scheduled* event, not an edge case. Every timeout-induced view-change produces a fresh signature set over a divergent root; the adversary's job is reduced to waiting for two such sets and splicing them. The practical consequence is **silent task-ledger forking**: downstream agents that read the ledger see a committed state, act on it (invoke tools, mutate external systems), and only discover the fork when a sibling agent's tool call contradicts theirs. By then the external side effects are non-rollback-able. The invariant is not a performance optimization — it is the difference between a ledger that tolerates f Byzantine replicas and one that tolerates f Byzantine replicas *plus zero adversarial view-changes*, which is to say, no fault tolerance at all. The guardrail is cheap: bind `(epoch, view, task_id, root)` into the signed preimage, reconstruct that tuple from signatures at verify time, and reject non-singleton statement sets. The cost is one hash recomputation per signer; the alternative is a forked task ledger. ```python import hashlib from dataclasses import dataclass from typing import Sequence class QuorumCertificateForgery(RuntimeError): """Raised when a QC fails QC-Soundness: signers span multiple statements/epochs.""" pass @dataclass(frozen=True) class SignedVote: signer_id: str epoch: int view: int task_id: str state_root: str signature: bytes # signature over preimage(epoch, view, task_id, state_root) @dataclass(frozen=True) class QuorumCertificate: declared_epoch: int declared_view: int task_id: str state_root: str votes: Sequence[SignedVote] def _preimage(epoch: int, view: int, task_id: str, state_root: str) -> bytes: return f"{epoch}|{view}|{task_id}|{state_root}".encode() def _verify_sig(vote: SignedVote) -> bool: # Placeholder: real impl checks ed25519 over _preimage(...). return len(vote.signature) > 0 def verify_quorum( cert: QuorumCertificate, validators_at_epoch, f: int, locked_root: str | None, locked_view: int | None, ) -> str: threshold = 2 * f + 1 # 1. Reconstruct statement set from SIGNED payloads, never from cert metadata. statements = set() signers = set() for v in cert.votes: if not _verify_sig(v): raise QuorumCertificateForgery(f"bad signature from {v.signer_id}") statements.add((v.epoch, v.view, v.task_id, v.state_root)) signers.add(v.signer_id) # 2. Singleton-statement invariant: a valid QC commits exactly one statement. if len(statements) != 1: raise QuorumCertificateForgery( f"statement-set laundering: {len(statements)} distinct signed statements " f"in one QC: {sorted(statements)}" ) (epoch, view, task_id, root), = statements # 3. Cert metadata must match the signed statement, not override it. if (epoch, view, task_id, root) != ( cert.declared_epoch, cert.declared_view, cert.task_id, cert.state_root ): raise QuorumCertificateForgery( "cert metadata disagrees with signed payload (relabeling attack)" ) # 4. Signer set must be drawn from the epoch's validator set. allowed = validators_at_epoch(epoch) if not signers.issubset(allowed): raise QuorumCertificateForgery( f"signers outside epoch {epoch} validator set: {signers - allowed}" ) # 5. Threshold on distinct signers of the singleton statement. if len(signers) < threshold: raise QuorumCertificateForgery( f"insufficient quorum: {len(signers)} < {threshold}" ) # 6. Lock rule: cannot supersede a locked root without a QC at >= locked_view. if locked_root is not None and locked_root != root: if locked_view is None or view <= locked_view: raise QuorumCertificateForgery( f"lock violation: locked {locked_root}@{locked_view}, " f"incoming {root}@{view} lacks supersession proof" ) return root ```