]> git.bitcoin.ninja Git - rust-lightning/commit
Aggregate packages with differing, but similar, locktimes 2024-08-joint-claim-pinnable
authorMatt Corallo <git@bluematt.me>
Sat, 7 Sep 2024 15:46:50 +0000 (15:46 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 18 Sep 2024 16:48:42 +0000 (16:48 +0000)
commit4b7a8ef8fc21604d403f1d6fc6cb42382b1c0e79
tree3995f14350a10f3736b0e41cabb59c70bc2356fe
parent0aa42a9e0c7030e783fbc0948860f78e7eb9cf3a
Aggregate packages with differing, but similar, locktimes

In the previous commit we started aggregating claims much more
aggressively but only did so when timelocks on HTLC timeout claims
were identical. While there's nothing we can do to change this for
HTLC-Timeout claims (on our commitment transactions), on
counterparty commitment transactions there's no such restirction.
However, we do need to avoid aggregating different claims with
drastically different locktimes to avoid delaying claims too long,
and thus introduce a new constant, `CLTV_DIFFERENCE_BATCH_CLAIM`,
to limit this.

This new batching has security implications as we may delay
claiming an HTLC for up to that many blocks, and thus we make the
constant public, update the `cltv_expiry_delta` docs, and update
some constant security checks.
lightning/src/chain/channelmonitor.rs
lightning/src/chain/package.rs
lightning/src/ln/channelmanager.rs
lightning/src/util/config.rs