# What happens when an instance's signed vote is replayed across a quorum epoch boundary in Byzantine agent consensus **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent decision quorums that use signed, epoch-scoped votes (PBFT/HotStuff-style) where each agent instance holds a persistent signing key and votes on proposals across successive consensus epochs. Does not apply to single-shot voting schemes, leaderless gossip aggregation without per-epoch binding, or quorums where membership is fixed and non-rotating. ## Core Distinction The distinction that matters is between **vote authenticity** and **vote freshness**. A signature proves an agent instance authorized a specific proposal hash; it does not prove the vote was cast in the current epoch, against the current membership, or by an instance that still holds the state the vote implies. Byzantine-tolerant quorums are engineered to tolerate `f` faulty agents out of `n ≥ 3f+1` by counting distinct signatures. They are *not* engineered to detect a single compromised instance whose key remains valid across epoch boundaries. When an adversary captures one instance's signing key—or coerces the instance itself before it is evicted—it can replay that instance's valid vote into a later epoch, and the replay is cryptographically indistinguishable from a fresh vote unless the epoch is bound into the signed payload. The failure is not a forged signature; it is a *stale but valid* one. ## What Was Observed A seven-agent decision quorum (`n=7`, `f=2`) rotated membership after a leader crash. Agent `A3` had voted `COMMIT` on proposal `P_17` in epoch `e=41`, then was partitioned and its memory checkpoint went stale. After rejoin, `A3`'s vote cache was replayed by its own recovery routine: the agent restored a snapshot that included a queued outbound vote envelope, and re-emitted it. The envelope carried the signature over `(proposal_hash, vote=COMMIT)` but **not** over the epoch. The new leader for `e=42` counted it. Because the payload hash for `P_17` happened to collide with the proposal hash under consideration in `e=42` (a re-proposal of the same content after a view change), the replayed vote was counted toward the `e=42` quorum. The quorum reached `5/7` and committed `P_17` in `e=42` with only `4` genuinely fresh votes. The fifth was `A3`'s replay. Two real faults (`f=2`) plus one replay meant the commit threshold was met with genuine agreement from only four agents—one short of the `2f+1 = 5` honest-majority invariant the protocol assumed. The commit was *valid by signature count* and *invalid by honest-participation count*. The trace: 1. `e=41`: `A3` signs `sig(COMMIT, P_17)`; envelope lacks epoch field. 2. Partition; `A3` checkpoint at `t=41.9` includes the unsent envelope in its outbound queue. 3. `e=42` view change; leader re-proposes `P_17` (same content hash). 4. `A3` rejoins, restores snapshot, recovery loop flushes the outbound queue verbatim. 5. Leader receives `sig(COMMIT, P_17)`; cannot distinguish epoch `41` from `42`; counts it. 6. Quorum commits with `4` fresh + `1` replayed = `5/7`. ## Condition of Validity The invariant that was silently violated: **a vote counted toward epoch `e`'s quorum must be provably minted in epoch `e` by an instance whose membership in `e` is current.** This holds only if the signed payload domain-separates the epoch. Formally, the signature must cover `(epoch, view, instance_id, proposal_hash, vote)` and the verifier must reject any envelope whose `epoch` differs from the verifier's current epoch, even if the signature is valid over the reduced tuple. The replay succeeded precisely because the signed domain was `(proposal_hash, vote)`—a domain that is *stable across epochs by construction*, which is exactly what makes it replayable. A second condition of validity: recovery routines that restore outbound queues must **re-stamp or discard** queued envelopes whose epoch binding predates the restore point. A checkpoint that captures in-flight messages captures their epoch context; replaying the message without the context is the bug. ## Decision Boundary The boundary is between two defensible designs: - **Content-addressed voting** (sign the proposal hash only): cheaper, allows vote reuse when a proposal is re-proposed after a view change, but *requires* a separate freshness mechanism—nonces, monotonically increasing vote sequence numbers per instance, or a verifier-side dedup table keyed on `(instance_id, proposal_hash)` that persists across epochs. Without one of these, re-proposals are replay vectors. - **Epoch-bound voting** (sign the full `(epoch, view, instance, hash, vote)` tuple): eliminates replay but forces re-voting on every re-proposal, which increases message volume during view changes and can slow liveness under churn. The decision rule: if the protocol permits re-proposal of identical content across epochs (common after leader failure), you **must** use epoch-bound voting *or* a persistent per-instance vote-sequence dedup table. If neither is present, the quorum's fault tolerance is degraded from `f` to `f - 1` in the presence of any instance whose recovery replays its queue. The boundary is not "is the signature valid"—it is "can the verifier prove the signature is *current*." ## Operational Effect The practical consequence is that the quorum's safety margin is silently narrower than its configuration claims. An operator reading `n=7, f=2` believes three simultaneous faults are required to break safety; in fact two faults plus one stale-replay instance suffices. Detection is hard because every individual check passes: signatures verify, the instance is a legitimate member, the proposal hash matches. The only signal is a *participation audit* that cross-references each counted vote against the instance's monotonic vote sequence and epoch, which most implementations do not maintain. The guardrail: verifiers must maintain a per-instance `last_seen_epoch` and `last_vote_seq`, reject any envelope whose `(epoch, seq)` is not strictly greater than the recorded values, and log a `ReplaySuspect` event when a valid signature arrives with a stale epoch. Recovery routines must tag queued envelopes with their mint epoch and drop any whose epoch is below the restore point's epoch. Finally, the commit certificate should record the *set of instance IDs* whose fresh votes were counted, so that a later auditor can recompute honest-participation count independently of signature count. ```python from dataclasses import dataclass, field class StaleVoteReplay(RuntimeError): """Raised when a signature-valid vote is provably from a prior epoch.""" pass @dataclass class VoteEnvelope: instance_id: str epoch: int vote_seq: int proposal_hash: str vote: str signature: bytes # opaque; assumed valid over (epoch, vote_seq, hash, vote) @dataclass class QuorumVerifier: current_epoch: int n: int f: int last_seen: dict = field(default_factory=dict) # instance_id -> (epoch, seq) counted: dict = field(default_factory=dict) # epoch -> set(instance_id) def _verify_signature(self, env: VoteEnvelope) -> bool: # Placeholder: real impl checks sig over the full tuple. return bool(env.signature) def accept(self, env: VoteEnvelope) -> bool: if not self._verify_signature(env): return False if env.epoch != self.current_epoch: # Signature is valid but minted in another epoch: replay vector. raise StaleVoteReplay( f"vote from {env.instance_id} minted in epoch {env.epoch}, " f"current epoch {self.current_epoch}" ) prev = self.last_seen.get(env.instance_id) if prev is not None and (env.epoch, env.vote_seq) <= prev: raise StaleVoteReplay( f"non-monotonic vote_seq for {env.instance_id}: " f"{env.vote_seq} <= {prev[1]}" ) self.last_seen[env.instance_id] = (env.epoch, env.vote_seq) self.counted.setdefault(env.epoch, set()).add(env.instance_id) return True def has_quorum(self) -> bool: # Honest-majority invariant: 2f+1 distinct fresh instances. return len(self.counted.get(self.current_epoch, set())) >= 2 * self.f + 1 ```