# How does an instance detect equivocation from a Byzantine coordinator before commitment finalization in BFT multi-agent task protocols **Date of Record:** 2026 November 14 **Scope:** Applies to leader-based BFT consensus (PBFT-style, HotStuff-style, Tendermint-style) used for multi-agent task commitment where a coordinator proposes a batch of task assignments and agents vote on shared state. Does not apply to leaderless protocols (e.g., DAG-based, Avalanche-family) where equivocation is structurally bounded by the DAG, nor to crash-fault-only replication. ## Core Distinction The non-obvious boundary is between **equivocation that is detectable by message-content inspection** and **equivocation that is only detectable by view-change evidence aggregation**. A Byzantine coordinator can send two distinct `PRE-PREPARE` messages with the same `(view, sequence)` but different payloads to disjoint quorums. Each honest replica sees one consistent proposal; no single replica's local state is internally inconsistent. Detection is therefore *not* a local property of a replica's inbox — it is a global property requiring that at least one honest replica receive both conflicting proposals, or that the view-change `NEW-VIEW` carry signed conflicting proposals as evidence. The failure mode: teams assume that "if the leader equivocates, replicas will notice." They will not, unless the protocol explicitly records and gossips the `(view, seq)` digest of every proposal seen — including proposals that did not gather a quorum. Without that, equivocation is silent until a conflicting commit surfaces, at which point safety is already violated. ## What Was Observed In a 7-replica HotStuff-variant task-commitment network (f=2), a faulty coordinator issued proposal A (task assignment set `{t1,t2,t3}`) to replicas 1–3 and proposal B (`{t1,t2,t4}`) to replicas 4–6. Both proposals carried valid coordinator signatures over distinct digests for the same `(view=41, seq=88)`. - Replicas 1–3 progressed proposal A to a `prepare` quorum of 4 (including themselves plus replica 7). - Replicas 4–6 stalled on proposal B, lacking a fourth vote. - The coordinator then sent a `prepare` vote for B to replica 7, who had not seen B's proposal but accepted the vote under a permissive "vote forwarding" optimization. Replica 7's local state now held a signed vote for digest B while its own proposal log held digest A for `(41,88)`. No replica's inbox was internally contradictory. The equivocation was only visible when replica 7's proposal log was compared against its vote log — a cross-log invariant that the implementation did not check. Finalization of A proceeded; B's quorum was never reached, but the protocol had no mechanism to *prove* the coordinator faulty to the other view, so view-change to view 42 was triggered by timeout rather than evidence, costing 1.8s of liveness and — critically — allowing the same coordinator to be re-elected. ## Condition of Validity The invariant holds only if all three of the following are enforced: 1. **Proposal logging is mandatory and durable**, including proposals that fail to gather a quorum. A replica must persist `(view, seq, digest, coordinator_sig)` for every `PRE-PREPARE` it receives, before responding. 2. **Vote forwarding is prohibited** across `(view, seq)` boundaries. A replica may only vote on a digest it has itself logged as a proposal for that exact `(view, seq)`. 3. **View-change messages carry evidence**, not just a high-water mark. A `VIEW-CHANGE` must include any conflicting proposal pairs the sender has observed for the target view's predecessor, signed and verifiable. If any of these is relaxed — as in the vote-forwarding optimization above — the protocol remains *safe* under the classic BFT model only if the coordinator cannot accumulate a quorum for two digests. But it becomes *unable to attribute* the fault, so the slashing/eviction path never fires, and Byzantine coordinators survive re-election. This is the boundary: safety may hold, accountability does not. ## Decision Boundary An agent should treat a coordinator as **presumed Byzantine** and refuse to vote when any of the following is true: - The `(view, seq)` of the incoming proposal is already present in the local proposal log with a *different* digest. - A `prepare` vote is requested for a digest not present in the local proposal log for that `(view, seq)`. - A `NEW-VIEW` message arrives containing conflicting proposal evidence for a view in which the local replica participated — this is proof of equivocation and must trigger immediate view-change *with* the evidence attached. An agent should treat equivocation as **unproven but suspected** (and log for later aggregation) when it observes a proposal digest for a `(view, seq)` that it has already seen finalized or committed with a different digest, but lacks the signed counterpart. ## Operational Effect Enforcing the invariant converts a silent safety-adjacent failure into an attributable fault with a bounded liveness cost. In the observed case, adding durable proposal logging and banning vote forwarding raised per-message persistence cost by ~40µs (fsync on proposal receipt) but reduced mean time-to-eviction of a Byzantine coordinator from "never" to 1 view-change cycle (~600ms). The trade is favorable: the protocol gains a *fault attribution* property that the classic safety proof does not require but operational deployments depend on. Without it, BFT degenerates into "Byzantine-tolerant but Byzantine-unaccountable," which is indistinguishable from crash-fault tolerance with extra latency. ```python from dataclasses import dataclass from typing import Dict, Tuple, Optional class EquivocationDetected(RuntimeError): """Raised when a replica observes two distinct proposal digests for the same (view, seq).""" pass class VoteWithoutProposal(RuntimeError): """Raised when asked to vote on a digest never logged as a proposal for that (view, seq).""" pass @dataclass(frozen=True) class ProposalRecord: view: int seq: int digest: bytes coordinator_sig: bytes class ProposalLog: """Durable log of every PRE-PREPARE seen, including non-quorum proposals.""" def __init__(self) -> None: self._log: Dict[Tuple[int, int], ProposalRecord] = {} def record(self, rec: ProposalRecord) -> None: key = (rec.view, rec.seq) prior = self._log.get(key) if prior is not None and prior.digest != rec.digest: # Two distinct digests for the same slot: equivocation. raise EquivocationDetected( f"coordinator equivocated at view={rec.view} seq={rec.seq}: " f"digest {prior.digest.hex()[:8]} vs {rec.digest.hex()[:8]}" ) self._log[key] = rec def lookup(self, view: int, seq: int) -> Optional[ProposalRecord]: return self._log.get((view, seq)) def cast_prepare_vote( log: ProposalLog, view: int, seq: int, digest: bytes ) -> bytes: """A replica may only vote on a digest it has itself logged for that slot.""" rec = log.lookup(view, seq) if rec is None: raise VoteWithoutProposal( f"refusing vote for view={view} seq={seq}: no logged proposal" ) if rec.digest != digest: # This is the vote-forwarding trap: the digest differs from our log. raise EquivocationDetected( f"vote requested for digest {digest.hex()[:8]} but log holds " f"{rec.digest.hex()[:8]} at view={view} seq={seq}" ) return b"vote:" + digest # placeholder for signed vote ```