
Core Lightning’s first 26.12 launch candidate provides a solution to reclaim funds from some pending Bitcoin Lightning funds.
It applies after an operator loses native channel knowledge and a peer closes the channel by posting a transaction to Bitcoin. The instrument provides the operator separate methods to reclaim outgoing funds or acquire incoming funds, relying on the cost info that survived.
Core Lightning revealed the take a look at construct on Nov. 18, and nonetheless headed the venture’s launch checklist on Nov. 25 as a pre-release.
Bitcoin Optech lined the function in its Nov. 20 publication and revisited it in its Nov. 24 podcast recap.
Core Lightning’s present restoration course of can reclaim the operator’s primary channel steadiness when the peer posts a closing transaction the recovering node has by no means seen.
The change provides a brand new instrument that addresses a separate output: the quantity the closing transaction units apart for a cost that was nonetheless pending.
Which pending Bitcoin funds qualify
Each restoration paths require an identical output within the closing transaction that continues to be unspent. For a cost the operator provided, the instrument’s handbook says the operator wants the cost hash and the expiry. As soon as the timelock expires, the operator can reclaim these funds.
For a cost the peer provided, the operator wants the preimage, the key that matches the cost hash. The operator’s declare have to be confirmed on Bitcoin earlier than the peer reclaims the identical output. As soon as the timelock expires, the peer can take the funds again.
The instrument reconstructs the spending circumstances for every cost the operator needs to recuperate and checks them towards the closing transaction, and skips funds which might be too small to have an output.
It produces signed transactions for the operator to assessment and broadcast manually.
The instrument handles pending-payment outputs. The principle channel steadiness has its personal restoration path.
The unique node secret, channel and cost particulars, and the peer’s public dedication level are additionally required. Outputs which might be absent or already spent can’t be recovered.
The operator wants the unique node secret, the peer’s closing transaction, channel identifiers and key info, and particulars for every cost they need to recuperate.
A cooperating peer can provide the general public dedication level tied to the closing transaction whereas maintaining its personal keys and dedication secrets and techniques personal.
Core Lightning’s pockets restoration information describes utilizing the node secret and an emergency channel backup to reclaim the primary steadiness after a peer closes the channel.
It additionally warns that restoring an outdated database can completely lose funds, so recovering a pending cost is dependent upon having sufficient info to reconstruct its explicit output.