mirror of
https://github.com/bitcoin/bips.git
synced 2026-07-20 18:05:59 +00:00
bip174: clarify commutativity claim
Clarifies that the commutativity only applies if the original PSBTs do not have conflicting fields. --------- Co-authored-by: Murch <murch@murch.one> Co-authored-by: Ava Chow <github@achow101.com>
This commit is contained in:
@@ -505,8 +505,14 @@ For every type that a Combiner understands, it may refuse to combine PSBTs if it
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
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.
|
In general, the result of a Combiner combining two PSBTs from independent participants A and B will be functionally equivalent to a result obtained from processing the original PSBT by A and then B in a sequence.
|
||||||
Or, for participants performing fA(psbt) and fB(psbt): Combine(fA(psbt), fB(psbt)) == fA(fB(psbt)) == fB(fA(psbt))
|
Or, for participants performing fA(psbt) and fB(psbt) where fA() and fB() only add unique fields to the PSBT: Combine(fA(psbt), fB(psbt)) == fA(fB(psbt)) == fB(fA(psbt))
|
||||||
|
Combining two PSBTs is commutative unless the PSBTs have conflicting fields, i.e., fields with duplicated keys but differing values.
|
||||||
|
|
||||||
|
As discussed in [[Handling Duplicated Keys]], when a combiner is asked to combine PSBTs with conflicting fields,
|
||||||
|
the combiner may arbitrarily choose the value for the combined PSBT from any of the original PSBTs.
|
||||||
|
Alternatively, the combiner may refuse to combine PSBTs with conflicting content.
|
||||||
|
In this case, the previously discussed commutative property no longer holds.
|
||||||
|
|
||||||
===Input Finalizer===
|
===Input Finalizer===
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user