-
Notifications
You must be signed in to change notification settings - Fork 424
Open
Description
LDK currently has two sources of truth for channel data, in particular what commitment number a channel is on: the ChannelManager and the per-channel ChannelMonitors. If, on startup, a monitor is ahead of the corresponding channel data present in the manager, that channel will force-close. We've seen this happen in the wild.
We'd like to fix this issue by reducing reliance on regular persistence of the ChannelManager, and instead reconstructing (at least parts of) it using ChannelMonitor data on startup.
- Store important
Channeldata that is currently persisted in theChannelManagerinChannelMonitors instead Store and check channel data in channel monitors #4218 - Reconstruct
Channels fromChannelMonitors instead of the manager on startup Reload channelmanager with channel data from monitors #4151 - Reconstruct manager events queue from monitor data Store channel-associated events in monitor #4278
- Reconstruct forward HTLCs queues in the manager from monitor data Reconstruct
ChannelManagerforwarded HTLCs maps fromChannels #4227, #4227 Followups #4280, Follow-ups to #4227 (Part 1) #4289 - Reconstruct claimable payments in the manager from monitor data
- Reconstruct outbound payments in the manager from monitor data
- Fix edge cases around in-flight monitor updates currently stored in the manager
- Fix edge cases around channel data that does not yet have a corresponding monitor
- Persist in monitors that
ChannelReadywas exchanged to prevent disconnection on reestablish - While fixing test failures in Reload channelmanager with channel data from monitors #4151, track follow-up items where more data will need to be persisted in monitors and/or new monitor update steps will be needed
Metadata
Metadata
Assignees
Labels
No labels