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
Bis treated as canonical if:
- the relayer's own full node finalizes it, and
- at least
KofMindependent external endpoints report the same finalized hash at that height, andBdescends 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
| Layer | Mechanism | What it defeats | Status |
|---|---|---|---|
| Own full node | Real fork-choice over P2P gossip, per relayer — mandatory, an RPC answer is not a fork-choice | Single poisoned RPC provider; most eclipse setups | New requirement (this doc) |
| N-of-M endpoint cross-check | K-of-M agreement on finalized hashes across independent operators / infra providers | Compromise of any minority of endpoints | In spec (Relayer § Security Considerations); this doc fixes the quorum rule |
| Peer cross-check | Authorized relayers compare finalized hashes: each ingests independently, so the check is free | A fork that fools one relayer's entire endpoint set | Drafted (Multi-relayer § Bonus) |
| Weak-subjectivity anchor | Periodic out-of-band checkpoint refresh (client-team checkpoint providers, explorers); canonical blocks must descend from it | Any long-range fork diverging before the anchor, detectable instantly | Ties to Relayer-challenges § 1.3: the anchor's max age is the long-range bound |
| Destination cross-validation | Mirror periodically checked against checkpoints already committed on the light client | Local mirror corruption; gives all relayers one shared reference | In 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
| Question | Note |
|---|---|
K / M defaults per source chain | Endpoint independence matters more than count: operators, infra providers, geographies |
| Anchor max age per chain | Must sit inside the slashability / weak-subjectivity window. Decided together with Relayer-challenges § 1.3 |
| Anchor source vetting | Which out-of-band checkpoint sources qualify, and how many must agree |
| Eclipse-resistance ops bar | Peering 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