Jul 28 - Aug 1, 2026
This initiative aimed to evaluate its practicality against existing structures like BIPs 341/342 and resulted in successful validation with all official construction vectors passing. The endeavor revealed several technical issues requiring attention, notably in the ordering and validation of leaf hashes which affected tree depth representation. These findings led to proposed fixes to maintain the protocol's integrity.
The coding efforts for this project are available for review on GitHub at jeanpablojp/bitcoin, branch p2mr-regtest, with comprehensive documentation of the notes and findings accessible at jeanpablojp/bitcoin-p2mr. The implementation itself introduced minimal consensus changes, adding about 96 lines to the consensus-related code and slightly more extensive modifications across policy flags, address recognition, and testing scripts. It utilizes much of the tapscript execution paths and modifies only commitment checks, positioning it as a lightweight addition to the blockchain’s operational rules.
Further scrutiny during the implementation phase indicated that simply patching the script interpreter was inadequate for correct functionality. Modifications were necessary within PrecomputedTransactionData::Init() to properly recognize witness v2 programs, a crucial element for validating real transactions. Additionally, a comparative analysis between P2MR and equivalent Taproot script paths showed potential modest reductions in space requirements, although the savings varied.
Feedback from the community has been instrumental in refining the specification, suggesting enhancements such as clearer documentation of the control byte and single-leaf vector, along with the introduction of spend-path vectors for thorough testing. These adjustments aim to improve the user experience and provide clear guidelines for future implementations.
Recent updates include the merging of pqc vector fixes at bitcoin/bips2220, which resolved KnownVectorBug exceptions and ensured that all 16 construction vectors now pass without issues. Additionally, the spend-path vectors discussed have been submitted as a PR at bitcoin/bips2232, following the schema of BIP 341’s wallet-test-vectors.json. This includes one six-input transaction for valid cases and nine invalid transactions for failure paths, all generated from this branch and cross-checked against the published construction vectors. This ongoing development and peer review process reflects a committed effort to enhance Bitcoin’s scripting capabilities while fostering community engagement and oversight.
TLDR
We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project.
Give Feedback