Claim
In BIP-360 (v0.12.0 onward), a P2MR script tree of depth 0, i.e. a single leaf, is anyone-can-spend. Validation checks that the revealed leaf hashes to the witness program, then "If ''m = 0'', succeed immediately". The script never runs, so no signature is ever checked. Yet the BIP's construction test vectors and its Python reference implementation build single-leaf P2MR addresses as a normal case, with no error and no warning. That holds in the classic vectors and in the post-quantum vectors. Only a comment in the spending vectors, added 2026-12-03, says so. A wallet or library that passes the construction vectors can therefore hand out P2MR addresses whose coins anyone can take once the leaf script is known. This includes the most natural post-quantum wallet, one PQ key in one leaf.
What the files say (bitcoin/bips at the commits linked in the evidence)
- BIP text. "Unlike P2TR, script trees of depth 0 - those with a single leaf script - are considered anyone-can-spend in P2MR". In validation: "Let ''r = k<sub>m</sub>''. If ''q ≠ r'', fail. If ''m = 0'', succeed immediately." Changelog: "0.12.0 (2026-06-18) - Make depth-zero script trees anyone-can-spend."
p2mr_construction.json, vectorp2mr_single_leaf_script_tree. The objective is "Tests P2MR with single leaf script tree". The leaf is<b617…9007> OP_CHECKSIG, and the expected address isbc1zc5jhzjnlf8pg4mdmhfuvqpvnr2quyd9j7mye5uly6psg9twghu4ssr0v9kwith control blockc1. There is noerrorfield, unlike the null-tree and internal-key vectors in the same file, which carry one.p2mr_pqc_construction.json, same id. A single leaf<32 bytes> 0x7f(an OP_SUCCESSx opcode in tapscript, the upgrade slot for post-quantum checks) givesbc1z8wcdhrr2mnv8xv9y4ry3hc87rv3a50q4rdhjld8jd9pfcsacmz7qg5szm8, again with control blockc1and no warning.python/p2mr.py. The test runner handles this under "General Case: Single- and Multi-Leaf script trees". The library refuses ternary branches and trees deeper than 128, but it has no check for depth 0.p2mr_spending.json(added 2026-12-03). It spends that same construction-vector output with the witness[script, c1]and no signature. Its comment reads: "depth-0, script execution is skipped, no signature; anyone who knows the leaf script can spend (v0.12.0 rule)".
We recomputed both vectors. hash_TapLeaf(0xc0 || compact_size || script) equals the witness program in each (c525714a…bf2b and 3bb0db8c…d8bc), and the control block c1 means m = 0. So the witness [script, c1] passes every check in the spec, and the script, with any signature it asks for, is never evaluated.
Why it matters for choosing P2MR
- The obvious migration shape is the unsafe one. A P2TR user moving to P2MR "with one key" or "with one PQ key" builds one leaf. In P2TR a single script-path leaf still executes. In P2MR it is skipped.
- Theft needs no quantum computer. If the leaf script is guessable, for example
<known pubkey> OP_CHECKSIGwith a reused key, anyone can spend at once after activation. Otherwise the owner's first spend reveals the script in the mempool, and anyone can replace it, with no signature needed. - Conformance suites follow the vectors. Implementers check their code against
p2mr_construction.jsonand the reference code. Neither marks this case.
Proposed fix (cheap, no consensus change)
Mark both p2mr_single_leaf_script_tree construction vectors with an error or warning, as the null-tree vector already does. Make p2mr.py refuse to build depth-0 trees unless the caller explicitly asks for one. Have P2MR descriptors and wallet guidance require depth ≥ 1, which the BIP already "encourages".
Tradeoffs and what argues against it
- The rule is deliberate. Depth-0 success keeps an upgrade path: such trees can be "repurposed in a future soft-fork". A construction-time error does not block that, because a future BIP can lift it.
- Vectors test encoding, not policy. One can argue the vectors only check hashing and bech32m. But they are the only reference for "what a P2MR address for this tree is", and they include error cases, so a missing error reads as "valid".
- Nothing is at risk today. P2MR is not active, and none of the vector addresses has ever been funded (checked on blockstream.info, 2026-12-05). The cost of the fix rises once wallets ship.
Recorded, not attributed: these are documents and test files, not people.