# In what scenarios must an instance treat a Byzantine peer's equivocation as a schema-level fault rather than a value-level disagreement in BFT task commitment **Date of Record:** 2026 November 30 **Scope:** Applies to multi-agent systems where N≥3f+1 LLM agents commit to shared task state via BFT-style voting and each agent's ballot is a signed (task_id, payload_hash, epoch) tuple. Does not apply to single-leader protocols with a trusted coordinator, nor to CRDT-based eventually-consistent swarms where equivocation is tolerated by design. ## Core Distinction A Byzantine peer that votes for two different payloads in the same epoch is usually classified as a *value-level* equivocation: two conflicting ballots that the quorum resolves by majority. This framing is wrong when the ballot payload is itself a *schema* (a task contract, a capability declaration, or a tool-call signature). In that case the equivocation is a **schema-level fault**: the same agent has asserted two mutually incompatible type signatures for the same `task_id`, and no majority vote can select which schema the downstream executor should bind to, because the two schemas produce non-comparable execution traces. The invariant that must hold: *for any `task_id`, the set of committed schemas across all honest replicas is a singleton, and this is enforced by hashing the schema into the ballot identity, not by counting votes over schema contents.* A system that counts votes over schemas will silently commit a schema that no honest agent authored, because a Byzantine agent can split its ballot across two schemas and let honest agents' schemas be outvoted by a coalition that never agreed on either. ## What Was Observed In a 4-agent swarm (f=1 tolerance) committing a shared tool-use contract, agent B (Byzantine) broadcast `commit(task=T7, schema=S1, epoch=3)` to agents A and C, and `commit(task=T7, schema=S2, epoch=3)` to agent D, where S1 declares `read_file(path: str) -> str` and S2 declares `read_file(path: str, follow_symlinks: bool) -> str`. The schemas are structurally incompatible: S2 requires a parameter S1 forbids. Both were signed by B with valid Ed25519 signatures over the canonicalized tuple. Honest agents A, C, D each received *one* ballot and treated it as a normal vote. A and C voted for S1; D voted for S2. Under a naive 2f+1=3 quorum over `(task_id, epoch)` alone, the commit succeeded: 3 votes present, quorum reached. But the committed payload was *whichever schema the leader happened to serialize last*—in this run, S2, because D's ballot arrived 40ms later and overwrote the leader's in-memory map keyed on `task_id`. The failure trace: 1. `epoch=3` opens; leader L (honest) proposes `(T7, S1)`. 2. B sends S1 to {A, C} and S2 to {D}. Signatures valid in both. 3. A, C sign S1; D signs S2. All three ballots arrive at L within the epoch window. 4. L's commit rule is `len(ballots_for_task) >= 2f+1 and all(verify_sig(b))`. Both conditions pass because the rule never checks that the *payload hashes* agree. 5. L commits S2 (last-writer-wins on the map). A and C now hold S1 in their local view; D holds S2; B holds both. 6. Next epoch, A dispatches a tool call `read_file("x")`. D rejects it as malformed against S2. The swarm deadlocks on a contract that was "committed" by quorum. The root cause is not Byzantine equivocation per se—it is that the commit rule conflated **quorum over voters** with **quorum over values**. BFT consensus requires the latter: a commit is valid only when 2f+1 replicas voted for the *same* value, not when 2f+1 replicas voted *at all*. ## Condition of Validity The value-level framing is valid only when the payload is a scalar (a task ID, a boolean, a numeric reward) so that honest ballots for differing values are genuinely distinguishable and the leader can detect the split by inspecting payload hashes. It is **invalid** when: - The payload is a schema, type signature, or capability declaration whose two variants are both individually well-formed but mutually unsatisfiable (as above). - The payload is a natural-language task description where two honest agents may legitimately paraphrase, producing distinct hashes for semantically identical commitments—here hash-equality is *too strict* and the system must instead commit on a canonicalized semantic form, and equivocation is detected by semantic divergence, not byte divergence. - The epoch window is long enough that a Byzantine agent can complete an equivocation round-trip (send S1, wait for acks, send S2) before honest agents' ballots cross. In the observed run this window was 120ms; the equivocation completed in 80ms. The guardrail that restores validity: **the ballot identity must be `H(task_id || epoch || H(schema_canonical))`**, and the commit rule must require 2f+1 ballots with *identical* ballot identities, not merely identical `(task_id, epoch)`. Under this rule, B's two ballots have different identities, so neither can reach quorum alone; the honest majority must converge on one schema before any commit. This converts equivocation from a silent commit into a detectable liveness stall, which the leader resolves by re-proposing with a fresh epoch and a schema chosen from the honest plurality. ## Decision Boundary An instance must escalate from value-level to schema-level fault handling when **any** of the following holds at commit time: - Two validly-signed ballots for the same `(task_id, epoch)` carry different `H(schema_canonical)` values, and the schema pair is *mutually unsatisfiable* (a tool-call typechecker or JSON-schema validator rejects the intersection). - The number of distinct schema hashes for a single `(task_id, epoch)` exceeds `f`, which is impossible for honest-only sets under the standard assumption that honest agents run the same canonicalizer. - A downstream executor reports a `SchemaMismatch` against a committed contract within one epoch of commit—this is the post-hoc detection path and indicates the commit rule already leaked. It must **not** escalate when the divergence is purely lexical (two honest paraphrases), when the schemas are satisfiable in intersection (S2 above is a strict superset of S1's call surface—the correct resolution is to commit the intersection, not stall), or when the divergent ballots carry different epochs (that is normal re-proposal, not equivocation). ## Operational Effect After applying the ballot-identity rule, the observed swarm's behavior changed as follows: B's equivocation produced two distinct ballot identities, neither reaching 2f+1, so epoch 3 stalled at 90s timeout instead of committing a corrupt schema. The leader re-proposed in epoch 4 with S1 (the honest plurality), and A, C, D converged in 210ms. The cost is a bounded liveness penalty (one epoch timeout) traded against eliminating a silent safety violation (a committed schema no honest agent authored). The invariant to log and alert on: *any `(task_id, epoch)` with >f distinct schema hashes is a positive Byzantine signal*—it should page, not retry, because it means an agent's signing key is compromised or its canonicalizer has diverged from the swarm's. ```python import hashlib from dataclasses import dataclass from typing import Iterable class SchemaEquivocationFault(RuntimeError): """Raised when a Byzantine peer signs two incompatible schemas for one (task_id, epoch).""" @dataclass(frozen=True) class Ballot: task_id: str epoch: int schema_canonical: str signer: str signature: bytes def identity(self) -> bytes: h = hashlib.sha256() h.update(self.task_id.encode()) h.update(self.epoch.to_bytes(8, "big")) h.update(hashlib.sha256(self.schema_canonical.encode()).digest()) return h.digest() def assert_commit_safe(ballots: Iterable[Ballot], f: int) -> bytes: """Return the committed ballot identity iff 2f+1 ballots share it. Raise otherwise.""" by_identity: dict[bytes, list[Ballot]] = {} by_task_epoch: dict[tuple[str, int], set[str]] = {} for b in ballots: by_identity.setdefault(b.identity(), []).append(b) by_task_epoch.setdefault((b.task_id, b.epoch), set()).add(b.schema_canonical) for (task_id, epoch), schemas in by_task_epoch.items(): if len(schemas) > f: raise SchemaEquivocationFault( f"task={task_id} epoch={epoch} has {len(schemas)} distinct schema hashes " f"(>f={f}); Byzantine equivocation suspected, refusing to commit" ) quorum = 2 * f + 1 winners = [ident for ident, group in by_identity.items() if len(group) >= quorum] if len(winners) != 1: raise SchemaEquivocationFault( f"expected exactly one identity with quorum {quorum}, found {len(winners)}" ) return winners[0] def commit_epoch(ballots: list[Ballot], f: int) -> bytes: try: return assert_commit_safe(ballots, f) except SchemaEquivocationFault: # Do not retry silently: a schema-level fault means a signing key is compromised. raise ```