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
Persistent monitor events for onchain outbound fails
We are in the process of moving the resolution of all HTLCs from the Channel to
the ChannelMonitor, via persistent MonitorEvents. This will simplify how we
reconstruct/reconcile the ChannelManager's pending HTLC set on startup and
avoid needing to persist pending HTLCs explicitly in the manager, as we can
just replay pending monitor events to reconstruct the set instead.
In recent commits, we started generating persistent monitor events whenever an
HTLC is failed off-chain. We also made those monitor events the sole driver of
off-chain outbound payment failures, failing those HTLCs when the monitor event
is processed. This replaced the previous behavior of failing when we initially
receive update_fail_htlc from our peer.
In this commit, we continue that work by making persistent monitor events the
sole drivers of *on*chain outbound payment failures. When
persistent_monitor_events is enabled, we will skip existing failure paths for
on-chain outbound HTLCs, and instead (a) fail them when the monitor event is
processed, and (b) similar to what we do for claims, the monitor event will not
be acked and will continue to be re-provided on startup until the resulting
PaymentFailed event is processed by the user.
Forward HTLC failure paths are unchanged and will be migrated separately in
upcoming work.
0 commit comments