Skip to content

fix(#150): --fallback-rpc daemon flag (Glif is not always reachable) - #151

Merged
Reiers merged 1 commit into
mainfrom
fix/fallback-rpc-flag
Jul 23, 2026
Merged

fix(#150): --fallback-rpc daemon flag (Glif is not always reachable)#151
Reiers merged 1 commit into
mainfrom
fix/fallback-rpc-flag

Conversation

@Reiers

@Reiers Reiers commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Fixes #150.

Live incident this evening: Glif public mainnet started 403'ing our Hetzner census's egress IP. Sync loop kept ticking in its own view (head=6217239) but the persisted head was frozen at 6217164 for ~90 epochs. The gossip inline-backfill's 3-epoch cap couldn't cover the gap, and the daemon had no CLI to point the chain-fetcher anywhere else.

Fix: add --fallback-rpc <URL> to lantern daemon. Overrides the hardcoded Glif URL on the four runtime call sites (combined-source race entry, Sync source, gossip-enabled Sync source, second combined.Source entry). Deliberately does NOT override the boot-anchor Glif source — that one participates in the #54 two-operator anchor agreement and silently swapping it would weaken the trust model. Documented in the flag help.

Empty default preserves existing behavior. Whitespace-only override is treated as empty; valid overrides are whitespace-trimmed. Unit tests cover both.

Verified working alternates from the affected Hetzner IP (via curl): https://api.chain.love/rpc/v1, https://filfox.info/rpc/v1, https://rpc.ankr.com/filecoin.

Deploying on Hetzner census immediately after merge to clear the incident.

Live incident 2026-07-23: Glif public mainnet began 403'ing our Hetzner
census's egress IP (-32156 "Access denied"). Sync loop kept ticking
(head=6217239 in its own view), but the persisted store head froze at
6217164 forever: every chain-fetch got 403, and the gossip inline-
backfill's 3-epoch cap could not cover the growing gap. Silent stall.

Add a `--fallback-rpc <URL>` daemon flag that overrides the hardcoded
Glif URL for the four RUNTIME call sites (combined-source race entry,
Sync source, gossip-enabled Sync source, second combined.Source entry).

The boot-anchor's Glif entry (fetchVerifiedTrustedHead) intentionally
stays hardcoded: it participates in the #54 two-independent-operators
agreement rule and silently swapping it to a different provider would
weaken the anchor trust model. Documented in the flag help.

Empty override (default) preserves current behavior on every call site.
Whitespace-only override is treated as empty; a valid override is
whitespace-trimmed. Unit tests cover both.

Live-verified: Hetzner census restarted with
  --fallback-rpc https://api.chain.love/rpc/v1
clears the -32156 error and catches up to network head.
@Reiers
Reiers merged commit 6e29b34 into main Jul 23, 2026
2 checks passed
@Reiers
Reiers deleted the fix/fallback-rpc-flag branch July 23, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

daemon: hardcoded Glif URL makes census/beacon un-recoverable when Glif blocks the egress IP

1 participant