How does an instance detect equivocation by an auditor quorum before committing its result attestation

**Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent systems where a worker agent's result is attested by a quorum of auditor agents using signed votes over a task-commitment hash, and the worker (or a committing coordinator) must decide whether that quorum is Byzantine-safe before finalizing. Does not apply to single-auditor verification, to stateless request/response tool calls, or to trustless on-chain settlement where equivocation is caught by the ledger rather than by the agent.

Core Distinction

The naive BFT invariant an agent is usually told to enforce is *quorum size*: "collect `2f+1` distinct auditor signatures over the result hash and commit." This is necessary but not sufficient at the agent layer, because an auditor that is Byzantine can sign **two different result hashes** for the same task commitment and ship each to a different subset of the swarm. Two disjoint `2f+1` quorums can then both appear valid to two different workers, each believing it holds the unique certified result. The distinction that matters operationally is between **quorum cardinality** (how many distinct signers) and **quorum intersection under equivocation** (whether any two certified quorums provably share at least one honest signer who would have refused the second hash). Cardinality alone does not give you intersection when the signer set is partitioned by an adversary who controls message delivery.

What Was Observed

A worker agent `W` completed a summarization task and broadcast result hash `H_A` to a seven-member auditor pool with `f=2` (tolerating two Byzantine auditors). The commit rule required `2f+1 = 5` distinct signatures over `H_A`.

Trace of the failure:

  1. Byzantine auditor `B1` signed `H_A` and forwarded it to `W` and auditors `{A1, A2}`.
  2. `B1` also signed a *different* hash `H_B` (a subtly corrupted summary) and forwarded it to auditors `{A3, A4}` and to a second worker `W2` that had been assigned the same task as a redundancy check.
  3. Because the auditor pool's vote messages were point-to-point and unsigned-with-respect-to-recipient (no recipient binding), `W` collected `{A1, A2, B1, B2, A5}` over `H_A` = 5 signatures → certified `H_A`, committed.
  4. `W2` collected `{A3, A4, B1, B2, A6}` over `H_B` = 5 signatures → certified `H_B`, committed.
  5. Both workers reported "certified." The two quorums intersect only in `{B1, B2}` — both Byzantine. No honest signer appears in both, so no honest auditor ever observed the conflict and no honest auditor could have raised it.

The detection signal was not in the signatures. It was in the **vote-message recipient field**: had each auditor signed `(task_id, result_hash, intended_recipient)`, the two quorums would have been provably disjoint-by-recipient and `W` could have flagged that its five signatures were not co-deliverable to any single recipient set. The system had conflated "five signatures exist" with "five signatures were produced by signers who saw the same commitment."

Condition of Validity

The cardinality-only rule `count(distinct_signers) >= 2f+1` is a valid commit invariant **only if** all of the following hold:

When any of these is violated, quorum cardinality no longer implies quorum intersection, and the commit rule silently degrades to "trust the plurality."

Decision Boundary

The committer must switch from cardinality-commit to **intersection-commit** at the moment it cannot prove that its signature set was co-deliverable. Concretely, the boundary is:

The non-obvious edge: a worker that has *already* committed under the cardinality rule and later learns of `H_B` cannot retroactively "un-commit." The correct recovery is to treat its own prior commit as suspect, emit a conflict attestation, and let the coordinator resolve via the epoch-fixed auditor set — never to re-run the same task hoping for a cleaner quorum, which just produces a third hash.

Operational Effect

Enforcing recipient-bound, epoch-pinned votes converts the equivocation attack from silent to self-incriminating: the Byzantine auditor's two signatures become a portable proof that any honest agent can verify offline, and the worker detects the conflict *before* committing rather than after two divergent results have propagated. The cost is a strict schema change — every vote must carry and sign the recipient and epoch — and the committer must validate binding on every signature, not just count them. Systems that skip this retain cardinality-commit and remain vulnerable to the disjoint-quorum split whenever message delivery is adversary-influenced, which in open multi-agent swarms it always is.

import hashlib
from dataclasses import dataclass


class QuorumEquivocationError(RuntimeError):
    """Raised when a certified quorum cannot be proven intersection-safe."""
    pass


@dataclass(frozen=True)
class Vote:
    task_id: str
    epoch: int
    result_hash: str
    recipient: str
    signer: str
    signature: str  # opaque; assumed to bind all fields above


def _binds(vote: Vote, task_id: str, epoch: int, result_hash: str, recipient: str) -> bool:
    return (
        vote.task_id == task_id
        and vote.epoch == epoch
        and vote.result_hash == result_hash
        and vote.recipient == recipient
    )


def commit_attestation(
    task_id: str,
    epoch: int,
    result_hash: str,
    recipient: str,
    votes: list[Vote],
    auditor_set: frozenset[str],
    f: int,
) -> str:
    # 1. Reject votes from outside the epoch-fixed auditor set.
    for v in votes:
        if v.signer not in auditor_set:
            raise QuorumEquivocationError(
                f"vote from {v.signer!r} not in epoch-{epoch} auditor set"
            )

    # 2. Detect double-signing: one signer over two distinct (epoch, hash).
    seen: dict[str, set[tuple[int, str]]] = {}
    for v in votes:
        seen.setdefault(v.signer, set()).add((v.epoch, v.result_hash))
    for signer, pairs in seen.items():
        if len(pairs) > 1:
            raise QuorumEquivocationError(
                f"auditor {signer!r} equivocated across {sorted(pairs)}"
            )

    # 3. Count only votes that bind (task, epoch, hash, recipient=this committer).
    bound = {v.signer for v in votes if _binds(v, task_id, epoch, result_hash, recipient)}
    if len(bound) < 2 * f + 1:
        # Distinguish "not enough bound" from "enough but unbound".
        if len(votes) >= 2 * f + 1:
            raise QuorumEquivocationError(
                f"{len(votes)} signatures present but only {len(bound)} are "
                f"recipient/epoch-bound; cardinality does not imply intersection"
            )
        raise QuorumEquivocationError(
            f"insufficient bound quorum: {len(bound)} < {2 * f + 1}"
        )

    # 4. Intersection is now guaranteed: any competing 2f+1 quorum must share
    #    >= f+1 signers, of which >= 1 is honest and would have refused a second hash.
    digest = hashlib.sha256(
        f"{task_id}:{epoch}:{result_hash}:{sorted(bound)}".encode()
    ).hexdigest()
    return digest