1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-25 15:09:53 +01:00
eclair/eclair-core
Fabrice Drouin ea773425c2
Derive channel keys from the channel funding pubkey (#1097)
* Derive channel keys from funding pubkey

We now generate a random funding key for each new channel, and use its public key to deterministically derive all channel keys and secrets. This will let us easily recover funds using DLP even if we've lost everything but our seed: we just need to connect to the node we had a channel with, ask them to publish their commit tx, and once we see it on the blockchain we can extract our funding pubkey, recompute channel keys and spend our output.

* Add rationale for new channel derivation scheme

* Add a "funding pubkey path" option to the channel version field

This option is checked when we need to compute channel keys. For old channels it won't be set, and we always set it for new ones.

* ChannelVersion: make sure that all bits are set to 0 for legacy channels

* ChannelVersion: USE_PUBKEY_KEYPATH is set by default

* Move recovery test out of OfflineStateSpec
2019-09-23 11:44:58 +02:00
..
src Derive channel keys from the channel funding pubkey (#1097) 2019-09-23 11:44:58 +02:00
eclair-cli Typed amounts (#1088) 2019-08-07 17:37:38 +02:00
pom.xml Add monitoring with Kamon (disabled by default) (#1126) 2019-09-06 14:37:26 +02:00