Extend KeysInterface with derive_channel_keys
authorAntoine Riard <ariard@student.42.fr>
Wed, 6 May 2020 00:00:01 +0000 (20:00 -0400)
committerAntoine Riard <ariard@student.42.fr>
Thu, 28 May 2020 08:21:46 +0000 (04:21 -0400)
commit2f4f0aa7660d5f72d0bcbdea7fa3ab3f9ff35d2d
tree0b8be6bcb5d1747794c371c545820db1e20ab926
parentf8ea748268a7700c33b6e0905f9f33844469fc83
Extend KeysInterface with derive_channel_keys

A dynamic-p2wsh-output like `to_local` on local commitment/HTLC txn
require a signature from delayed_payment_key to be spend. Instead of
sending private key in descriptor, we ask for spender to derive again
the corresponding ChannelKeys based on key state, uniquely identifying
a channel and encompassing its unique start data.

Descriptor modification is done in next commit.
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
lightning/src/chain/keysinterface.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmonitor.rs
lightning/src/util/enforcing_trait_impls.rs
lightning/src/util/test_utils.rs