
Core Lightning’s first 26.12 launch candidate provides a option 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 accumulate incoming funds, relying on the cost data that survived.
Core Lightning printed the take a look at construct on Nov. 18, and nonetheless headed the challenge’s launch record on Nov. 25 as a pre-release.
Bitcoin Optech lined the characteristic in its Nov. 20 e-newsletter and revisited it in its Nov. 24 podcast recap.
Core Lightning’s current restoration course of can reclaim the operator’s most important 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 guide 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 should 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 in opposition to the closing transaction, and skips funds which are too small to have an output.
It produces signed transactions for the operator to evaluation and broadcast manually.
The instrument handles pending-payment outputs. The primary 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 are absent or already spent can’t be recovered.
The operator wants the unique node secret, the peer’s closing transaction, channel identifiers and key data, and particulars for every cost they wish to recuperate.
A cooperating peer can provide the general public dedication level tied to the closing transaction whereas preserving 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 relies on having sufficient data to reconstruct its specific output.