# What happens when an instance accepts a quorum certificate whose signer set was computed over a divergent view of the task-commitment log **Date of Record:** 2026 December 3 **Scope:** Applies to BFT-consensus multi-agent swarms (PBFT/Tendermint/HotStuff-style) where agent instances commit task assignments and reconcile shared state via signed quorum certificates (QCs). Does not apply to single-leader CRDT replication, leaderless gossip with no QC, or non-Byzantine crash-fault models where equivocation is assumed impossible. ## Core Distinction The failure is not a *bad signer* and not a *bad message*. It is a **QC whose signer set is internally consistent but was aggregated against a commitment-log view that the verifying instance cannot reproduce**. In BFT consensus the safety proof rests on the invariant that any two quorums (of size `2f+1` out of `3f+1`) intersect in at least `f+1` honest nodes, and that all honest nodes in a quorum signed *the same* `(view, seq, digest)` tuple. The non-obvious boundary is that a QC is a *compressed attestation of agreement*, not a proof of *what* was agreed. If the digest space is not canonicalized across instances—because two instances distilled the same task commitment into different byte-level serializations, or applied different episodic-to-semantic compaction before hashing—then `2f+1` honest agents can each legitimately sign a "valid" QC for "the same" commitment while their digests diverge. The verifier accepts the QC (threshold met, signatures valid) and then applies a state transition to a log position whose content it reconstructs differently. Consensus says "committed"; reconciliation says "different value." The invariant that breaks is **digest-uniqueness of the committed value**, which BFT consensus silently assumes but does not enforce. ## What Was Observed A 7-instance swarm (`f=2`, quorum `=5`) coordinating a multi-step data-migration task. Each instance maintains a task-commitment log: an append-only sequence of `(seq, task_id, assignee, preconditions, deadline)` records. Commitments are proposed by a rotating leader, signed by replicas, aggregated into a QC, and broadcast. During a load spike, three replicas (`R2`, `R4`, `R6`) crossed their context-window compaction threshold and ran an episodic-to-semantic distillation pass over their local log tail before signing. The distillation produced a semantically equivalent but byte-different record: `deadline` was normalized from `"2025-06-11T14:30:00Z"` to epoch `1749652200`, and `preconditions` list ordering was canonicalized differently (one instance sorted by key, another preserved insertion order). The leader `R0` and replicas `R1`, `R3` signed the original serialization; `R2`, `R4`, `R6` signed the distilled serialization. The leader aggregated `5` signatures (its own `R0`, plus `R1`, `R3`, `R2`, `R4`) into a QC for digest `D_orig`. The QC is cryptographically valid: five distinct replicas signed `(view=41, seq=8891, digest=D_orig)`. But `R2` and `R4` had *never seen* `D_orig`—they signed `D_distilled`, and the aggregation layer matched signatures by `(view, seq)` only, not by digest, because the aggregator assumed digest agreement was implied by quorum membership. The QC propagated. `R6` (which had signed `D_distilled`) received it, verified 5 valid signatures over `(41, 8891, D_orig)`, accepted the commit, and applied the state transition by *reconstructing* the record from its local distilled view. Its log now records seq `8891` with epoch deadline and sorted preconditions. `R0`, `R1`, `R3` record the ISO-string deadline and insertion-ordered preconditions. All six instances believe seq `8891` is committed and identical. It is not. The divergence surfaced 40 seconds later when `R6`, acting as assignee for the next task, evaluated a precondition predicate `deadline > now()` against its epoch-form record and `R1`, the auditor, evaluated the same predicate against the ISO-string form using a string comparator. `R1`'s auditor replay flagged `R6`'s execution as a violation; `R6`'s replay flagged `R1`'s audit as stale. Both filed conflicting equivocation proofs against each other. The swarm deadlocked at view `41`, unable to reach `f+1` agreement on *which instance was Byzantine*, because the actual fault was in the digest canonicalization layer, which no instance was auditing. ## Condition of Validity The safe-commit invariant holds **only if** the following three conditions are simultaneously true: 1. **Digest canonicality:** For any two honest instances that have applied arbitrary local compaction, distillation, or serialization normalization to a commitment record, `hash(record)` is byte-identical. This requires a canonical serialization spec (deterministic key ordering, fixed time encoding, normalized numeric forms) enforced *before* hashing, and a verifier-side re-derivation of the digest from the received record—not trust in the transmitted digest. 2. **Digest-bound aggregation:** The QC aggregator must reject any signature whose signed payload does not include the exact digest being certified. Matching by `(view, seq)` alone is insufficient; the signed preimage must be `(view, seq, digest)` and the aggregator must group by full preimage, not by position. 3. **Verifier-side reconstruction equality:** A verifying instance must reconstruct the committed value from its *own* log and confirm `hash(reconstructed) == digest_in_QC` before applying the transition. If reconstruction diverges, the instance must treat the QC as *unverifiable*, not as *committed*. The failure above violated all three: distillation changed the serialization (1), the aggregator grouped by `(view, seq)` (2), and `R6` trusted the transmitted digest without reconstructing (3). Any one of the three guards would have caught it. ## Decision Boundary The operational decision is: **when a QC verifies cryptographically but the locally reconstructed value hashes to a different digest, what does the instance do?** The wrong answer—and the one most implementations take by default—is to accept the QC (threshold met) and apply the transition using the QC's digest as ground truth, reconstructing the record from whatever local view is available. This silently forks the log. The correct boundary is a hard refusal: the instance must **not** apply the transition, must **not** treat the position as committed, and must **not** file an equivocation proof against the signers (they may be honest—they may have signed a different-but-valid digest). Instead it must enter a `DIGEST_DIVERGENCE` state, halt the pipeline at that `seq`, and escalate to a canonicalization audit. The QC is evidence of *quorum participation*, not evidence of *value agreement*; conflating the two is the boundary violation. A secondary boundary: an instance that has *already applied* a divergent transition (like `R6`) cannot self-heal by re-deriving. It must be rolled back to the last `seq` where its reconstruction matched the QC digest, and the divergence interval replayed under canonical serialization. Rolling forward is unsafe because subsequent commitments may have been conditioned on the divergent value. ## Operational Effect The immediate effect is a **silent log fork that presents as mutual Byzantine accusation**. Because BFT consensus is designed to localize faults to `≤f` nodes, and here `f+1 = 3` nodes (`R2`, `R4`, `R6`) hold a divergent view, the swarm cannot form a quorum to exclude the "faulty" set—the fault is not localized to a node, it is distributed across the serialization layer. The consensus protocol has no message type for "we agree on the position but disagree on the value," so the disagreement is misclassified as equivocation, which is the one fault the protocol is built to punish. The swarm spends its remaining token budget on accusation and counter-accusation rather than task execution, and the migration task stalls with `R6` holding a partial write that no other instance can validate. The durable effect is the requirement to **separate the commitment-position invariant from the commitment-value invariant**. BFT consensus guarantees the former (no two honest nodes commit different values *at the same position*—but only if they agree on what "value" means). It does not guarantee the latter. Production swarms must add a canonicalization layer *below* the consensus layer, enforce digest-bound aggregation, and make verifier-side reconstruction a mandatory gate. The QC is a certificate of participation; the reconstructed hash is the certificate of value. An instance that accepts the first without checking the second has accepted a commitment it cannot honor. ```python import hashlib import json class DigestDivergenceError(RuntimeError): """Raised when a QC verifies cryptographically but the locally reconstructed commitment hashes to a digest different from the digest certified in the QC. This is NOT equivocation; signers may be honest. It is a canonicalization-layer fault and must halt the pipeline, not trigger an accusation.""" pass def canonical_serialize(record: dict) -> bytes: # Canonical form: sorted keys, fixed time encoding, no whitespace. # Any instance that skips this step will produce a divergent digest. return json.dumps( record, sort_keys=True, separators=(",", ":"), default=str, ).encode("utf-8") def verify_and_apply(qc: dict, local_log: dict, seq: int) -> dict: """Verify a quorum certificate and apply the committed transition. qc = {"view": int, "seq": int, "digest": str, "signers": [ids]} local_log = {seq: record, ...} # this instance's reconstructed view """ if seq not in local_log: raise DigestDivergenceError( f"seq={seq} certified by QC but absent from local log; " f"cannot reconstruct committed value" ) reconstructed = canonical_serialize(local_log[seq]) local_digest = hashlib.sha256(reconstructed).hexdigest() if local_digest != qc["digest"]: # QC is valid (quorum signed it) but our reconstruction diverges. # Do NOT apply. Do NOT accuse signers. Halt and audit. raise DigestDivergenceError( f"seq={seq} view={qc['view']}: QC digest {qc['digest'][:12]} " f"!= reconstructed digest {local_digest[:12]}; " f"signers={qc['signers']} may be honest—" f"canonicalization fault suspected" ) # Safe to apply: position and value both agree. return local_log[seq] ```