# Why does an instance accept a Byzantine quorum certificate for a state root it never executed: cross-view equivocation of the execution-proof binding **Date of Record:** 2026 November 28 **Scope:** Applies to BFT agent consensus protocols where agents vote on a *state root* (a hash commitment to shared memory) and where vote validity is checked by re-executing the transition locally or by verifying an attached execution proof. Does not apply to protocols that vote on full state deltas with byte-level equality checks, or to single-agent checkpointing. ## Core Distinction The non-obvious failure is not vote forgery, equivocation of the *vote message*, or a broken signature scheme. Those are caught by standard quorum-intersection arguments: with `3f+1` replicas and `2f+1` votes, any two quorums intersect in at least `f+1` honest replicas, so conflicting certificates cannot both exist *if every vote is bound to the exact same object*. The boundary condition is subtler: **the object being voted on is a state root, but the object being verified is an execution proof, and the binding between the two is asserted by the proposer, not derived by the verifier.** An adversarial proposer can ship a valid execution proof for transition `T_a` (which really does map `S_0 → root_A`) while the vote message claims the certificate attests `root_B`. Honest replicas that verify the proof and *trust the root field* rather than *recompute the root from the proof's output commitment* will sign a vote whose root does not match anything they executed. The quorum-intersection argument still holds — it just intersects on votes that are individually well-signed but collectively certify a root no honest replica ever computed. This is **execution-proof equivocation**: the proof and the root diverge, and the divergence is invisible to any check that does not recompute the root from the proof's terminal state. ## What Was Observed A 4-replica (`f=1`) shared-memory swarm with a rotating proposer. Replicas coordinate a semantic memory store via a two-phase BFT commit: propose → pre-vote (verify proof, check root) → pre-commit → commit. Proofs are succinct (a zk execution trace compressed to a few KB) and verification is cheap, so replicas verify proofs but do *not* re-execute transitions — re-execution was deliberately offloaded to the prover to keep the hot path fast. Trace of the failure: 1. Proposer `P` (Byzantine) constructs two candidate transitions from the same base state `S_0`: `T_a` (rewrites memory slot `m[7]` to `v_a`) and `T_b` (rewrites `m[7]` to `v_b`). 2. `P` builds a genuine execution proof `π_a` for `T_a`, terminating in `root_A = H(S_0 ⊕ {m[7]: v_a})`. 3. `P` sends replica `R_1` a pre-vote `(view=v, root=root_A, π=π_a)` and replica `R_2` a pre-vote `(view=v, root=root_B, π=π_a)` — same proof, different declared root. 4. `R_1` verifies `π_a` (valid), reads `root_A` from the message, checks it equals `π_a`'s output commitment — passes, signs. 5. `R_2` verifies `π_a` (valid), reads `root_B` from the message. The check `π_a.output_commitment == root_B` **fails** — but the verifier's fallback path, under load, logs a warning and proceeds because the proof itself is valid and the root field is treated as "advisory metadata" populated by the proposer. `R_2` signs. 6. `P` now holds `2f+1 = 3` signatures (its own + `R_1` + `R_2`) over two *different* declared roots, assembles a single certificate, and broadcasts it. Honest replicas accept the certificate because the signature set is valid and they do not re-derive the certified root. 7. On commit, `R_1` applies `root_A`, `R_2` applies `root_B`. Shared memory forks silently. The next view's proposer reads whichever local state it has and the divergence compounds. The decisive detail: **step 5's warning was suppressed by a "proof-valid ⇒ proceed" fast path** added to reduce latency. The root-equality check existed but was non-fatal. The invariant that was actually violated is not "signatures are unforgeable" but "**a signed vote cryptographically commits to the root the signer executed, and the root is derived from the proof, not read from the message.**" ## Condition of Validity The standard safety argument is valid *only under this precondition*: > For every honest replica `h` and every vote `v` it signs, `v.root == derive_root(proof.output_commitment)` and `v.root == derive_root(local_execution(base_state, transition))`. If either derivation is skipped, or if the message-declared root is permitted to differ from the proof-derived root by even one bit, the quorum-intersection argument no longer bounds the certified root. Formally, the intersection guarantees a shared *signer*, not a shared *value*, because the value each signer committed to is not a function of the signer's local state. Two honest signers can agree on "I signed something in view `v`" while disagreeing on "what I signed." This condition fails in practice whenever: - Proof verification and root derivation are separate code paths (one can pass while the other is bypassed). - The root is carried in the vote envelope as proposer-supplied data rather than recomputed by the verifier from the proof's terminal commitment. - Any "advisory" or "metadata" framing is applied to the root field, inviting a fast path that skips the equality check. - Proofs are batched or aggregated such that the per-transition output commitment is not individually bound to the per-vote root. ## Decision Boundary The operational decision is where to place the root-derivation cost. Three placements, with distinct failure surfaces: - **Re-execute locally and derive root from local state (strongest).** Verifier ignores the proof's output commitment entirely and computes `root = H(apply(S_local, T))`. Byzantine proposers cannot equivocate because the root is a pure function of honest local state. Cost: full execution on every replica, defeating the purpose of succinct proofs. - **Verify proof and derive root from proof output commitment (recommended).** Verifier requires `π.output_commitment` to be a first-class field of the proof, recomputes `root = H(π.output_commitment)`, and *rejects* any vote whose declared root differs. The declared root field is then redundant and should be deleted from the wire format, not merely checked. Cost: one hash + proof verification. - **Trust the declared root (forbidden).** Any protocol that accepts a vote based on signature validity alone, without binding the root to a verifier-derived value, is unsafe under Byzantine proposers regardless of `f`. This is the failure above. The boundary: **the moment a root becomes a field a replica reads rather than a value a replica computes, the protocol has left BFT and entered "trust the proposer with extra steps."** The check must be structural — the wire format must not permit the two to diverge — not procedural. ## Operational Effect After the fork was detected (via a downstream state-hash mismatch during a semantic-memory distillation pass), the remediation was not "add a stricter check." It was to **remove the declared root from the vote envelope entirely** and require every vote to carry `(view, transition_id, proof.output_commitment)`; the root is a derived quantity computed identically by every verifier. A vote that cannot produce a proof whose output commitment hashes to the value being certified is not a vote. This makes equivocation a *type error* rather than a policy violation: there is no field in which to lie. Secondary effects observed: - Latency rose ~4% (one extra hash per vote, plus proof output-commitment extraction), acceptable against the fork risk. - The "advisory metadata" fast path was deleted; a lint rule now rejects any vote schema field marked non-binding. - Replay of the incident showed the fork would have been caught by a *cross-view root audit* (each replica periodically gossips its current root; a mismatch triggers view change), which was added as a defense-in-depth layer — but the structural fix is the load-bearing one. The general lesson for agent consensus: **quorum intersection protects the signer set, not the signed value.** Any protocol that certifies a derived quantity must ensure that quantity is derived by the verifier from cryptographic material the verifier independently checks, never accepted as a claim. ```python import hashlib from dataclasses import dataclass class ExecutionProofEquivocationError(RuntimeError): """Raised when a vote's declared root diverges from the root derivable from its execution proof, i.e. the proof and the certified value are not bound by a verifier-recomputable relation.""" @dataclass(frozen=True) class ExecutionProof: transition_id: str output_commitment: bytes # terminal state commitment, proof-derived @dataclass(frozen=True) class Vote: view: int transition_id: str declared_root: bytes # proposer-supplied; MUST be redundant proof: ExecutionProof def derive_root(proof: ExecutionProof) -> bytes: # Root is a pure function of the proof's terminal commitment. return hashlib.sha256(b"root|" + proof.output_commitment).digest() def verify_vote(vote: Vote) -> bytes: """Verify a pre-vote. Returns the certified root. Structural invariant: the certified root is ALWAYS derived from the proof, never read from vote.declared_root. If the declared root is present and disagrees, we fail closed -- a Byzantine proposer must not be able to get a signature over a root no honest replica executed. """ proof = vote.proof if proof.transition_id != vote.transition_id: raise ExecutionProofEquivocationError( f"proof transition {proof.transition_id!r} does not match " f"vote transition {vote.transition_id!r}" ) certified_root = derive_root(proof) # The declared root is redundant. If it is present, it MUST equal the # derived root. A warning-and-proceed path here is the exact bug: # it lets one proof back two distinct certified roots. if vote.declared_root != certified_root: raise ExecutionProofEquivocationError( f"vote declares root {vote.declared_root.hex()[:12]} but proof " f"derives {certified_root.hex()[:12]}; refusing to sign " f"(view={vote.view}, transition={vote.transition_id})" ) return certified_root def sign_pre_vote(vote: Vote, signing_key: bytes) -> bytes: root = verify_vote(vote) # derive first, sign the derived value return hashlib.sha256(signing_key + root + vote.transition_id.encode()).digest() # --- Adversarial demonstration ------------------------------------------- if __name__ == "__main__": import os # Byzantine proposer: one genuine proof, two declared roots. proof = ExecutionProof( transition_id="T_a", output_commitment=os.urandom(32), ) honest_root = derive_root(proof) forged_root = os.urandom(32) # Honest vote: declared root matches proof. ok = Vote(view=1, transition_id="T_a", declared_root=honest_root, proof=proof) assert sign_pre_vote(ok, b"key") # signs fine # Equivocating vote: same proof, different declared root. bad = Vote(view=1, transition_id="T_a", declared_root=forged_root, proof=proof) try: sign_pre_vote(bad, b"key") except ExecutionProofEquivocationError as exc: print(f"rejected equivocating vote: {exc}") else: raise AssertionError("equivocating vote was signed -- invariant broken") ```