Skip to content

BIP 174: require creator to initialize empty output fields#988

Merged
luke-jr merged 2 commits intobitcoin:masterfrom
dr-orlovsky:patch-1
Feb 3, 2021
Merged

BIP 174: require creator to initialize empty output fields#988
luke-jr merged 2 commits intobitcoin:masterfrom
dr-orlovsky:patch-1

Conversation

@dr-orlovsky
Copy link
Copy Markdown
Contributor

The current version of the spec requires creator role to initialize empty input fields, but says nothing about output field initialization. At the same time, the following role, updater, "should also add redeemScripts, witnessScripts, and BIP 32 derivation paths to the input and output data if it knows them.", which does not make any sense if the fields were uninitialized. The current Bitcoin Core implementation does this, and other PSBT implementations, like rust-bitcoin, follow this practice

The current version of the spec requires creator role to initialize empty input fields, but says nothing about output field initialization. At the same time, the following role, updater, "should also add redeemScripts, witnessScripts, and BIP 32 derivation paths to the input and output data if it knows them.", which does not make any sense if the fields were uninitialized. The [current Bitcoin Core implementation does this](https://github.com/bitcoin/bitcoin/blob/a24806c25d7a81a9c436de58eb5778d93abab16b/src/psbt.cpp#L12), and [other PSBT implementations, like rust-bitcoin, follow this practice](https://github.com/rust-bitcoin/rust-bitcoin/blob/master/src/util/psbt/mod.rs#L59)
@dr-orlovsky dr-orlovsky changed the title Require creator to initialize empty output fields BIP 174: require creator to initialize empty output fields Sep 7, 2020
@luke-jr
Copy link
Copy Markdown
Member

luke-jr commented Oct 5, 2020

@achow101

@achow101
Copy link
Copy Markdown
Member

achow101 commented Oct 5, 2020

ACK d509aa2

@dr-orlovsky
Copy link
Copy Markdown
Contributor Author

Who else is required to review this PR in order to get it merged?

@luke-jr luke-jr merged commit cf13cfa into bitcoin:master Feb 3, 2021
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.

3 participants