1
0

Deterministic NodeID:

- use_recoverable_channel is a user setting, available
   only in standard wallets with a 'segwit' seed_type
 - if enabled, 'lightning_xprv' is derived from seed
 - otherwise, wallets use the existing 'lightning_privkey2'

Recoverable channels:
 - channel recovery data is added funding tx using an OP_RETURN
 - recovery data = 4 magic bytes + node id[0:16]
 - recovery data is chacha20 encrypted using funding_address as nonce.
   (this will allow to fund multiple channels in the same tx)

GUI:
  - whether channels are recoverable is shown in wallet info dialog.
  - if the wallet can have recoverable channels but has an old node_id,
    users are told to close their channels and restore from seed
    to have that feature.
This commit is contained in:
ThomasV
2021-03-09 09:55:55 +01:00
parent e3025b3d7b
commit 64a931f21e
23 changed files with 395 additions and 76 deletions

View File

@@ -141,7 +141,6 @@ if [[ $1 == "backup" ]]; then
echo "channel point: $channel"
new_blocks 3
wait_until_channel_open alice
backup=$($alice export_channel_backup $channel)
request=$($bob add_lightning_request 0.01 -m "blah" | jq -r ".invoice")
echo "alice pays"
$alice lnpay $request
@@ -151,7 +150,6 @@ if [[ $1 == "backup" ]]; then
$alice -o restore "$seed"
$alice daemon -d
$alice load_wallet
$alice import_channel_backup $backup
$alice request_force_close $channel
wait_for_balance alice 0.989
fi