Skip to content
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

Merged
merged 15 commits into from Dec 10, 2021

Conversation

achow101
Copy link
Member

@achow101 achow101 commented Oct 3, 2019

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.

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Oct 3, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #23718 (PSBT: hash preimages fields by darosior)

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.

@fanquake fanquake requested review from instagibbs and meshcollider Oct 8, 2019
Copy link
Member

@instagibbs instagibbs left a comment

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);
Copy link
Member

@instagibbs instagibbs Oct 8, 2019

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.

src/psbt.h Outdated Show resolved Hide resolved
Copy link
Member

@darosior darosior left a comment

re-ACK 198b080

test/functional/data/rpc_psbt.json Outdated Show resolved Hide resolved
@Sjors
Copy link
Member

@Sjors Sjors commented Dec 10, 2021

re-utACK e75e52f

Copy link
Member

@darosior darosior left a comment

re-ACK e75e52f

@laanwj
Copy link
Member

@laanwj laanwj commented Dec 10, 2021

Code review ACK 8152117

@laanwj laanwj merged commit 50c502f into bitcoin:master Dec 10, 2021
13 of 15 checks passed
sidhujag pushed a commit to syscoin/syscoin that referenced this issue 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
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this issue Dec 23, 2021
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants