]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Support future removal of redundant per-HTLC data in `ChanMonUpd`s 2023-03-one-less-sig
authorMatt Corallo <git@bluematt.me>
Fri, 10 Mar 2023 23:32:48 +0000 (23:32 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 24 Mar 2023 19:02:08 +0000 (19:02 +0000)
`ChannelMonitorUpdate`s are our most size-sensitive objects - they
are the minimal objects which need to be written to disk on each
commitment update. Thus, we should be careful to ensure we don't
pack too much extraneous information into each one.

Here we add future support for removing the per-HTLC explicit
`Option<Signature>` and `HTLCInCommitmentUpdate` for non-dust HTLCs
in holder commitment tx updates, which are redundant with the
`HolderCommitmentTransaction`.

While we cannot remove them entirely as previous versions rely on
them, adding support for filling in the in-memory structures from
the redundant fields will let us remove them in a future version.

We also add test-only generation logic to test the new derivation.


No differences found