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.
LDK currently has two sources of truth for channel data, in particular what commitment number a channel is on: the
ChannelManagerand the per-channelChannelMonitors. 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 usingChannelMonitordata on startup.Channeldata that is currently persisted in theChannelManagerinChannelMonitors instead Store and check channel data in channel monitors #4218Channels fromChannelMonitors instead of the manager on startup Reload channelmanager with channel data from monitors #4151ChannelManagerforwarded HTLCs maps fromChannels #4227InboundUpdateAdd::Forwardeddata; fixPaymentForwardedfields #4405RAAMonitorUpdateBlockingActionnot applied to downstream channels in during-startup replay #4458ChannelManagerpersistence #4359ChannelManager::claimable_paymentson startup #4462ChannelReadywas exchanged to prevent disconnection on reestablish