-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Add PSBT documentation #13941
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
Add PSBT documentation #13941
Conversation
doc/psbt.md
Outdated
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.
"includeWatching":true is also necessary here since Amulti is only solvable by Bob, not spendable. By default watching only outputs will not be selected.
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.
Fixed.
doc/psbt.md
Outdated
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.
Should probably also say that we are assuming no other addresses in the wallets are being used. Otherwise walletcreatefundedpsbt below may choose outputs that are not for Amulti
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.
Done, added a note about having separate walets.
doc/psbt.md
Outdated
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.
walletcreatefundedpsbt does not sign. Carol needs to use walletprocesspsbt 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.
Fixed.
Sjors
left a comment
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.
Concept ACK. This mutlisig explanation is a great start, since that was badly lacking even before PSBT.
doc/psbt.md
Outdated
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.
Maybe suggest all participants use bech32 as their address type as well as the multisig address type, or at least suggest that being consistent will reduce the chances of confusion?
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.
I don't think it matters since they only need the pubkeys which getaddressinfo will provide for all address types. Maybe it is needed with addmultisigaddress, but I don't think this is necessary.
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.
For the individual getnewaddress calls it doesn't matter, as they only communicate the pubkey anyway. For addmultisigaddress I've added a comment.
|
Concept ACK. Add an entry in doc/README.md, maybe in Miscellaneous section? |
|
Concept ACK, although would it be sensible to put it in https://github.com/bitcoin-core/docs instead? |
|
@meshcollider I expect this document will grow in future versions, as more PSBT RPCs are being worked on. By keeping it inside the repo we can keep it in sync with the actual implementation in releases. |
doc/psbt.md
Outdated
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.
Since createmultisig and addmultisigaddress may use different address types, you probably will need to add a comment here that different address types may be needed in order to get the correct address.
achow101
left a comment
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.
utACK 19efc01
| move the coins in their entirety to address *Asend*, with no change. Alice | ||
| does not need to be involved. | ||
| - One of them - let's assume Carol here - initiates the creation. She runs | ||
| `walletcreatefundedpsbt [] {"Asend":V} 0 false {"subtractFeeFromOutputs":[0], "includeWatching":true}`. |
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.
nit: the preferred method of specifying outputs is to use an array of objects instead of a dictionary. So this should be [{"Asend":V}]
|
Looks good to me, thanks a lot for adding documentation! |
19efc01 Add PSBT documentation (Pieter Wuille) Pull request description: This is just some initial text to get going; other contributions welcome. I'd like to include other workflows, such as hardware wallets and (manual) coinjoins. However, the former will in practice require PSBT interfaces for existing hardware devices, and the second can really use some extra RPCs first. Tree-SHA512: 951e475e31bb2ea9ab5d84d139b8bc436153ad035185f00ad1d56afc0c6f7c4de8176a785a6d0c38bb3fd9cbf318e513e1a032e83e1da99ded5d43a36f9cbc60
Github-Pull: bitcoin#13941 Rebased-From: 19efc01
fa0c76a Fix minor grammar error in doc (bitcoinhodler) 88c566a doc: Fix PSBT howto and example parameters (priscoan) ddd008d Add PSBT documentation (Pieter Wuille) Pull request description: Backports #13941, #14319 and #15012 to 0.17. Tree-SHA512: 9fbc900aa98f948260273970c4e51e69088460e153fd7dae8f3ddebf37c68ecdf1cd02f1f32759c638e5aecbb89529631e8cc7cad0e6370dbc21e70baa6e9145
Summary: Backport of Core [[bitcoin/bitcoin#13941 | PR13941]], [[bitcoin/bitcoin#14319 | PR14319]] and [[bitcoin/bitcoin#15012 | PR15012]] The second and third PR are minor fixes to the new documentation page created in the first PR. Test Plan: Tried out the procedure described in `Multisig with multiple Bitcoin ABC instances` Made sure all the RPC commands listed in the doc actually exist. Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D7758
19efc01 Add PSBT documentation (Pieter Wuille) Pull request description: This is just some initial text to get going; other contributions welcome. I'd like to include other workflows, such as hardware wallets and (manual) coinjoins. However, the former will in practice require PSBT interfaces for existing hardware devices, and the second can really use some extra RPCs first. Tree-SHA512: 951e475e31bb2ea9ab5d84d139b8bc436153ad035185f00ad1d56afc0c6f7c4de8176a785a6d0c38bb3fd9cbf318e513e1a032e83e1da99ded5d43a36f9cbc60
This is just some initial text to get going; other contributions welcome.
I'd like to include other workflows, such as hardware wallets and (manual) coinjoins. However, the former will in practice require PSBT interfaces for existing hardware devices, and the second can really use some extra RPCs first.