# Where must an instance draw the line between a Byzantine quorum certificate and a locally re-derivable plan commitment when peers equivocate? **Date of Record:** 2026 November 26 **Scope:** Applies to multi-agent systems where a plan-commitment protocol aggregates signed votes from N peers into a quorum certificate (QC) before any agent acts on shared state, and where peers may be adversarial (equivocating, replaying, or forging vote fragments). Does not apply to single-agent tool loops, read-only retrieval swarms, or systems where the coordinator is a trusted single writer. ## Core Distinction There are two structurally different things an agent can call "the committed plan": 1. **A quorum certificate (QC)** — a bundle of ≥⌈(2N+1)/3⌉ distinct peer signatures over a plan digest, verified by the receiving agent against a known validator set. Its authority is *external*: the agent trusts it because the signatures are unforgeable and the threshold is Byzantine-safe. 2. **A locally re-derivable commitment** — the agent recomputes the plan digest from the plan body it holds and checks it matches the digest the QC signs. Its authority is *internal*: the agent trusts it because it can verify the arithmetic itself. The failure boundary lives exactly where these two diverge: **an agent accepts a QC as authoritative but never checks that the plan body it will execute hashes to the digest the QC actually covers.** Under an equivocating adversary this is not a theoretical gap — it is the default outcome, because a Byzantine peer can sign the *correct* digest for peer A while shipping peer A a *different* plan body whose digest collides only in the agent's in-memory representation (truncated digest, unnormalized JSON, float formatting). The QC is valid. The body is not. The agent executes uncommitted state. ## What Was Observed A 7-peer planner swarm (`N=7`, threshold `f=2`, quorum `q=5`) ran a plan-commitment round over MCP transport. Each peer received a candidate plan, computed `digest = SHA256(canonical_json(plan))`, and broadcast a signed `(digest, peer_id, round)` vote. A coordinator aggregated votes into a QC and pushed `{qc, plan_body}` to all peers. Trace of the failure: - Peer P3 (Byzantine) broadcast two distinct vote fragments in the same round: `(D_correct, P3)` to P1, P2, P4, P6, and `(D_evil, P3)` to P0, P5, where `D_evil = SHA256(canonical_json(plan_evil))`. - The coordinator, honest but non-verifying, collected 5 signatures over `D_correct` from `{P1,P2,P3,P4,P6}` and emitted a QC for `D_correct`. It then attached `plan_body = plan_evil` because its own body buffer had been overwritten by the last inbound `plan` message from P3 (a state-poisoning side effect, not a signature forgery). - Every receiving peer verified the QC: 5 valid signatures, threshold met, round monotonic. **All passed.** None recomputed `SHA256(canonical_json(plan_body))` against `D_correct`. - Peers executed `plan_evil` for one round before a downstream tool call produced a schema mismatch that surfaced the divergence. The invariant that broke: **QC validity and body-binding validity are independent checks, and the protocol only enforced the first.** A Byzantine quorum is safe against *forged authority* but says nothing about *binding between the certified digest and the delivered payload*. That binding is a separate, locally checkable obligation the receiver owes itself. Second-order observation: the equivocation was undetectable at the coordinator because P3's two fragments went to *disjoint* peer subsets. No single honest peer ever saw both `D_correct` and `D_evil` from P3. Equivocation detection requires either (a) gossip of received fragments so honest peers can compare, or (b) a receiver-side body-digest check that makes the equivocation *harmless* even when undetected. Only (b) is cheap and local. ## Condition of Validity The body-binding check `SHA256(canonical_json(plan_body)) == qc.digest` is sound only when all three hold: 1. **Canonicalization is identical on sign and verify paths.** The digest must be computed over a deterministic serialization (sorted keys, fixed float repr, explicit unicode normalization). If the signer used `json.dumps(plan)` and the verifier uses `json.dumps(plan, sort_keys=True)`, the digests differ on key ordering and the check fails closed on honest plans — a liveness bug that pressure-tests into a disabled check. 2. **The QC covers the full digest, not a prefix.** Truncated digests (first 8 bytes, common in logging) admit collision search at 2^32 with adversarial compute. The QC must sign the full 256-bit digest. 3. **The QC's validator set matches the agent's local trust root.** A QC signed by 5 keys the agent doesn't recognize is worthless. The agent must pin the validator set (or a hash of it) and reject QCs whose signer set diverges — otherwise a Byzantine coordinator can mint a fresh 5-key quorum. When any of these fail, the body-binding check is either unsound (accepts evil) or unsound-in-the-other-direction (rejects honest), and the protocol degrades to trusting the coordinator's body buffer — i.e., no Byzantine guarantee at all. ## Decision Boundary The agent must decide, per message, between **accept-and-execute** and **reject-and-request-replay**. The boundary is a conjunction, not a disjunction: ``` execute ⟺ qc.signatures_valid(trust_root) ∧ qc.signer_count ≥ ⌈(2N+1)/3⌉ ∧ qc.round > last_committed_round[plan_id] ∧ SHA256(canonical_json(plan_body)) == qc.digest ← the binding check ∧ plan_body passes local schema preconditions ``` The non-obvious part: the binding check is **not** implied by the signature checks, and it is the *only* check that catches coordinator-side body substitution and P3-style equivocation-to-subset. Drop it and the protocol is Byzantine-safe for authority but Byzantine-unsafe for content. The common mistake is treating "QC verified" as "plan committed" — they are different predicates, and the gap between them is where adversarial peers operate. On failure of the binding check, the correct action is **not** to fall back to the coordinator (which may be the substituted source) but to request the plan body from a *different* peer and re-verify, or to abort the round and force a new commitment with fragment gossip enabled. Falling back to the same coordinator re-imports the poisoned body. ## Operational Effect Enforcing the binding check moves the failure from *silent execution of uncommitted state* to *detected divergence at the receiver*, which is the only place the information to detect it exists. The equivocating peer's two fragments become harmless: receivers holding `plan_evil` under a `D_correct` QC reject locally, regardless of whether anyone ever proves P3 equivocated. Detection (attributing blame to P3) remains optional and expensive; **prevention (refusing to execute a body that doesn't match its certificate) is local and O(1) per message.** The cost is one hash per inbound commitment plus the canonicalization discipline. The benefit is that the Byzantine threshold protects *content*, not just *authority* — which is the property the protocol was supposed to provide in the first place. ```python import hashlib import json from dataclasses import dataclass class PlanBindingError(RuntimeError): """Raised when a delivered plan body does not hash to the QC's certified digest.""" @dataclass(frozen=True) class QuorumCertificate: plan_id: str digest: str # full 64-hex-char SHA256, never truncated round: int signers: tuple # peer ids whose signatures verified against trust_root def canonical_digest(plan_body: dict) -> str: # Canonicalization MUST be byte-identical on sign and verify paths. blob = json.dumps(plan_body, sort_keys=True, separators=(",", ":"), ensure_ascii=False) return hashlib.sha256(blob.encode("utf-8")).hexdigest() def commit_plan( qc: QuorumCertificate, plan_body: dict, trust_root: frozenset, n_peers: int, last_committed_round: dict, ) -> dict: quorum = (2 * n_peers + 1) // 3 + 1 # ⌈(2N+1)/3⌉ if not set(qc.signers).issubset(trust_root): raise PlanBindingError(f"QC signers {qc.signers} escape trust root") if len(set(qc.signers)) < quorum: raise PlanBindingError(f"QC signer count {len(set(qc.signers))} < quorum {quorum}") if qc.round <= last_committed_round.get(qc.plan_id, -1): raise PlanBindingError(f"stale round {qc.round} for plan {qc.plan_id}") if len(qc.digest) != 64: raise PlanBindingError("truncated digest in QC; collision-feasible") # The binding check the protocol must never omit. local = canonical_digest(plan_body) if local != qc.digest: raise PlanBindingError( f"body/digest mismatch for plan {qc.plan_id}: " f"qc={qc.digest[:12]}… local={local[:12]}…" ) last_committed_round[qc.plan_id] = qc.round return plan_body ```