What
This PR adds draft BIP360 P2MR support wiring across script validation, policy, type solving/signing, RPC decoding, wallet integration, and test coverage.
Main changes:
- script interpreter:
- add witness v2 P2MR validation path
- verify P2MR commitment using P2MR control-block semantics
- standardness/policy:
- add P2MR-related standardness checks in mempool policy paths
- script type plumbing:
- add
TxoutType::WITNESS_V2_P2MR - update solver/sign/address/rpc/wallet paths for the new type
- add
- tests:
- add functional test
test/functional/feature_p2mr.py - register it in
test/functional/test_runner.py - update related unit tests
- add functional test
Why
BIP360 P2MR introduces a witness v2 pattern that needs coherent handling across interpreter, policy, and supporting infrastructure. This change set wires those components together and adds coverage for acceptance/rejection behavior.
Scope / Non-goals
- This PR does not claim broad "quantum-safe" guarantees.
- It focuses on implementing and testing P2MR handling in Core’s current validation/policy/test framework.
Test coverage
Executed locally:
ctest --output-on-failure -j6build/test/functional/test_runner.py feature_p2mr.py feature_taproot.py mempool_accept.py mempool_packages.py mempool_package_limits.py.venv-functional/bin/python build/test/functional/test_runner.py --extended --jobs=6.venv-functional/bin/python build/test/functional/test_runner.py tool_bench_sanity_check.py tool_bitcoin_chainstate.py.venv-functional/bin/python build/test/functional/test_runner.py wallet_backwards_compatibility.py wallet_migration.py mempool_compatibility.py feature_coinstatsindex_compatibility.py feature_unsupported_utxo_db.py