Skip to content

Commit 6622ea7

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 e706c67 commit 6622ea7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lightning/src/ln/channelmonitor.rs

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

0 commit comments

Comments
 (0)