-
Notifications
You must be signed in to change notification settings - Fork 36.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BIP 174] PSBT version, proprietary, and xpub fields #17034
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cursory review ACK
unsigned char type = key[0]; | ||
// Type is compact size uint at beginning of key | ||
VectorReader skey(s.GetType(), s.GetVersion(), key, 0); | ||
uint64_t type = ReadCompactSize(skey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manually inspected that all the fields with constant types are now being written with compact size, but I would like to be more systematic somehow in the future.
9ca1f8b
to
674e638
Compare
674e638
to
dd1a5ca
Compare
dd1a5ca
to
7fbaf8b
Compare
7fbaf8b
to
7795804
Compare
7795804
to
19200a7
Compare
198b080
to
e75e52f
Compare
re-utACK e75e52f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK e75e52f
…to psbt module SerializeToVector, UnserializeFromVector, DeserializeHDKeypaths, and SerializeHDKeypaths were in sign.h where PSBT was originally implemented. Since all of the PSBT serialization has moved to its own file, these functions should follow.
CExtPubKey does not store the version bytes for the extended public key. We store these so that a CExtPubKey can be serialized and deserialized with the same version bytes.
e75e52f
to
8152117
Compare
Code review ACK 8152117 |
…elds 8152117 Merge global xpubs in joinpsbts and combinepsbts (Andrew Chow) d8043dd Add global xpub test vectors from BIP (Andrew Chow) 35670df Add global_xpubs to decodepsbt (Andrew Chow) 9038485 Implement serializations for PSBT_GLOBAL_XPUB (Andrew Chow) c5c63b8 Implement operator< for KeyOriginInfo and CExtPubKey (Andrew Chow) d3dbb16 Separate individual HD Keypath serialization into separate functions (Andrew Chow) a69332f Store version bytes and be able to serialize them in CExtPubKey (Andrew Chow) 5fdaf6a moveonly: Move (Un)Serialize(To/From)Vector, (De)SerializeHDKeypaths to psbt module (Andrew Chow) 94065cc Test for proprietary field (Andrew Chow) a4cf810 Output proprietary type info in decodepsbt (Andrew Chow) aebe758 Implement PSBT proprietary type (Andrew Chow) 10ba0b5 Output psbt version in decodepsbt (Andrew Chow) df84fa9 Add GetVersion helper to PSBT (Andrew Chow) c3eb416 Implement PSBT versions (Andrew Chow) 3235847 Types are compact size uints (Andrew Chow) Pull request description: Implements the changes to BIP 174 proposed in bitcoin/bips#849 and bitcoin/bips#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 bitcoin#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 ACK 8152117 Tree-SHA512: bd71c3f26030fc23824e76a30d3d346a753e1db224ecee163d6813348feb52d3f4cf4e739a4699e2cff381197ce2a7ea4a92a054f2c3e1db579e91e92a0945e0
… xpub fields 4ca1ec3 Merge global xpubs in joinpsbts and combinepsbts (Andrew Chow) fed4bd5 Add global xpub test vectors from BIP (Andrew Chow) 958a2f7 Add global_xpubs to decodepsbt (Andrew Chow) feb2cae Implement serializations for PSBT_GLOBAL_XPUB (Andrew Chow) 9a017e8 Implement operator< for KeyOriginInfo and CExtPubKey (Andrew Chow) ff65018 Separate individual HD Keypath serialization into separate functions (Andrew Chow) 7e14f42 Store version bytes and be able to serialize them in CExtPubKey (Andrew Chow) ddd0620 moveonly: Move (Un)Serialize(To/From)Vector, (De)SerializeHDKeypaths to psbt module (Andrew Chow) e436636 Test for proprietary field (Andrew Chow) 624cd15 Output proprietary type info in decodepsbt (Andrew Chow) eafafc3 Implement PSBT proprietary type (Andrew Chow) 736907a Output psbt version in decodepsbt (Andrew Chow) 742a811 Add GetVersion helper to PSBT (Andrew Chow) 3355928 Implement PSBT versions (Andrew Chow) 6a76e80 Types are compact size uints (Andrew Chow) Pull request description: Implements the changes to BIP 174 proposed in bitcoin/bips#849 and bitcoin/bips#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 ACK 4ca1ec3 Tree-SHA512: bd71c3f26030fc23824e76a30d3d346a753e1db224ecee163d6813348feb52d3f4cf4e739a4699e2cff381197ce2a7ea4a92a054f2c3e1db579e91e92a0945e0
Implements the changes to BIP 174 proposed in bitcoin/bips#849 and bitcoin/bips#784
Implements
PSBT_GLOBAL_VERSION
,PSBT_GLOBAL_PROPRIETARY
,PSBT_IN_PROPRIETARY
,PSBT_OUT_PROPRIETARY
, andPSBT_GLOBAL_XPUB
. ThePSBT_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
.