You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bip-0174.mediawiki
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,7 +267,9 @@ the key.
267
267
268
268
Keys within each scope should never be duplicated; all keys in the format are unique. PSBTs containing duplicate keys are invalid. However implementors
269
269
will still need to handle events where keys are duplicated when combining transactions with duplicated fields. In this event, the software may choose
270
-
whichever value it wishes.
270
+
whichever value it wishes.<ref>'''Why can the values be arbitrarily chosen?''' When there are duplicated keys, the values that can be chosen will either be
271
+
valid or invalid. If the values are invalid, a signer would simply produce an invalid signature and the final transaction itself would be invalid. If the
272
+
values are valid, then it does not matter which is chosen as either way the transaction is still valid.</ref>
271
273
272
274
==Responsibilities==
273
275
@@ -290,7 +292,8 @@ A single entity is likely to be both a Creator and Updater.
290
292
291
293
The Signer must only accept a PSBT.
292
294
The Signer must only use the UTXOs provided in the PSBT to produce signatures for inputs.
293
-
Before signing a non-witness output, the Signer must verify that the TXID of the non-witness UTXO matches the TXID specified in the unsigned transaction.
295
+
Before signing a non-witness input, the Signer must verify that the TXID of the non-witness UTXO matches the TXID specified in the unsigned transaction.
296
+
Before signing a witness input, the Signer must verify that the witnessScript (if provided) matches the hash specified in the UTXO or the redeemScript, and the redeemScript (if provided) matches the hash in the UTXO.
294
297
The Signer should not need any additional data sources, as all necessary information is provided in the PSBT format.
295
298
The Signer must only add data to a PSBT.
296
299
Any signatures created by the Signer must be added as a "Partial Signature" key-value pair for the respective input it relates to.
@@ -313,6 +316,9 @@ For every type that a Combiner understands, it may refuse to combine PSBTs if it
313
316
314
317
The Combiner does not need to know how to interpret scripts in order to combine PSBTs. It can do so without understanding scripts or the network serialization format.
315
318
319
+
In general, the result of a Combiner combining two PSBTs from independent participants A and B should be functionally equivalent to a result obtained from processing the original PSBT by A and then B in a sequence.
320
+
Or, for participants performing fA(psbt) and fB(psbt): Combine(fA(psbt), fB(psbt)) == fA(fB(psbt)) == fB(fA(psbt))
321
+
316
322
===Input Finalizer===
317
323
318
324
The Input Finalizer must only accept a PSBT.
@@ -500,7 +506,7 @@ The reference implementation of the PSBT format is available at https://github.c
500
506
Special thanks to Pieter Wuille for suggesting that such a transaction format should be made
501
507
and for coming up with the name and abbreviation of PSBT.
502
508
503
-
Thanks to Pieter Wuille, Gregory Maxwell, Jonathan Underwood, and Daniel Cousens for additional comments
509
+
Thanks to Pieter Wuille, Gregory Maxwell, Jonathan Underwood, Daniel Cousens and those who commented on the bitcoin-dev mailing list for additional comments
504
510
and suggestions for improving this proposal.
505
511
506
512
==Appendix A: Data types and their specifications==
0 commit comments