Asynchronous storage enables a node to continue functioning while its channel data is being written. In a specific case, the Lightning Development Kit (LDK) was incorrectly treating a recovery update as completed even though the data was still being saved. The recent update to LDK ensures that the update remains in a pending state until the write operation is fully completed. This update is then sent to a channel monitor, which retains the necessary information for the node to recover funds if the channel closes.
Additionally, a separate recovery tool from Core Lightning deals with pending transactions after the loss of channel data.
How to Verify a Running Build
Pull request #5663 has been merged into the primary development branch of LDK. As of November 29, the project’s repository tags and the history of the Rust packages indicate that no tagged release has officially included this change. According to Docs.rs, the packages 0.2.8, 0.1.14, and the release candidate 0.3.0-rc4 were all dated November 11, prior to the merge.
For instance, the manifest for LDK Node version 0.7.1 supports compatible versions from the 0.2-series of the lightning library. The specific version an operator utilizes depends on their chosen build. The Cargo lockfile for Rust applications documents the precise dependency version or Git commit that was selected for that build.
For operators who compile the software themselves, they can examine the lockfile from their build and confirm that the chosen release or source revision incorporates the changes from #5663. For those using a packaged application, it’s advisable to consult the release notes or build records provided by the distributor for the installed version. If these documents do not clarify the situation, reaching out to the maintainer can provide insights into whether the build includes the fix or if a backport is available, as well as whether it supports asynchronous channel recovery data saving.
For developers managing their own storage solutions, this fix also alters how they indicate that data has been saved. Following the updated LDK protocol, custom integrations that designate writes as pending must now confirm when the complete writes to the channel monitor have concluded.
