mirror of
https://github.com/bitcoin/bips.git
synced 2026-07-06 17:46:00 +00:00
326 lines
16 KiB
JSON
326 lines
16 KiB
JSON
{
|
|
"comment": "BIP-110 (REDUCED_DATA) consensus test vectors, generated and verified against the reference implementation. Each vector gives the spent output(s), the spending/creating transaction, and whether a block containing it is valid while REDUCED_DATA is active. 'rule' refers to the numbered rules in the BIP Specification. Hex values are byte arrays. 'reject_reason' is informational and normalized to be implementation-agnostic.",
|
|
"vectors": [
|
|
{
|
|
"rule": 1,
|
|
"name": "spk_p2wsh_34_valid",
|
|
"description": "Create a 34-byte P2WSH output (boundary)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000001",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "00204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101010000000000000000000000000000000000000000000000000000000000001100000000000000000001b8820100000000002200204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc3326001015100000000",
|
|
"expected": "valid",
|
|
"reject_reason": null
|
|
},
|
|
{
|
|
"rule": 1,
|
|
"name": "opreturn_83_valid",
|
|
"description": "Create an 83-byte OP_RETURN output (boundary)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000002",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "00204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101020000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000536a4c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001015100000000",
|
|
"expected": "valid",
|
|
"reject_reason": null
|
|
},
|
|
{
|
|
"rule": 1,
|
|
"name": "spk_35_nonopreturn_invalid",
|
|
"description": "Create a 35-byte non-OP_RETURN output (>34)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000003",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "00204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101030000000000000000000000000000000000000000000000000000000000001100000000000000000001b88201000000000023510000000000000000000000000000000000000000000000000000000000000000000001015100000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "bad-txns-vout-script-toolarge"
|
|
},
|
|
{
|
|
"rule": 1,
|
|
"name": "opreturn_84_invalid",
|
|
"description": "Create an 84-byte OP_RETURN output (>83)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000004",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "00204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101040000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000546a4c5100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001015100000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "bad-txns-vout-script-toolarge"
|
|
},
|
|
{
|
|
"rule": 2,
|
|
"name": "witness_item_256_valid",
|
|
"description": "Spend with a 256-byte witness item (boundary)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000005",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "002033198a9bfef674ebddb9ffaa52928017b8472791e54c609cb95f278ac6b1e349",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101050000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000015102fd00014242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424202755100000000",
|
|
"expected": "valid",
|
|
"reject_reason": null
|
|
},
|
|
{
|
|
"rule": 2,
|
|
"name": "witness_item_257_invalid",
|
|
"description": "Spend with a 257-byte witness item (>256)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000006",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "002033198a9bfef674ebddb9ffaa52928017b8472791e54c609cb95f278ac6b1e349",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101060000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000015102fd0101424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424202755100000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "script-verify-flag-failed (Push value size limit exceeded)"
|
|
},
|
|
{
|
|
"rule": 3,
|
|
"name": "spend_witness_v2_invalid",
|
|
"description": "Spend an undefined witness v2 output",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000007",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "52204242424242424242424242424242424242424242424242424242424242424242",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101070000000000000000000000000000000000000000000000000000000000001100000000000000000001b8820100000000000151010000000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "script-verify-flag-failed (Witness version reserved for soft-fork upgrades)"
|
|
},
|
|
{
|
|
"rule": 3,
|
|
"name": "spend_tapleaf_v0xc2_invalid",
|
|
"description": "Spend an undefined (0xc2) Tapleaf version",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000008",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "5120c0a7172b356abde7777c6eb0c55064226088bfc3468e9f2870aae0a1ff6432ee",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101080000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000015102015121c2f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f900000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "script-verify-flag-failed (Taproot version reserved for soft-fork upgrades)"
|
|
},
|
|
{
|
|
"rule": 4,
|
|
"name": "taproot_annex_invalid",
|
|
"description": "Spend a taproot script path with an annex",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000009",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "5120c45cdd4e172fd7224c8b9cccceea1500216f67139c6e28775a32522f3d8c12d6",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101090000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000015103015121c1f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f90b500000000000000000000000000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "script-verify-flag-failed (Push value size limit exceeded)"
|
|
},
|
|
{
|
|
"rule": 5,
|
|
"name": "control_block_257_valid",
|
|
"description": "Spend a leaf at depth 7 (257-byte control block, boundary)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "110000000000000000000000000000000000000000000000000000000000000a",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "5120a1170fa84d302d475a11b32bbfa38ea9ae7085d301539c1b7a90be9934551d3b",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "020000000001010a0000000000000000000000000000000000000000000000000000000000001100000000000000000001b8820100000000000151020151fd0101c1f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9808080808080808080808080808080808080808080808080808080808080808081818181818181818181818181818181818181818181818181818181818181818282828282828282828282828282828282828282828282828282828282828282838383838383838383838383838383838383838383838383838383838383838384848484848484848484848484848484848484848484848484848484848484848585858585858585858585858585858585858585858585858585858585858585868686868686868686868686868686868686868686868686868686868686868600000000",
|
|
"expected": "valid",
|
|
"reject_reason": null
|
|
},
|
|
{
|
|
"rule": 5,
|
|
"name": "control_block_289_invalid",
|
|
"description": "Spend a leaf at depth 8 (289-byte control block, >257)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "110000000000000000000000000000000000000000000000000000000000000b",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "51205620d1afc09839bda01ad3cda772c25db3917ca7364b9a8d0554786af71d7a79",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "020000000001010b0000000000000000000000000000000000000000000000000000000000001100000000000000000001b8820100000000000151020151fd2101c1f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f98080808080808080808080808080808080808080808080808080808080808080818181818181818181818181818181818181818181818181818181818181818182828282828282828282828282828282828282828282828282828282828282828383838383838383838383838383838383838383838383838383838383838383848484848484848484848484848484848484848484848484848484848484848485858585858585858585858585858585858585858585858585858585858585858686868686868686868686868686868686868686868686868686868686868686878787878787878787878787878787878787878787878787878787878787878700000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "script-verify-flag-failed (Invalid Taproot control block size)"
|
|
},
|
|
{
|
|
"rule": 6,
|
|
"name": "op_success_invalid",
|
|
"description": "Spend a tapscript containing OP_SUCCESS254 (0xfe)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "110000000000000000000000000000000000000000000000000000000000000c",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "512007b2f589f96cc9316ba65294a1f18aa7b057945894767f3bed0c44cf0ab8686f",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "020000000001010c0000000000000000000000000000000000000000000000000000000000001100000000000000000001b88201000000000001510201fe21c0f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f900000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "script-verify-flag-failed (OP_SUCCESSx reserved for soft-fork upgrades)"
|
|
},
|
|
{
|
|
"rule": 7,
|
|
"name": "tapscript_op_if_invalid",
|
|
"description": "Spend a tapscript executing OP_IF",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "110000000000000000000000000000000000000000000000000000000000000d",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "5120e73b13739e3c9cc5a3f3147ed8baeda794fe388372fb2c1e9115990e8381b1c6",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "020000000001010d0000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000015102045163516821c0f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f900000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "script-verify-flag-failed (OP_IF/NOTIF argument must be minimal in tapscript)"
|
|
},
|
|
{
|
|
"rule": 7,
|
|
"name": "witness_v0_op_if_valid",
|
|
"description": "OP_IF in a witness v0 script is valid (rule is tapscript-only)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "post-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "110000000000000000000000000000000000000000000000000000000000000e",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "0020d7b825146d3d522e489fa9eea62fe3158d776e7fa72f49cf7fd95710cb9fc82f",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "020000000001010e0000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000015101045163516800000000",
|
|
"expected": "valid",
|
|
"reject_reason": null
|
|
},
|
|
{
|
|
"rule": 2,
|
|
"name": "grandfathered_witness_item_257_valid",
|
|
"description": "Spend a PRE-activation UTXO with a 257-byte witness item (grandfathered, exempt)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "pre-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "110000000000000000000000000000000000000000000000000000000000000f",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "002033198a9bfef674ebddb9ffaa52928017b8472791e54c609cb95f278ac6b1e349",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "020000000001010f0000000000000000000000000000000000000000000000000000000000001100000000000000000001b882010000000000015102fd0101424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424202755100000000",
|
|
"expected": "valid",
|
|
"reject_reason": null
|
|
},
|
|
{
|
|
"rule": 1,
|
|
"name": "grandfathered_input_oversized_output_invalid",
|
|
"description": "Spend a PRE-activation UTXO but create a 35-byte output (rule 1 not grandfathered)",
|
|
"reduced_data_active": true,
|
|
"spent_utxo": "pre-activation",
|
|
"spent_outputs": [
|
|
{
|
|
"prevout": {
|
|
"txid": "1100000000000000000000000000000000000000000000000000000000000010",
|
|
"vout": 0
|
|
},
|
|
"scriptPubKey": "00204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
|
|
"amount": 100000
|
|
}
|
|
],
|
|
"tx": "02000000000101100000000000000000000000000000000000000000000000000000000000001100000000000000000001b88201000000000023510000000000000000000000000000000000000000000000000000000000000000000001015100000000",
|
|
"expected": "invalid",
|
|
"reject_reason": "bad-txns-vout-script-toolarge"
|
|
}
|
|
]
|
|
}
|