From 6699d99c2f9460ba4fb6436f641da3dfc158ae47 Mon Sep 17 00:00:00 2001 From: Nadav Ivgi Date: Tue, 6 Jan 2026 03:47:40 +0200 Subject: [PATCH 1/3] Remove BIP 174's claim that Combine is commutative --- bip-0174.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bip-0174.mediawiki b/bip-0174.mediawiki index b60cf56c7b..c73bfa4104 100644 --- a/bip-0174.mediawiki +++ b/bip-0174.mediawiki @@ -908,7 +908,7 @@ 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. 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. -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): Combine(fA(psbt), fB(psbt)) == fB(fA(psbt)) ===Input Finalizer=== From c4be017b88305bc3045eeeabf6097a3ba5e554ab Mon Sep 17 00:00:00 2001 From: Murch Date: Thu, 16 Jul 2026 12:48:38 -0700 Subject: [PATCH 2/3] BIP174: clarify commutativity claim This applies the patch suggested by Ava in https://github.com/bitcoin/bips/pull/2075#issuecomment-4695621731 Co-authored-by: Ava Chow --- bip-0174.mediawiki | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bip-0174.mediawiki b/bip-0174.mediawiki index c73bfa4104..e4ce08a849 100644 --- a/bip-0174.mediawiki +++ b/bip-0174.mediawiki @@ -907,8 +907,13 @@ 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. -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. -Or, for participants performing fA(psbt) and fB(psbt): Combine(fA(psbt), fB(psbt)) == fB(fA(psbt)) +In general, the result of a Combiner combining two PSBTs with no conflicting fields 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. +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)) + +Combiners may be asked to combine PSBTs which have conflicting fields, i.e. each PSBT has a field with identical keys but differing values. +As discussed in [[Handling Duplicated Keys]], the combiner may arbitrarily choose the value from one PSBT to use in the combined PSBT. +Alternatively, the combiner may also refuse to combine the PSBTs. +In this case, the previously discussed commutative property no longer holds. ===Input Finalizer=== From 2d3dc4b01924df79c9cf0bd36fd759730e0cd435 Mon Sep 17 00:00:00 2001 From: Murch Date: Thu, 16 Jul 2026 13:12:56 -0700 Subject: [PATCH 3/3] bip174: Touch up commutative clarification --- bip-0174.mediawiki | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bip-0174.mediawiki b/bip-0174.mediawiki index e4ce08a849..25c903e7c1 100644 --- a/bip-0174.mediawiki +++ b/bip-0174.mediawiki @@ -907,12 +907,13 @@ 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. -In general, the result of a Combiner combining two PSBTs with no conflicting fields 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) 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. -Combiners may be asked to combine PSBTs which have conflicting fields, i.e. each PSBT has a field with identical keys but differing values. -As discussed in [[Handling Duplicated Keys]], the combiner may arbitrarily choose the value from one PSBT to use in the combined PSBT. -Alternatively, the combiner may also refuse to combine the PSBTs. +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===