Skip to content

Comments

BIP 360 - Pay to Merkle Root (P2MR)#1670

Merged
murchandamus merged 139 commits intobitcoin:masterfrom
cryptoquick:p2qrh
Feb 11, 2026
Merged

BIP 360 - Pay to Merkle Root (P2MR)#1670
murchandamus merged 139 commits intobitcoin:masterfrom
cryptoquick:p2qrh

Conversation

@cryptoquick
Copy link
Contributor

This spent several months gathering feedback from the mailing list and from other advisors. This is hopefully polished enough to submit upstream.

Let me know if you have any questions or feedback, and of course feel free to submit suggestions.

Thank you for your time.

@cryptoquick cryptoquick marked this pull request as draft September 27, 2024 18:18
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting (the question of resistance to quantum computing may have resurged lately with the publication of https://scottaaronson.blog/?p=8329, see also https://x.com/n1ckler/status/1839215426091249778).

@cryptoquick cryptoquick force-pushed the p2qrh branch 2 times, most recently from b6ed2c3 to d6d15ad Compare September 28, 2024 18:01
@jonatack
Copy link
Member

jonatack commented Oct 1, 2024

@cryptoquick Can you begin to write up the sections currently marked as TBD, along with a backwards compatibility section (to describe incompatibilities, severity, and suggest mitigations, where applicable/relevant)? We've begun to reserve a range of BIP numbers for this topic, pending continued progress here.

@jonatack jonatack added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Oct 9, 2024
@jonatack
Copy link
Member

@cryptoquick ping for an update here. Have you seen https://groups.google.com/g/bitcoindev/c/p8xz08YTvkw / https://github.com/chucrut/bips/blob/master/bip-xxxx.md? It may be interesting to review each other and possibly collaborate.

@EthanHeilman
Copy link
Contributor

@cryptoquick @murchandamus Renamed to P2MR and marked as complete

@EthanHeilman EthanHeilman force-pushed the p2qrh branch 5 times, most recently from b72d13a to f76c25f Compare February 10, 2026 17:19
Copy link
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a bit unusual to advance the BIP to Complete before publication. I would recommend merging as Draft and advancing to Complete in a few weeks if the reviews prompted by publication don’t turn up any further changes or those changes have been addressed. Either way is fine, though.

Test vector data for creation of P2MR UTXOs can be found [https://github.com/bitcoin/bips/blob/master/bip-0360/ref-impl/common/tests/data/P2MR_construction.json here].

These test vectors build off of the test vectors for [[bip-0341.mediawiki|BIP 341]] (Taproot). One important distinction is that the P2TSH test vectors do not include keypath spend scenarios.
These test vectors build off of the test vectors for [[bip-0341.mediawiki|BIP 341]] (Taproot). One important distinction is that the P2MR test vectors do not include keypath spend scenarios.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don’t, it might be good to have a test case in which someone uses a P2TR construction with version 2 and that it fails.

| Pay-to-Merkle-Root (P2MR)
| Hunter Beast, Ethan Heilman, Isabel Foxen Duke
| Specification
| Draft
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mismatch here: Preamble is Complete, here it’s Draft.

@EthanHeilman EthanHeilman force-pushed the p2qrh branch 3 times, most recently from df0feef to f5aa4d9 Compare February 10, 2026 17:29
@EthanHeilman
Copy link
Contributor

I would recommend merging as Draft and advancing to Complete in a few weeks if the reviews prompted by publication don’t turn up any further changes or those changes have been addressed.

@murchandamus Sounds good, reverted to draft.

@cryptoquick cryptoquick changed the title BIP 360 - Pay to Tapscript Hash (P2TSH) BIP 360 - Pay to Merkle Root (P2MR) Feb 10, 2026
@murchandamus murchandamus removed the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Feb 10, 2026
@murchandamus
Copy link
Member

Was just taking another look at this. I noticed two things:

  1. The reference implementation seems to still be following the old terminology. The reference implementation is only required for moving a BIP to Complete, so it doesn’t have to be fixed before it is published. Is it acceptable for you to make any fixups that may arise to the reference implementation in a follow-up PR?
  2. The commit history is a bit chaotic, and seems to contain the entire reference implementation history. We usually squash the commits of new BIPs to a single commit when it is published. Would that be an issue for you?

@cryptoquick
Copy link
Contributor Author

  1. Totally fine. Please give us a few days to create a new pull request.
  2. That shouldn't be a problem. Squash away!

Thank you.

@cryptoquick
Copy link
Contributor Author

@murchandamus We got the test vectors updates knocked out sooner than I thought, would you prefer we hold off on merging as originally planned or should we just get them into this one? See:
cryptoquick#42

@murchandamus
Copy link
Member

If you have it ready, just merge it in here. I’ll wait with the publication until you tell me that it’s ready from your side.

* P2TSH:  Taptree can now be populated with a mix of leaves secured either via Schnorr based locking script or SLH-DSA based locking script

* P2TSH: Improved docs and variable names

* p2tsh: even more improvements to docs for Rust implementation

* p2tsh rust: now using libbitcoinpqc bindings package (segregated from core C implementation)

* bip360: p2tsh -> p2mr

* BIP360: Test that P2TR uses only witness version 1

bitcoin#1670 (comment)
@cryptoquick
Copy link
Contributor Author

It is done.

@murchandamus murchandamus merged commit a314861 into bitcoin:master Feb 11, 2026
4 checks passed
murchandamus pushed a commit to murchandamus/bips that referenced this pull request Feb 11, 2026
---------

Co-authored-by: Ethan Heilman <ethan.r.heilman@gmail.com>
Co-authored-by: Isabel Foxen Duke <isabelfoxenduke@users.noreply.github.com>

Review comments and assistance by:
  Armin Sabouri <armins88@gmail.com>
  D++ <82842780+dplusplus1024@users.noreply.github.com>
  Jameson Lopp <jameson.lopp@gmail.com>
  jbride <jbride2001@yahoo.com>
  Joey Yandle <xoloki@gmail.com>
  Jon Atack <jon@atack.com>
  Jonas Nick <jonasd.nick@gmail.com>
  Kyle Crews <kylecrews@Kyles-Mac-Studio.local>
  Mark "Murch" Erhardt <murch@murch.one>
  notmike-5 <notmike-5@users.noreply.github.com>
  Vojtěch Strnad <43024885+vostrnad@users.noreply.github.com>
murchandamus pushed a commit to murchandamus/bips that referenced this pull request Feb 11, 2026
Review comments and assistance by:
  Armin Sabouri <armins88@gmail.com>
  D++ <82842780+dplusplus1024@users.noreply.github.com>
  Jameson Lopp <jameson.lopp@gmail.com>
  jbride <jbride2001@yahoo.com>
  Joey Yandle <xoloki@gmail.com>
  Jon Atack <jon@atack.com>
  Jonas Nick <jonasd.nick@gmail.com>
  Kyle Crews <kylecrews@Kyles-Mac-Studio.local>
  Mark "Murch" Erhardt <murch@murch.one>
  notmike-5 <notmike-5@users.noreply.github.com>
  Vojtěch Strnad <43024885+vostrnad@users.noreply.github.com>

Co-authored-by: Ethan Heilman <ethan.r.heilman@gmail.com>
Co-authored-by: Isabel Foxen Duke <110147802+Isabelfoxenduke@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.