TrustlessProtocol specRelayer

Canonical-Fork Invariant

What "connected to the canonical fork" means as a checkable condition for the Relayer. Resolves Relayer-challenges § 1.2; builds on the peer cross-check from Multi-relayer and the bootstrap trust of Syncing relayer.

The problem

The relayer's load-bearing trust assumption (sync the canonical fork) is stated operationally but never defined (Relayer § Trust Model). The threat is a long-range fork built by exited validators: a chain that is cryptographically valid (old keys, real signatures) but not the one social consensus follows. No single data source can settle which fork is canonical, so the definition must be agreement across observers an attacker cannot poison simultaneously.

The invariant

A finalized block B is treated as canonical if:

  1. the relayer's own full node finalizes it, and
  2. at least K of M independent external endpoints report the same finalized hash at that height, and
  3. B descends from the current weak-subjectivity anchor.

Any disagreement between observers is a halt condition for that chain, never a tie to break heuristically.

Ingestion (Relayer § Source Data Ingestion) proceeds normally; the invariant gates what the proof stage (prover in zk-proof mode, packager in direct mode) may treat as finalized input.

The layers

LayerMechanismWhat it defeatsStatus
Own full nodeReal fork-choice over P2P gossip, per relayer — mandatory, an RPC answer is not a fork-choiceSingle poisoned RPC provider; most eclipse setupsNew requirement (this doc)
N-of-M endpoint cross-checkK-of-M agreement on finalized hashes across independent operators / infra providersCompromise of any minority of endpointsIn spec (Relayer § Security Considerations); this doc fixes the quorum rule
Peer cross-checkAuthorized relayers compare finalized hashes: each ingests independently, so the check is freeA fork that fools one relayer's entire endpoint setDrafted (Multi-relayer § Bonus)
Weak-subjectivity anchorPeriodic out-of-band checkpoint refresh (client-team checkpoint providers, explorers); canonical blocks must descend from itAny long-range fork diverging before the anchor, detectable instantlyTies to Relayer-challenges § 1.3: the anchor's max age is the long-range bound
Destination cross-validationMirror periodically checked against checkpoints already committed on the light clientLocal mirror corruption; gives all relayers one shared referenceIn Stateful relayer § Crash-consistency invariants

Failure semantics

Fail closed. On any cross-layer disagreement: Pause the affected chain (Relayer § Pause / Resume), alert the operator, resume only after the divergence is explained. Halting costs only liveness — multi-relayer takeover and Security-Admin rotation are the recourse (Multi-relayer § Layer 2) — while relaying through a disagreement risks the one thing the trust model exists to prevent.

Why this suffices

To defeat the invariant an attacker must simultaneously eclipse the relayer's own node, poison K independent endpoints, compromise the peer relayers (each running the same stack independently), and beat the weak-subjectivity anchor within its freshness window. That reduces the relayer's canonical-fork assumption to the same social-consensus security the source chain itself relies on: the strongest claim available to any cross-chain system.

Honest residue: this is defense-in-depth, not a proof. Eclipse attacks on the full node are mitigated, not eliminated, and the parameters are per-chain judgment calls.

Parameters & open questions

QuestionNote
K / M defaults per source chainEndpoint independence matters more than count: operators, infra providers, geographies
Anchor max age per chainMust sit inside the slashability / weak-subjectivity window. Decided together with Relayer-challenges § 1.3
Anchor source vettingWhich out-of-band checkpoint sources qualify, and how many must agree
Eclipse-resistance ops barPeering count, static peers, sentry topology for the mandatory full node

Related documents

  • Relayer § Trust Model: the assumption this doc makes checkable
  • Multi-relayer: peer cross-check; takeover that keeps a halt liveness-only
  • Syncing relayer: bootstrap and re-bootstrap from the weak-subjectivity anchor
  • Stateful relayer: mirror cross-validation against on-chain checkpoints
  • Relayer-challenges § 1.2, § 1.3: the challenges this resolves / depends on

On this page