You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a ChannelMonitor has a preimage in it that we need to claim an HTLC on a different channel, that ChannelMonior's balance set may still be empty, despite the fact that we absolutely cannot archive/remove it.
The text was updated successfully, but these errors were encountered:
When a `ChannelMonitor` sees a payment preimage on chain for an
outbound HTLC, it creates a `MonitorEvent` containing the preimage
to pass to the inbound edge. The inclusion of the transaction
containing the payment preimage (plus six confirmations) also
results in the corresponding `Balance` being removed from the live
balance set, allowing the `ChannelMonitor` to be pruned (after a
further 4032 blocks).
While `MonitorEvent`s should always be processed in a timely
manner, if a node is suffering from a bug where they are not, its
possible for 4038 blocks to pass with the preimage-containing
`MonitorEvent` still pending. If that happens, its possible the
`ChannelMonitor` is archived even though the preimage in it is
needed in another channel (or `ChannelMonitor`), causing funds
loss.
Luckily the fix is simple - check for pending events before
allowing a `ChannelMonitor` to be archived.
Fixeslightningdevkit#2153
If a ChannelMonitor has a preimage in it that we need to claim an HTLC on a different channel, that ChannelMonior's balance set may still be empty, despite the fact that we absolutely cannot archive/remove it.
The text was updated successfully, but these errors were encountered: