From 828ce07ca5e38884f97d63141a657bdbbfc0bde8 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Mon, 3 Oct 2022 13:22:32 +0200 Subject: [PATCH 1/3] cmd/lncli: add p2tr address type to account import --- cmd/lncli/walletrpc_active.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/lncli/walletrpc_active.go b/cmd/lncli/walletrpc_active.go index 870464f61..5f3d082bf 100644 --- a/cmd/lncli/walletrpc_active.go +++ b/cmd/lncli/walletrpc_active.go @@ -93,9 +93,11 @@ func parseAddrType(addrTypeStr string) (walletrpc.AddressType, error) { return walletrpc.AddressType_NESTED_WITNESS_PUBKEY_HASH, nil case "np2wkh-p2wkh": return walletrpc.AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH, nil + case "p2tr": + return walletrpc.AddressType_TAPROOT_PUBKEY, nil default: return 0, errors.New("invalid address type, supported address " + - "types are: p2wkh, np2wkh, and np2wkh-p2wkh") + "types are: p2wkh, p2tr, np2wkh, and np2wkh-p2wkh") } } From fb9e9f57c5d0360364d4596dfeebf2c7d063ea08 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Mon, 3 Oct 2022 13:24:05 +0200 Subject: [PATCH 2/3] docs: describe remote signing upgrade process This commit adds a short guide that explains how a remote signing node setup should be migrated from lnd v0.14.x-beta to lnd v0.15.x-beta and adds a note to all 0.15.x release notes. --- docs/release-notes/release-notes-0.15.0.md | 6 ++++++ docs/release-notes/release-notes-0.15.1.md | 6 ++++++ docs/release-notes/release-notes-0.15.2.md | 8 ++++++-- docs/remote-signing.md | 22 ++++++++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/release-notes-0.15.0.md b/docs/release-notes/release-notes-0.15.0.md index 0aec86473..e74f25a59 100644 --- a/docs/release-notes/release-notes-0.15.0.md +++ b/docs/release-notes/release-notes-0.15.0.md @@ -34,6 +34,12 @@ were created after introducing the Taproot key derivation](https://github.com/lightningnetwork/lnd/pull/6524) to simplify detecting Taproot compatibility of a seed. +**NOTE** for users running a remote signing setup: A manual account import is +necessary when upgrading from `lnd v0.14.x-beta` to `lnd v0.15.x-beta`, see [the +remote signing documentation for more +details](../remote-signing.md#migrating-a-remote-signing-setup-from-014x-to-015x). +Please upgrade to `lnd v0.15.2-beta` or later directly! + ## MuSig2 The [`signrpc.Signer` RPC service now supports EXPERIMENTAL MuSig2 diff --git a/docs/release-notes/release-notes-0.15.1.md b/docs/release-notes/release-notes-0.15.1.md index 951634f1b..57f5c73e9 100644 --- a/docs/release-notes/release-notes-0.15.1.md +++ b/docs/release-notes/release-notes-0.15.1.md @@ -44,6 +44,12 @@ supports the feature.](https://github.com/lightningnetwork/lnd/pull/6633) The [wallet also creates P2TR change addresses by default](https://github.com/lightningnetwork/lnd/pull/6810) in most cases. +**NOTE** for users running a remote signing setup: A manual account import is +necessary when upgrading from `lnd v0.14.x-beta` to `lnd v0.15.x-beta`, see [the +remote signing documentation for more +details](../remote-signing.md#migrating-a-remote-signing-setup-from-014x-to-015x). +Please upgrade to `lnd v0.15.2-beta` or later directly! + ## `lncli` * [Add `payment_addr` flag to diff --git a/docs/release-notes/release-notes-0.15.2.md b/docs/release-notes/release-notes-0.15.2.md index dc295ba4c..64b7c5821 100644 --- a/docs/release-notes/release-notes-0.15.2.md +++ b/docs/release-notes/release-notes-0.15.2.md @@ -14,15 +14,19 @@ * [A bug has been fixed that caused fee estimation to be incorrect for taproot inputs when using the `SendOutputs` call.](https://github.com/lightningnetwork/lnd/pull/6941) -# Contributors (Alphabetical Order) +## Taproot +**NOTE** for users running a remote signing setup: A manual account import is +necessary when upgrading from `lnd v0.14.x-beta` to `lnd v0.15.x-beta`, see [the +remote signing documentation for more +details](../remote-signing.md#migrating-a-remote-signing-setup-from-014x-to-015x). + ## Performance improvements * [Refactor hop hint selection algorithm](https://github.com/lightningnetwork/lnd/pull/6914) - # Contributors (Alphabetical Order) * Eugene Siegel diff --git a/docs/remote-signing.md b/docs/remote-signing.md index 6bcef1b57..07800954c 100644 --- a/docs/remote-signing.md +++ b/docs/remote-signing.md @@ -153,6 +153,28 @@ To migrate an existing node, follow these steps: a watch-only one (by purging all private key material from it) by adding the `remotesigner.migrate-wallet-to-watch-only=true` configuration entry. +## Migrating a remote signing setup from 0.14.x to 0.15.x + +If you were running a remote signing setup with `lnd v0.14.x-beta` and want to +upgrade to `lnd v0.15.x-beta`, you need to manually import the newly added +Taproot account to the watch-only node, otherwise you will encounter errors such +as `account 0 not found` when doing on-chain operations that require creating +(change) P2TR addresses. + +**NOTE**: For this to work, you need to upgrade to at least `lnd v0.15.2-beta` +or later! + +The upgrade process should look like this: +1. Upgrade the "signer" node to `lnd v0.15.x-beta` and unlock it. +2. Run `lncli wallet accounts list | grep -A5 TAPROOT` on the **"signer"** node + and copy the `xpub...` value from `extended_public_key`. +3. Upgrade the "watch-only" node to `lnd v0.15.x-beta` and unlock it. +4. Run `lncli wallet accounts import --address_type p2tr default` on + the **"watch-only"** node (notice the `default` account name at the end, + that's important). +5. Run `lncli newaddress p2tr` on the "watch-only" node to test that everything + works as expected. + ## Example initialization script This section shows an example script that initializes the watch-only wallet of From abbf47fde8f8a5e2b2e6848630050d285529f66a Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Mon, 3 Oct 2022 13:25:29 +0200 Subject: [PATCH 3/3] docs: add release notes [skip ci] --- docs/release-notes/release-notes-0.15.2.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/release-notes/release-notes-0.15.2.md b/docs/release-notes/release-notes-0.15.2.md index 64b7c5821..11493623e 100644 --- a/docs/release-notes/release-notes-0.15.2.md +++ b/docs/release-notes/release-notes-0.15.2.md @@ -16,6 +16,8 @@ ## Taproot +* [Add `p2tr` address type to account + import](https://github.com/lightningnetwork/lnd/pull/6966). **NOTE** for users running a remote signing setup: A manual account import is necessary when upgrading from `lnd v0.14.x-beta` to `lnd v0.15.x-beta`, see [the