From 8c369ac8e60629ac6c032ffe21bb5ec5b35213d7 Mon Sep 17 00:00:00 2001 From: Nadav Ivgi Date: Fri, 17 Jul 2026 01:25:56 +0300 Subject: [PATCH] bip174: clarify commutativity claim Clarifies that the commutativity only applies if the original PSBTs do not have conflicting fields. --------- Co-authored-by: Murch Co-authored-by: Ava Chow --- bip-0174.mediawiki | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bip-0174.mediawiki b/bip-0174.mediawiki index 9cbbe254..454a1db5 100644 --- a/bip-0174.mediawiki +++ b/bip-0174.mediawiki @@ -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. -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)) +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. + +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===