1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-07-27 18:13:38 +00:00

bip-0360: added python reference example; test vector fixes

This commit adds a python reference example for construction of BIP-360 outputs and control blocks.
This commit also updates the test vectors.
This commit is contained in:
notmike
2026-06-26 13:14:27 -06:00
parent 8d28eb4517
commit 29e1a158e7
2 changed files with 431 additions and 6 deletions

View File

@@ -2,8 +2,8 @@
"version": 1,
"test_vectors": [
{
"id": "p2tr_using_v2_witness_version_error",
"objective": "Tests that a P2TR v2 scriptPubKey fails with use of witness version 2",
"id": "p2mr_misuse_v2_witness_version_with_pubkey_error",
"objective": "Tests that P2MR fails with use of internal_pubkey",
"given": {
"internalPubkey": "d6889cb081036e0faefa3a35157ad71086b123b2b144b649798b494c300a961d",
"scriptTree": null
@@ -15,12 +15,12 @@
},
"expected": {
"scriptPubKey": "522053a1f6e454df1aa2776a2814a721372d6258050de330b3c6d10ee8f4e0dda343",
"error": "P2TR requires witness version of 1"
"error": "P2MR does not support internal pubkeys"
}
},
{
"id": "p2mr_missing_leaf_script_tree_error",
"objective": "Tests P2MR with missing leaf script tree",
"objective": "Tests P2MR with null or missing script tree",
"given": {
"script_tree": ""
},
@@ -168,7 +168,6 @@
"id": "p2mr_three_leaf_complex",
"objective": "Tests P2MR with a complex three-leaf script tree structure, demonstrating nested script paths and multiple verification options",
"given": {
"internalPubkey": "e0dfe2300b0dd746a3f8674dfd4525623639042569d829c7f0eed9602d263e6f",
"scriptTree": [
{
"id": 0,
@@ -214,7 +213,6 @@
"id": "p2mr_three_leaf_alternative",
"objective": "Tests another variant of P2MR with three leaves arranged in a different tree structure, showing alternative script path spending options",
"given": {
"internalPubkey": "55adf4e8967fbd2e29f20ac896e60c3b0f1d5b0efa9d34941b5958c7b0a0312d",
"scriptTree": [
{
"id": 0,