[BIP 174] Implement serialization support for GLOBAL_XPUB field.#16463
Closed
achow101 wants to merge 8 commits intobitcoin:masterfrom
Closed
[BIP 174] Implement serialization support for GLOBAL_XPUB field.#16463achow101 wants to merge 8 commits intobitcoin:masterfrom
achow101 wants to merge 8 commits intobitcoin:masterfrom
Conversation
Contributor
|
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. |
242da6e to
53041ea
Compare
52473e9 to
951f5ee
Compare
This was referenced Feb 11, 2020
This was referenced Feb 25, 2020
jonatack
reviewed
Mar 24, 2020
src/psbt.h
Outdated
Member
There was a problem hiding this comment.
suggested change to reference instead of copy in range loops:
- for (const auto xpub_pair : xpubs) {
- for (const auto xpub : xpub_pair.second) {
+ for (const auto& xpub_pair : xpubs) {
+ for (const auto& xpub : xpub_pair.second) {
Member
There was a problem hiding this comment.
(this also fixes warnings if you build with -Wrange-loop-analysis)
Member
Author
There was a problem hiding this comment.
Done, also in a few other places.
luke-jr
pushed a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jun 12, 2020
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. Github-Pull: bitcoin#16463 Rebased-From: 812ff941c1ff8afeccb07cd3bc048873a3b390f6
luke-jr
pushed a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jun 12, 2020
Github-Pull: bitcoin#16463 Rebased-From: 55ab6bf997776e9a5a9f7ab145547c5a81011574
luke-jr
pushed a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jun 12, 2020
Github-Pull: bitcoin#16463 Rebased-From: 391e26f6f6d30a3659eab6301ec65b8005808cd9
luke-jr
pushed a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jun 12, 2020
Github-Pull: bitcoin#16463 Rebased-From: 303d0bc58a763ded678aa161af23c55152db0cd4
luke-jr
pushed a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jun 12, 2020
Github-Pull: bitcoin#16463 Rebased-From: 5d23641e78acbb996462f3ac881e531d8d757943
luke-jr
pushed a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jun 12, 2020
Github-Pull: bitcoin#16463 Rebased-From: 52adc7827e046105e4a0e37e750499ad50e93a06
luke-jr
pushed a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jun 12, 2020
Github-Pull: bitcoin#16463 Rebased-From: ef3b959fded671f664c87e793dbcf1241f57168f
adamjonas
reviewed
Jan 12, 2021
…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.
Member
Author
|
Combining this PR with #17034 |
laanwj
added a commit
that referenced
this pull request
Dec 10, 2021
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 #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
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Dec 11, 2021
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bitcoin/bips#784 added a new global field
GLOBAL_XPUBto BIP 174. This PR adds support for (de)serializing this field and displaying it indecodepsbt.