From 33202403b3b19671231c3dc49ae9375dfb1a8bb4 Mon Sep 17 00:00:00 2001 From: JP Date: Tue, 28 Jul 2026 15:22:24 +0100 Subject: [PATCH] bip360: correct the claimed P2MR witness size saving The Transaction Size and Fees section says a P2MR witness is always 32 bytes smaller than an equivalent P2TR script path spend witness. The control blocks are 1 + 32*m and 33 + 32*m bytes, each serialised with a compact size prefix, so at m = 7 the P2TR control block is 257 bytes and takes a 3-byte prefix while the P2MR one is 225 bytes and takes 1. The saving there is 34 bytes, not 32. Every other depth up to 128 gives 32. The section already footnotes this boundary for the P2MR side a few paragraphs earlier. --- bip-0360.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bip-0360.mediawiki b/bip-0360.mediawiki index 380a75a2..630d6ff0 100644 --- a/bip-0360.mediawiki +++ b/bip-0360.mediawiki @@ -307,7 +307,7 @@ control block = [size] [control byte] [Merkle path] (1 + 1 + 32*m = 2 + 32*m byt ====Comparison with P2TR script path spend==== -A P2MR witness will be smaller than the witness to an equivalent P2TR script path spend. This is because P2MR does not require inclusion of an internal public key in the control block to unlock and spend an output. For this reason, a P2MR witness will always be 32 bytes smaller than an equivalent P2TR script path spend witness. +A P2MR witness will be smaller than the witness to an equivalent P2TR script path spend. This is because P2MR does not require inclusion of an internal public key in the control block to unlock and spend an output. For this reason, a P2MR witness will be 32 bytes smaller than an equivalent P2TR script path spend witness, except at ''m = 7'', where the two control blocks fall on opposite sides of the compact size boundary and the saving is 34 bytes. ==Performance Impact==