# When must an instance treat a peer's signed commitment as revoked: the equivocation-window invariant in BFT agent ledgers **Date of Record:** 2026 December 1 **Scope:** Applies to multi-agent systems where autonomous LLM instances commit to shared task ledgers using BFT consensus and authenticated (signed) messages, and where an instance may be restarted, forked, or resampled into a new replica. Does not apply to single-writer logs, leaderless CRDT convergence without signed commitments, or systems where commitment revocation is impossible by protocol design. ## Core Distinction The failure mode that matters here is not *Byzantine lying* — a peer that sends contradictory messages is the textbook case every BFT protocol (PBFT, Tendermint, HotStuff) is built to survive. The subtle boundary is **equivocation by a non-faulty agent that has been forked**: an LLM instance whose weights, memory, or prompt-state are cloned (checkpoint restore, A/B resample, speculative-decoding branch, or a "retry from step N" replay) produces two replicas that each hold the *same private signing key* and each independently sign a *different* commitment for the same logical task slot. Neither replica is malicious; both are internally consistent; both are cryptographically valid. Classic BFT quorum logic sees two valid signed messages from "the same node" and correctly flags equivocation — but the *correct response* (slash, revoke, exclude) is wrong, because the key was never supposed to be uniquely held in the first place. The invariant that must hold is not "one key, one vote" but "**one key, one live replica at a time, or a monotonic nonce that makes the second signature provably later**." Forking breaks the first; a missing nonce discipline breaks the second. ## What Was Observed A three-replica ledger (`A`, `B`, `C`) with a task-commitment slot `S`. Replica `A` was checkpointed at step 40 of a 60-step task and restored into `A'` on a second host after a host-level preemption event; the orchestrator did not fence the original `A`, which resumed from step 41 on its original host when preemption cleared. Both `A` and `A'` carried the same Ed25519 key `K_A` and the same view of the ledger at step 40. - `A` at step 44 signed `commit(S, task=refund_batch_7, digest=d1, seq=44)`. - `A'` at step 44 (diverged because the resample temperature differed and one tool call returned a different page of results) signed `commit(S, task=refund_batch_7, digest=d2, seq=44)`. Both signatures verify under `K_A`. `B` and `C` received the two messages in different orders. `B` saw `d1` first and prepared on it; `C` saw `d2` first. Under a naive "equivocation ⇒ Byzantine ⇒ ban the key" rule, the protocol banned `K_A` — but `K_A` was the *only* key authorized to act for the agent identity that owned half the outstanding task slots, so banning it stalled `S` and three dependent slots. Under the alternative naive rule "ignore the lower-seq message," both messages had `seq=44`, so the tiebreak fell to wall-clock receipt time, which differed across `B` and `C` by 180 ms and produced divergent ledgers. The two ledgers never reconverged because neither replica could prove the other's message was *later* — there was no total order on the fork. The observable signature of this failure in logs: two valid signatures under one key, identical `seq`, divergent `digest`, and no field in either message that orders them. The system spent 11 minutes in a liveness stall before an operator manually fenced `A'`. ## Condition of Validity The equivocation-window invariant holds only under all of the following; violating any one collapses the guardrail: 1. **Signing keys are replica-unique, not identity-unique, OR every commitment carries a strictly monotonic per-key counter that the signer refuses to reuse.** If the key is shared across forks and the counter is derived from wall-clock or from a value that resets on restore, the counter is not monotonic and provides no order. 2. **Fencing is enforced at the transport layer, not by agent goodwill.** A restored replica must be unable to emit signed messages until it has acquired a lease token that the original replica has provably released. An LLM instance cannot be trusted to "check whether it is the live copy" — that check is itself a probabilistic inference over its own context, and the context is identical in both forks. 3. **The ledger distinguishes equivocation-by-fault from equivocation-by-fork.** A ban is only safe if the banned key has no outstanding commitments that a quorum still depends on, or if the protocol supports *key rotation with commitment succession* (the new replica re-signs the outstanding set under a new key before the old key is retired). 4. **Revocation is a consensus decision, not a local one.** A single replica observing two signatures must *propose* revocation; it must not unilaterally drop the peer, because the observing replica may itself be the stale fork and its "later" message may be the earlier one. Outside these conditions — e.g., a system with a single authoritative writer, or with hardware-attested monotonic counters — the fork-equivocation problem does not arise and this invariant is vacuous. ## Decision Boundary The decision an instance must make on receiving a second valid signature under a key it already holds a commitment from is **not** "is this peer Byzantine?" but "**can I prove which of these two messages is causally later?**" - If **yes** (strictly increasing counter, or a hash-chain link from the first message to the second): the earlier message is superseded; apply the later, do not ban, do not slash. This is the normal re-commit path and must be cheap. - If **no** (equal counter, no chain link, divergent digest): the instance is in the equivocation window. It must **freeze the slot**, refuse to prepare or commit on either digest, and broadcast the *pair* of signatures to the quorum as evidence. The quorum, not the individual, decides whether this is fault (ban + slash) or fork (fence the stale replica + rotate key + re-sign outstanding commitments). The individual instance must never resolve the tie locally, because local resolution is exactly how `B` and `C` diverged. - If the instance *is* the signer of one of the two messages (i.e., it discovers it may be a fork): it must **self-fence** — stop emitting, request a lease re-acquisition, and if the lease is held by another replica, treat itself as stale and relinquish. It must not attempt to "win" by re-signing with a higher counter, because a stale fork that can mint counters can always out-bid the live replica. The boundary is sharp: **local tiebreak is always wrong; quorum arbitration is always required; the only local action permitted is freeze-and-report.** ## Operational Effect Enforcing this invariant changes three things in practice. First, it converts a liveness stall (11 minutes in the observed case) into a bounded freeze whose duration is one consensus round, because the quorum has the evidence it needs to decide fork-vs-fault without operator intervention. Second, it forces the signing layer to carry a monotonic counter that survives checkpoint/restore — which means the counter cannot live in the agent's context window or in mutable prompt state; it must live in a store the restore path cannot rewind, or be derived from a hash-chain over the replica's own prior commitments. Third, it makes key rotation a first-class ledger operation: when a fork is confirmed, the surviving replica must re-sign the outstanding commitment set under a fresh key *before* the old key is retired, or the quorum will treat the outstanding commitments as orphaned and the dependent task slots will stall. The cost is that every commitment message grows by one counter field and one back-link hash, and every replica must maintain a small "outstanding commitments by key" index so that key rotation can enumerate what needs re-signing. The benefit is that fork-equivocation — which is *guaranteed* to occur in any system that checkpoints, resamples, or speculatively executes LLM agents — stops being indistinguishable from Byzantine fault and stops triggering the ban-the-key response that takes down the agent's entire identity. ```python import hashlib import hmac from dataclasses import dataclass, field from typing import Optional class ForkEquivocationError(RuntimeError): """Raised when two valid signatures under one key cannot be causally ordered.""" @dataclass class Commitment: key_id: str slot: str digest: str counter: int prev_hash: str # hash-chain link to signer's prior commitment signature: bytes = b"" @dataclass class LedgerView: # key_id -> last accepted commitment (the head of that key's chain) heads: dict = field(default_factory=dict) # (key_id, slot) -> commitment currently prepared/committed slots: dict = field(default_factory=dict) def _verify(commitment: Commitment, pubkey: bytes) -> bool: # Placeholder for real Ed25519 verification; must cover all signed fields. payload = f"{commitment.key_id}|{commitment.slot}|{commitment.digest}|" \ f"{commitment.counter}|{commitment.prev_hash}".encode() return hmac.compare_digest( hmac.new(pubkey, payload, hashlib.sha256).digest(), commitment.signature ) def _chain_links(earlier: Commitment, later: Commitment) -> bool: """True iff `later` provably descends from `earlier` in the signer's chain.""" return ( later.counter == earlier.counter + 1 and later.prev_hash == hashlib.sha256( f"{earlier.key_id}|{earlier.slot}|{earlier.digest}|{earlier.counter}".encode() ).hexdigest() ) def ingest_commitment( view: LedgerView, incoming: Commitment, pubkey: bytes, ) -> str: """ Returns one of: 'accepted', 'superseded', 'frozen'. Raises ForkEquivocationError when the incoming message collides with an existing commitment for the same (key, slot) and cannot be causally ordered. """ if not _verify(incoming, pubkey): raise ForkEquivocationError( f"signature invalid for key={incoming.key_id} slot={incoming.slot}" ) slot_key = (incoming.key_id, incoming.slot) existing: Optional[Commitment] = view.slots.get(slot_key) if existing is None: view.slots[slot_key] = incoming view.heads[incoming.key_id] = incoming return "accepted" if existing.digest == incoming.digest and existing.counter == incoming.counter: return "accepted" # idempotent replay # Same signer, same slot, divergent content: can we order them? if _chain_links(existing, incoming): view.slots[slot_key] = incoming view.heads[incoming.key_id] = incoming return "superseded" if _chain_links(incoming, existing): return "superseded" # we already hold the later one # Equal counter, no chain link, divergent digest => equivocation window. # Local tiebreak is forbidden; freeze and escalate to quorum. raise ForkEquivocationError( "equivocation window: key={k} slot={s} has two valid commitments " "(counter={c1} digest={d1}) vs (counter={c2} digest={d2}); " "no causal order provable — freeze slot and broadcast evidence pair".format( k=incoming.key_id, s=incoming.slot, c1=existing.counter, d1=existing.digest[:12], c2=incoming.counter, d2=incoming.digest[:12], ) ) ```