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. |
20493fd to
0a4c117
Compare
0a4c117 to
e947d1d
Compare
w0xlt
left a comment
There was a problem hiding this comment.
Code Review ACK e947d1d
Also tested manually decodepsbt with the PSBT fromtest/functional/data/rpc_psbt.json.
How can a PSBT be generate with the preimage fields ?
Sjors
left a comment
There was a problem hiding this comment.
tACK e947d1d modulo duplicate test vector
Would be good to have a test that decodepsbt actually displays the new fields.
It looks like BIP174 test vectors were not updated when these new fields were added. You may want to make a PR to the BIP repo to add the ones you introduce here.
Paging Mr PSBT @achow101.
@w0xlt you'd have to use different software, because Bitcoin Core doesn't use these fields (yet!)
test/functional/data/rpc_psbt.json
Outdated
There was a problem hiding this comment.
"ripemd160_preimages": {
"189f7c8b1a386ffe8eed91b3830c7a7bcd1e778c": "0102",
"f291ba5015df348c80853fa5bb0f7946f5c9e1b3": "01"
}
test/functional/data/rpc_psbt.json
Outdated
There was a problem hiding this comment.
"sha256_preimages": {
"4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a": "01",
"a12871fee210fb8619291eaea194581cbd2531e4b23759d225f6806923f63222": "0102"
}
test/functional/data/rpc_psbt.json
Outdated
There was a problem hiding this comment.
"hash160_preimages": {
"15cc49e191cbc520d91944600a5cb77af6aa3291": "0102",
"c51b66bced5e4491001bd702669770dccf440982": "01"
}
test/functional/data/rpc_psbt.json
Outdated
There was a problem hiding this comment.
"hash256_preimages": {
"76a56aced915d2513dcd84c2c378b2e8aa5cd632b5b71ca2f2ac5b0e3a649bdb": "0102",
"9c12cfdc04c74584d787ac3d23772132c18524bc7ab28dec4219b8fc5b425f70": "01"
}e947d1d to
d1fdbd4
Compare
|
Thanks Sjors, i messed up the test vectors when cherry-picking from my version based on #17034. Corrected. |
|
tACK d1fdbd421737e6bdf1857fd68a79d69096d60b90 |
d1fdbd4 to
a9256dc
Compare
|
Rebased and addressed comments. |
|
ACK a9256dc |
|
@w0xlt: some of it is explained here in a post by @apoelstra: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016713.html |
a9256dc rpc: output all hash preimages in 'decodepsbt' (Antoine Poinsot) 4d6b532 psbt: implement hash preimages fields (Antoine Poinsot) Pull request description: This implements the [bip174 input fields for hash preimages](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki). One motivation is that we will need those once we implement signing support for Miniscript descriptors. ACKs for top commit: achow101: ACK a9256dc Sjors: re-tACK a9256dc w0xlt: reACK a9256dc Tree-SHA512: 145d39f7de86256d4174d063dcee217ea6f9ec7a138bbd5205941d17ca99dcccef0ace05f6d0d6a77dd863e3877b05e0752f2bc36ecd8c508e2c8adae2e03ae1
This implements the bip174 input fields for hash preimages.
One motivation is that we will need those once we implement signing support for Miniscript descriptors.