]> git.bitcoin.ninja Git - rust-lightning/commit
Stop relying on `ChannelMonitor` persistence after manager read
authorMatt Corallo <git@bluematt.me>
Thu, 20 Jun 2024 15:17:10 +0000 (15:17 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 30 Sep 2024 21:12:58 +0000 (21:12 +0000)
commitd44066ba371a2bd61078a9c3fb48978f262c84f7
tree273ddbbec2f59dbe59f0fa3266ee4be6529bfc98
parent84731e4db56af814dc1cdd5f3d6bfb75f9f5320a
Stop relying on `ChannelMonitor` persistence after manager read

When we discover we've only partially claimed an MPP HTLC during
`ChannelManager` reading, we need to add the payment preimage to
all other `ChannelMonitor`s that were a part of the payment.

We previously did this with a direct call on the `ChannelMonitor`,
requiring users write the full `ChannelMonitor` to disk to ensure
that updated information made it.

This adds quite a bit of delay during initial startup - fully
resilvering each `ChannelMonitor` just to handle this one case is
incredibly excessive.

Over the past few commits we dropped the need to pass HTLCs
directly to the `ChannelMonitor`s using the background events to
provide `ChannelMonitorUpdate`s insetad.

Thus, here we finally drop the requirement to resilver
`ChannelMonitor`s on startup.
fuzz/src/chanmon_consistency.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/reload_tests.rs