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
Currently, if we are restored from an old backup or otherwise lose some persistent state, our peer may tell us about it via the data_loss_protect message. This means that we are holding a revoked holder state.
However, in this case we may end up broadcasting the revoked transaction at a future time. For example, we may decide to broadcast it if the peer goes a way for a long time.
If we detect a data_loss_protect from a peer, we should put the channel into a special mode where we don't try to do anything in the regular channel lifecycle (such as state change or broadcast). Also, there should be an API to allow broadcasting of the toxic transaction, reserved for the case where we can't get our peer to close the channel from their side.
After data_loss_protect is detected on a channel:
prevent advancing of channel state (creation of new local or remote commitment txns)
prevent "normal" force-close, e.g. if the peer is down for a while
new API to allow signing and broadcasting of revoked transaction (to be triggered manually by operator)
special signer mode allowing signing of revoked transaction, in case signer state has not been lost / rolled back and it's disallowing signing via the new API
An additional issue exists when we detect that chanmon is out of sync with chanmgr. It will normally auto force-close. But it may be that the chanmon has a revoked holder transaction, and publishing it will get us penalized. Accordingly:
try to connect to peer to detect if data_loss_protect mode should be turned on before auto force-closing
If we detect a data_loss_protect from a peer, we should put the channel into a special mode where we don't try to do anything in the regular channel lifecycle
Is it not true that we drop the Channel object in such a case, generating a ChannelMonitorUpdate[ChannelMonitorUpdateStep::ChannelForceClose { should_broadcast: false }], preventing any future changes in the channel state machine (since it doesn't exist), while leaving the ChannelMonitor hanging for future calls to get_latest_holder_commitment_txn (which has documentation describing this case).
Activity
TheBlueMatt commentedon Feb 27, 2021
Is it not true that we drop the
Channelobject in such a case, generating aChannelMonitorUpdate[ChannelMonitorUpdateStep::ChannelForceClose { should_broadcast: false }], preventing any future changes in the channel state machine (since it doesn't exist), while leaving the ChannelMonitor hanging for future calls toget_latest_holder_commitment_txn(which has documentation describing this case).TheBlueMatt commentedon Jun 23, 2022
I think everything here is done, except for what is described in #1563, which is more specific, so going to just leave that as "the" issue for this.