Skip to content

Abort on first-startup chain tip fetch failure - #1272

Open
tankyleo wants to merge 1 commit into
lightningdevkit:release/0.7from
tankyleo:2026-12-tip-fetch-failure-0.7
Open

tankyleo wants to merge 1 commit into
lightningdevkit:release/0.7from
tankyleo:2026-12-tip-fetch-failure-0.7

Conversation

@tankyleo

@tankyleo tankyleo commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Backport of commit d0ed6a3 from PR #884

@ldk-reviews-bot

ldk-reviews-bot commented Dec 2, 2026 •

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tnull

tnull commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Needs a rebase

When a fresh node's bitcoind RPC/REST chain source fails to return the
current chain tip, we previously silently fell back to the genesis
block as the wallet birthday. The next successful startup would then
force a full-history rescan of the whole chain. Instead, return
BuildError::WalletSetupFailed on the first build so the
misconfiguration surfaces immediately and no stale fresh state is
persisted.

Restarts with a previously-persisted wallet are unaffected: a
transient chain source outage on an existing node still allows startup
to proceed. Esplora/Electrum backends currently never expose a tip at
build time so the guard only fires for bitcoind sources; the latent
wallet-birthday-at-genesis issue on those backends is left for a
follow-up.

Backport of d0ed6a3

Co-Authored-By: HAL 9000
@tankyleo
tankyleo force-pushed the 2026-12-tip-fetch-failure-0.7 branch from efb6f78 to 92dcc18 Compare December 3, 2026 23:03
@tankyleo

tankyleo commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased, dropped the new error type, and dropped the changelog diff (looks like in the past we've done these in a single commit at release time).

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.

3 participants