]> 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>
Thu, 24 Oct 2024 17:44:33 +0000 (17:44 +0000)
commit6c203d803e51ce5c5d1014646dc2d9372337c4fb
treef8e3930c86dcb7ac2be37bd990cf2b8142775f5a
parent4896e20086ef555e70ec171278e66bd14788a265
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
pending_changelog/3322-b.txt [new file with mode: 0644]