mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge bitcoin/bitcoin#17034: [BIP 174] PSBT version, proprietary, and xpub fields
81521173baMerge global xpubs in joinpsbts and combinepsbts (Andrew Chow)d8043ddf64Add global xpub test vectors from BIP (Andrew Chow)35670df866Add global_xpubs to decodepsbt (Andrew Chow)903848562eImplement serializations for PSBT_GLOBAL_XPUB (Andrew Chow)c5c63b8e4fImplement operator< for KeyOriginInfo and CExtPubKey (Andrew Chow)d3dbb16168Separate individual HD Keypath serialization into separate functions (Andrew Chow)a69332fd89Store version bytes and be able to serialize them in CExtPubKey (Andrew Chow)5fdaf6a2admoveonly: Move (Un)Serialize(To/From)Vector, (De)SerializeHDKeypaths to psbt module (Andrew Chow)94065cc6c5Test for proprietary field (Andrew Chow)a4cf810174Output proprietary type info in decodepsbt (Andrew Chow)aebe758e54Implement PSBT proprietary type (Andrew Chow)10ba0b593dOutput psbt version in decodepsbt (Andrew Chow)df84fa99c5Add GetVersion helper to PSBT (Andrew Chow)c3eb416b88Implement PSBT versions (Andrew Chow)3235847473Types are compact size uints (Andrew Chow) Pull request description: Implements the changes to BIP 174 proposed in https://github.com/bitcoin/bips/pull/849 and https://github.com/bitcoin/bips/pull/784 Implements `PSBT_GLOBAL_VERSION`, `PSBT_GLOBAL_PROPRIETARY`, `PSBT_IN_PROPRIETARY`, `PSBT_OUT_PROPRIETARY`, and `PSBT_GLOBAL_XPUB`. The `PSBT_GLOBAL_XPUB` changes are merged in from #16463. Also includes the test vectors added to BIP 174 for these fields. A number of additional changes to keypath and xpub serialization are made to support `PSBT_GLOBAL_XPUB`. ACKs for top commit: laanwj: Code review ACK81521173baTree-SHA512: bd71c3f26030fc23824e76a30d3d346a753e1db224ecee163d6813348feb52d3f4cf4e739a4699e2cff381197ce2a7ea4a92a054f2c3e1db579e91e92a0945e0
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <chainparams.h>
|
||||
#include <chainparamsbase.h>
|
||||
#include <key.h>
|
||||
#include <psbt.h>
|
||||
#include <pubkey.h>
|
||||
#include <script/keyorigin.h>
|
||||
#include <script/sign.h>
|
||||
@@ -43,7 +44,7 @@ FUZZ_TARGET_INIT(script_sign, initialize_script_sign)
|
||||
} catch (const std::ios_base::failure&) {
|
||||
}
|
||||
CDataStream serialized{SER_NETWORK, PROTOCOL_VERSION};
|
||||
SerializeHDKeypaths(serialized, hd_keypaths, fuzzed_data_provider.ConsumeIntegral<uint8_t>());
|
||||
SerializeHDKeypaths(serialized, hd_keypaths, CompactSizeWriter(fuzzed_data_provider.ConsumeIntegral<uint8_t>()));
|
||||
}
|
||||
|
||||
{
|
||||
@@ -61,7 +62,7 @@ FUZZ_TARGET_INIT(script_sign, initialize_script_sign)
|
||||
}
|
||||
CDataStream serialized{SER_NETWORK, PROTOCOL_VERSION};
|
||||
try {
|
||||
SerializeHDKeypaths(serialized, hd_keypaths, fuzzed_data_provider.ConsumeIntegral<uint8_t>());
|
||||
SerializeHDKeypaths(serialized, hd_keypaths, CompactSizeWriter(fuzzed_data_provider.ConsumeIntegral<uint8_t>()));
|
||||
} catch (const std::ios_base::failure&) {
|
||||
}
|
||||
std::map<CPubKey, KeyOriginInfo> deserialized_hd_keypaths;
|
||||
|
||||
Reference in New Issue
Block a user