Skip to content

Commit 764f245

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 764f245

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

lightning/src/ln/channelmonitor.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,18 @@ 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, channel manager MUST 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+
/// In case of a distributed watchtower deployment, failures sources can be divergent and
148+
/// thus only a opaque failure is return back.
142149
PermanentFailure,
143150
}
144151

0 commit comments

Comments
 (0)