This works against LND, and Eclair, filed two issues to make this work at CLN. Do we want to add this to the docs ? IIUC the past answer to SCB has been, no, please use VSS ?
Recovering Channel Funds from a Stale Backup
Use this last-resort procedure only when current channel state is lost but the mnemonic and an
older ldk_node_data.sqlite remain.
- Stop every process using the node identity. Preserve the mnemonic and stale database as
opaque files; do not open or modify the database.
- Start a temporary node on the same network from a new storage directory containing only the
recovered keys_mnemonic.
- From the temporary node, call
connect-peer for each channel counterparty. The state mismatch
causes the counterparty to force-close without operator action on that node.
- Wait until each counterparty commitment transaction is confirmed on chain, then stop the
temporary node. Do not start the stale database before confirmation.
- Block inbound and outbound Lightning peer connections while leaving the chain backend
reachable. Copy the mnemonic and complete stale database into a clean storage directory,
preserving the standard layout, and start LDK Server:
<storage_dir>/keys_mnemonic
<storage_dir>/<network>/ldk_node_data.sqlite
- Keep peer connections blocked while the stale monitor detects the confirmed commitment and
broadcasts the sweep of its static to_remote output. Verify that the sweep confirms before
restoring peer connectivity or considering recovery complete.
Practice this procedure on regtest and retain untouched copies of all recovery material.
If we want this, an --offline flag against ldk-server will be useful for the "keep peer connections blocked" part.
This works against LND, and Eclair, filed two issues to make this work at CLN. Do we want to add this to the docs ? IIUC the past answer to SCB has been, no, please use VSS ?
If we want this, an
--offlineflag against ldk-server will be useful for the "keep peer connections blocked" part.