diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -24,6 +24,13 @@ inconsistent, if any. - The `hdmasterkeyid` return field has been removed from `getaddressinfo` and `getwalletinfo`. Use `hdseedid` instead. +- Descriptors with key origin information imported through `importmulti` will + have their key origin information stored in the wallet for use with creating + PSBTs. +- If `bip32derivs` of both `walletprocesspsbt` and `walletcreatefundedpsbt` is + set to true but the key metadata for a public key has not been updated yet, + then that key will have a derivation path as if it were just an independent + key (i.e. no derivation path and its master fingerprint is itself) RPC importprivkey: new label behavior ------------------------------------- @@ -60,3 +67,10 @@ The `importmulti` RPC now supports importing of addresses from descriptors. A "desc" parameter can be provided instead of the "scriptPubKey" in a request, as well as an optional range for ranged descriptors to specify the start and end of the range to import. More information about descriptors can be found [here](https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/doc/descriptors.md). + +Miscellaneous Wallet changes +---------------------------- + +- The key metadata will need to be upgraded the first time that the HD seed is + available. For unencrypted wallets this will occur on wallet loading. For + encrypted wallets this will occur the first time the wallet is unlocked. diff --git a/src/script/sign.h b/src/script/sign.h --- a/src/script/sign.h +++ b/src/script/sign.h @@ -22,6 +22,7 @@ class CTransaction; struct KeyOriginInfo { + //! First 32 bits of the Hash160 of the public key at the root of the path uint8_t fingerprint[4]; std::vector path; @@ -30,6 +31,18 @@ std::begin(b.fingerprint)) && a.path == b.path; } + + ADD_SERIALIZE_METHODS; + template + inline void SerializationOp(Stream &s, Operation ser_action) { + READWRITE(fingerprint); + READWRITE(path); + } + + void clear() { + memset(fingerprint, 0, 4); + path.clear(); + } }; /** An interface to be implemented by keystores that support signing. */ diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -14,6 +14,7 @@ #include