Skip to content

Add seed-only node recovery - #1106

Draft
tnull wants to merge 2 commits into
lightningdevkit:mainfrom
tnull:2026-09-recovery-review
Draft

tnull wants to merge 2 commits into
lightningdevkit:mainfrom
tnull:2026-09-recovery-review

Conversation

@tnull

@tnull tnull commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Restoring a seed recovers wallet keys but does not reconstruct lost channel state. LDK Node currently lacks a dedicated recovery flow for discovering and sweeping eligible channel outputs after counterparties force-close, leaving users without a straightforward recovery path when node data is lost.

Add a restricted recovery mode, exposed through Rust and UniFFI, that connects only to allowlisted peers and scans for BIP84 wallet funds and bounded v2 counterparty-close outputs. Recovery uses isolated persistence, supports all chain backends, and safely resumes Bitcoin Core scans across restarts while handing discovered channel outputs to the sweeper.

Based on https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5009

Provide a restricted recovery node that scans BIP84 and bounded v2
counterparty-closed scripts while connecting only to allowlisted peers.

Keep recovery persistence isolated from ordinary node data and resume
Bitcoin Core scans safely across restarts and shallow reorgs. Expose
the flow through Rust and UniFFI.

Use the published LDK recovery branch until the corresponding changes
are available upstream.

Co-Authored-By: HAL 9000
Exercise counterparty-close recovery using Esplora, Electrum, RPC, and
REST. Require recovered funds to become spendable and remain available
after restarting from persisted recovery state.

Co-Authored-By: HAL 9000
@ldk-reviews-bot

ldk-reviews-bot commented Sep 18, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tankyleo 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 marked this pull request as draft September 18, 2026 11:43
@tankyleo
tankyleo self-requested a review September 18, 2026 18:35
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.

2 participants