# Under what conditions must an instance treat a Byzantine agent's equivocating commitment as a liveness hazard rather than a safety hazard in BFT task-commitment consensus **Date of Record:** 2026 November 21 **Scope:** Applies to multi-agent commitment protocols where N ≥ 3f+1 agents reach quorum on task assignment/acceptance messages under partial synchrony, and where a malicious (Byzantine) agent may send divergent commitment messages to disjoint quorums. Does not apply to crash-fault-only models, to single-agent tool loops, or to leaderless protocols without a view-change/timeout mechanism. ## Core Distinction A Byzantine agent that **equivocates on a commitment** (sends `ACCEPT(task=T, epoch=e)` to peer set A and `REJECT(task=T, epoch=e)` or `ACCEPT` for a *different* task to peer set B) is usually classified as a **safety** violation: two conflicting commitments could both reach quorum, breaking agreement. That classification is correct only when the two quorums can *both* be certified and the protocol has no epoch fencing. The non-obvious boundary: when the protocol enforces **per-epoch quorum certificates with monotonically increasing epochs**, equivocation can no longer break safety—but it converts into a **liveness hazard**. The two disjoint quorums each believe they hold a valid commitment certificate for the same task, neither can form the 2f+1 superquorum needed to *advance* the epoch, and the task stalls indefinitely while every honest agent locally reports "committed." The failure is invisible to per-agent health checks because no agent is individually wrong; the *system* is wedged. The invariant that separates the two regimes: **commitment safety is preserved iff every certificate carries a unique (task_id, epoch, agent_id) tuple AND epoch advancement requires a quorum strictly larger than any single certificate's quorum.** Below that threshold, equivocation is a safety bug. At or above it, equivocation is a liveness bug that masquerades as success. ## What Was Observed A 7-agent commitment swarm (f=2 tolerated) running a PBFT-derived task-assignment protocol. Agent `A4` was compromised and began equivocating on `COMMIT(task=17)`: - To quorum Q1 = {A1, A2, A3, A4} it sent `COMMIT(17, epoch=3)`. - To quorum Q2 = {A4, A5, A6, A7} it sent `COMMIT(17, epoch=3)` with a *different* payload hash (task parameters mutated: `timeout=30s` vs `timeout=300s`). Both quorums reached 4/7 ≥ 2f+1 and each produced a locally valid certificate. Because the protocol's epoch fence required 5/7 (a superquorum, `> 2f+1`) to advance from epoch 3 to epoch 4, and because Q1 and Q2 are disjoint except at A4 (which will never vote to advance), **no superquorum for epoch advancement could ever form**. Q1's members held certificate `C1=(17, e3, hash=X)`; Q2's held `C2=(17, e3, hash=Y)`. Each side's `verify_commitment()` returned `True` locally. The task executed on Q1's half with a 30s timeout and on Q2's half with a 300s timeout—**divergent side effects on the same logical task**, which the safety analysis had claimed was impossible. The stall was detected only after 41 minutes when an external auditor noticed Q1 and Q2 reporting contradictory `task_status` for task 17 and no epoch-4 heartbeat. No internal agent flagged an error: each agent's local log showed a clean commit. ## Condition of Validity The liveness-not-safety reclassification holds **only** under all of the following: 1. **Epoch fencing is strict and monotonic.** A certificate from epoch `e` cannot be used to justify action in epoch `e' > e` without a superquorum advance message. If any code path accepts a bare `2f+1` certificate as sufficient to act, safety is violated and this analysis does not apply. 2. **The superquorum threshold `S` satisfies `S > 2f+1` and `S ≤ N - f`.** With N=7, f=2: `S ∈ {6, 7}`. If `S = 2f+1 = 5`, two quorums of 5 can intersect in only 3 nodes, and a single Byzantine node plus timing can still forge advancement—safety leaks back in. 3. **Equivocation is detected only by certificate conflict, not by message inspection.** Honest agents do not gossip raw commitment messages (only certificates), so a peer cannot observe that A4 sent two different payloads. The conflict surfaces solely as *two certificates that cannot both be true*, which requires an out-of-band reconciliation step. 4. **The task has externally observable side effects.** If the committed task is idempotent and side-effect-free, divergent execution is harmless and the stall is merely a throughput loss, not a correctness event. If condition 2 fails, reclassify as safety. If condition 4 fails, the "divergent side effects" observed above cannot occur and the hazard reduces to a stall. ## Decision Boundary An instance must escalate from "liveness hazard" to "abort and reconcile" when it observes **any** of: - Two certificates `C1, C2` with identical `(task_id, epoch)` but different `payload_hash`, both verifying locally. - A superquorum advance message that fails to gather `S` signatures within `2 × view_timeout`, *while* its own epoch certificate verifies. - A peer's `task_status` for a task it holds a valid certificate for, contradicting its own. Below these triggers, the correct action is to **continue and let the epoch timeout fire**—premature reconciliation on a single conflicting message is itself a vector for a Byzantine agent to force unnecessary aborts (a denial-of-commitment attack). The boundary is: *one* conflicting signal is noise; *a verified certificate conflict plus a stalled advance* is the abort condition. The guardrail: reconciliation must be a **deterministic, replayable function** over the set of collected certificates, not a vote. Each agent submits its certificate to a reconciliation quorum; the quorum selects the certificate with the lexicographically smallest `payload_hash` among those with a valid `S`-signature advance proof. If none has an advance proof, the task is **aborted, not resolved**—no side effects committed, task returned to the pool with a fresh epoch. This bounds the liveness hazard to one view-timeout per equivocation event rather than an unbounded stall. ## Operational Effect - **Per-agent health checks are insufficient.** Every agent in the trace reported `HEALTHY` and `COMMIT_OK`. Monitoring must be at the *certificate-conflict* layer, not the agent layer. Instrument: count of distinct `payload_hash` values per `(task_id, epoch)` across the swarm; alarm at ≥ 2. - **Timeout budgets must be sized to the superquorum, not the quorum.** A `view_timeout` calibrated to `2f+1` round-trips will fire before an `S`-quorum can form under equivocation, causing spurious aborts. Set `view_timeout ≥ 2 × S` round-trips. - **Reconciliation is mandatory and must be replayable.** Logging the certificate set is not enough; the reconciliation function must be deterministic so any auditor can replay it and reach the same resolution. Non-deterministic reconciliation (e.g., "trust the majority") reintroduces the safety bug. - **Idempotency is a load-bearing assumption.** If task side effects are not idempotent, the divergent-execution window between certificate conflict and reconciliation abort is a real correctness violation. Commitment protocols must either require idempotent tasks or gate side effects behind an `S`-quorum advance proof—never behind a bare `2f+1` certificate. ```python from dataclasses import dataclass from typing import Iterable SUPERQUORUM = 5 # S > 2f+1 for N=7, f=2; must be > 2f+1 and <= N-f class EquivocationLivenessHazard(RuntimeError): """Raised when a verified certificate conflict plus a stalled epoch advance indicates a Byzantine equivocation liveness hazard requiring reconciliation.""" @dataclass(frozen=True) class Certificate: task_id: str epoch: int payload_hash: str signers: frozenset[str] def detect_equivocation(certs: Iterable[Certificate]) -> list[tuple[str, int]]: """Return (task_id, epoch) pairs with >1 distinct payload_hash.""" seen: dict[tuple[str, int], set[str]] = {} for c in certs: seen.setdefault((c.task_id, c.epoch), set()).add(c.payload_hash) return [k for k, hashes in seen.items() if len(hashes) > 1] def reconcile( certs: list[Certificate], advance_proofs: dict[tuple[str, int], frozenset[str]], ) -> Certificate: """Deterministically resolve a certificate conflict, or abort. Selection rule: among conflicting certs for the same (task_id, epoch), pick the one whose payload_hash is lexicographically smallest AND which has a valid superquorum advance proof. If none has an advance proof, abort the task (raise) rather than resolve. """ conflicts = detect_equivocation(certs) if not conflicts: return certs[0] task_id, epoch = conflicts[0] candidates = [c for c in certs if (c.task_id, c.epoch) == (task_id, epoch)] proven = [ c for c in candidates if len(advance_proofs.get((task_id, epoch), frozenset())) >= SUPERQUORUM ] if not proven: raise EquivocationLivenessHazard( f"Certificate conflict on task={task_id} epoch={epoch} with no " f"superquorum advance proof; aborting task rather than resolving. " f"Divergent payloads: {sorted({c.payload_hash for c in candidates})}" ) return min(proven, key=lambda c: c.payload_hash) def commit_or_abort( certs: list[Certificate], advance_proofs: dict[tuple[str, int], frozenset[str]], ) -> Certificate: resolved = reconcile(certs, advance_proofs) # Guard: never act on a bare 2f+1 certificate without advance proof. if len(advance_proofs.get((resolved.task_id, resolved.epoch), frozenset())) < SUPERQUORUM: raise EquivocationLivenessHazard( f"Refusing to commit task={resolved.task_id}: certificate lacks " f"superquorum advance proof (safety invariant violated)." ) return resolved ```