Skip to content

Commit 2ad5aa1

Browse files
author
Antoine Riard
committed
Improve PermanentFailure requiremnts documentation
Sources of the failure may be multiple in case of distributed watchtower deployment. In either case, the channel manager must return a final update asking to its channel monitor(s) to broadcast the lastest state available. Revocation secret must not be released for the faultive channel. In the future, we may return wider type of failures to take more fine-grained processing decision (e.g if local disk failure and redudant remote channel copy available channel may still be processed forward).
1 parent 963aaa6 commit 2ad5aa1

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lightning/src/ln/channelmonitor.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,19 @@ pub enum ChannelMonitorUpdateErr {
134134
TemporaryFailure,
135135
/// Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
136136
/// different watchtower and cannot update with all watchtowers that were previously informed
137-
/// of this channel). This will force-close the channel in question (which will generate one
138-
/// final ChannelMonitorUpdate which must be delivered to at least one ChannelMonitor copy).
137+
/// of this channel).
139138
///
140-
/// Should also be used to indicate a failure to update the local persisted copy of the channel
141-
/// monitor.
139+
/// At reception of this error, ChannelManager will force-close the channel and return at
140+
/// least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
141+
/// least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
142+
/// update must be rejected.
143+
///
144+
/// This failure may also signal a failure to update the local persisted copy of one of
145+
/// the channel monitor instance.
146+
///
147+
/// Note that even when we fail a local commitment transaction update, we still store the
148+
/// update to ensure we can claim from it in case of a duplicate copy of this ChannelMonitor
149+
/// broadcasts it (e.g distributed channel-monitor deployment)
142150
PermanentFailure,
143151
}
144152

0 commit comments

Comments
 (0)