dcrd/txscript/data/script_valid.json
Dave Collins d8306ee602
txscript: Significantly improve errors.
This converts the majority of script errors from generic errors created
via errors.New and fmt.Errorf to use a concrete type that implements the
error interface with an error code and description.

This allows callers to programmatically detect the type of error via
type assertions and an error code while still allowing the errors to
provide more context.

For example, instead of just having an error the reads "disabled opcode"
as would happen prior to these changes when a disabled opcode is
encountered, the error will now read "attempt to execute disabled opcode
OP_FOO".

While it was previously possible to programmatically detect many errors
due to them being exported, they provided no additional context and
there were also various instances that were just returning errors
created on the spot which callers could not reliably detect without
resorting to looking at the actual error message, which is nearly always
bad practice.

Also, while here, export the MaxStackSize and MaxScriptSize constants
since they can be useful for consumers of the package and perform some
minor cleanup of some of the tests.
2018-07-01 15:04:59 -05:00

1119 lines
71 KiB
JSON

[
["Format is: [scriptSig, scriptPubKey, flags, ... comments]"],
["It is evaluated as if there was a crediting coinbase transaction with two 0"],
["pushes as scriptSig, and one output of 0 atoms and given scriptPubKey,"],
["followed by a spending transaction which spends this output as only input (and"],
["correct prevout hash), using the given scriptSig. All nLockTimes are 0, all"],
["nSequences are max."],
["", "DEPTH 0 EQUAL", "P2SH", "Test the test: we should have an empty stack after scriptSig evaluation"],
[" ", "DEPTH 0 EQUAL", "P2SH", "and multiple spaces should not change that."],
[" ", "DEPTH 0 EQUAL", "P2SH"],
[" ", "DEPTH 0 EQUAL", "P2SH"],
["1 2", "2 EQUALVERIFY 1 EQUAL", "P2SH", "Similarly whitespace around and between symbols"],
["1 2", "2 EQUALVERIFY 1 EQUAL", "P2SH"],
[" 1 2", "2 EQUALVERIFY 1 EQUAL", "P2SH"],
["1 2 ", "2 EQUALVERIFY 1 EQUAL", "P2SH"],
[" 1 2 ", "2 EQUALVERIFY 1 EQUAL", "P2SH"],
["1", "", "P2SH"],
["0x02 0x01 0x00", "", "P2SH", "all bytes are significant, not only the last one"],
["0x09 0x00000000 0x00000000 0x10", "", "P2SH", "equals zero when cast to Int64"],
["0x01 0x0b", "11 EQUAL", "P2SH", "push 1 byte"],
["0x02 0x417a", "'Az' EQUAL", "P2SH"],
["0x4b 0x417a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a",
"'Azzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' EQUAL", "P2SH", "push 75 bytes"],
["0x4c 0x01 0x07","7 EQUAL", "P2SH", "0x4c is OP_PUSHDATA1"],
["0x4d 0x0100 0x08","8 EQUAL", "P2SH", "0x4d is OP_PUSHDATA2"],
["0x4e 0x01000000 0x09","9 EQUAL", "P2SH", "0x4e is OP_PUSHDATA4"],
["Cat related test coverage"],
["'a' 'b'", "CAT 'ab' EQUAL", "P2SH", "CAT concatenates two input args"],
["'a' 2147483648", "CAT 0x06 0x610000008000 EQUAL", "P2SH", "CAT must treat arguments as bytes as opposed to numeric"],
["'' ''", "CAT '' EQUAL", "P2SH", "CAT with two empty args must result in a single empty item on the stack"],
["'a' ''", "CAT 'a' EQUAL", "P2SH", "CAT with empty right-hand side must return left-hand side"],
["'' 'b'", "CAT 'b' EQUAL", "P2SH", "CAT with empty left-hand side must return right-hand side"],
["'a' 'b' 1", "IF CAT ELSE 1 ENDIF 'ab' EQUAL", "P2SH", "CAT works in a conditional branch"],
["'a' 'b' 0", "IF CAT ELSE 2DROP 1 ENDIF 1 EQUAL", "P2SH", "CAT must not modify the stack if in an unexecuted branch"],
["Substring related test coverage"],
["'abcd' 1 0", "SUBSTR 'a' EQUAL", "P2SH", "SUBSTR uses 0-based indices"],
["'abcd' 3 1", "SUBSTR 'bc' EQUAL", "P2SH", "SUBSTR end index is exclusive"],
["'abcd' 1 1", "SUBSTR NOT", "P2SH", "SUBSTR same index must produce empty byte push which is equivalent to FALSE"],
["'abcd' 4 4", "SUBSTR '' EQUAL", "P2SH", "SUBSTR start and end index at exact length produces empty byte push"],
["'abcd' 2 1 1", "IF SUBSTR ELSE 0 ENDIF 'b' EQUAL", "P2SH", "SUBSTR works in a conditional branch"],
["'abcd' 1 1 0", "IF SUBSTR ELSE 1 ENDIF", "P2SH", "SUBSTR must not modify the stack if in an unexecuted branch"],
["'' 2147483647 2147483646", "SUBSTR '' EQUAL", "P2SH", "SUBSTR of an empty string produces an empty byte push regardless of out of bounds indices <=4 bytes"],
["'abcd' 3 3 1SUB", "SUBSTR 'c' EQUAL", "P2SH", "SUBSTR start index must work with the result of math operations"],
["'abcd' 4 1 SUB 2", "SUBSTR 'c' EQUAL", "P2SH", "SUBSTR end index must work with the result of math operations"],
["Left substring related test coverage"],
["'abcd' 0", "LEFT NOT", "P2SH", "LEFT index of zero must produce empty byte push which is equivalent to FALSE"],
["'abcd' 1", "LEFT 'a' EQUAL", "P2SH", "LEFT uses 0-based end index"],
["'abcd' 4", "LEFT 'abcd' EQUAL", "P2SH", "LEFT produces entire string when end index equals string length"],
["'abcd' 2 1", "IF LEFT ELSE 0 ENDIF 'ab' EQUAL", "P2SH", "LEFT works in a conditional branch"],
["'abcd' 0 0", "IF LEFT ELSE 1 ENDIF", "P2SH", "LEFT must not modify the stack if in an unexecuted branch"],
["'' 2147483647", "LEFT '' EQUAL", "P2SH", "LEFT of an empty string produces an empty byte push regardless of out of bounds index <=4 bytes"],
["Right substring related test coverage"],
["'abcd' 4", "RIGHT NOT", "P2SH", "RIGHT index equal to length must produce empty byte push which is equivalent to FALSE"],
["'abcd' 3", "RIGHT 'd' EQUAL", "P2SH", "RIGHT uses 0-based start index"],
["'abcd' 0", "RIGHT 'abcd' EQUAL", "P2SH", "RIGHT produces entire string when start index is zero"],
["'abcd' 2 1", "IF RIGHT ELSE 0 ENDIF 'cd' EQUAL", "P2SH", "RIGHT works in a conditional branch"],
["'abcd' 4 0", "IF RIGHT ELSE 1 ENDIF", "P2SH", "RIGHT must not modify the stack if in an unexecuted branch"],
["'' 2147483647", "RIGHT '' EQUAL", "P2SH", "RIGHT of an empty string produces an empty byte push regardless of out of bounds index <=4 bytes"],
["Right bit rotation related test coverage"],
["-2147483647 1", "ROTR -1073741824 EQUAL", "P2SH", "ROTR 0x80000001 >>> 1"],
["-2147483647 2", "ROTR 1610612736 EQUAL", "P2SH", "ROTR 0x80000001 >>> 2"],
["-2147483647 3", "ROTR 805306368 EQUAL", "P2SH", "ROTR 0x80000001 >>> 3"],
["-2147483647 4", "ROTR 402653184 EQUAL", "P2SH", "ROTR 0x80000001 >>> 4"],
["-2147483647 5", "ROTR 201326592 EQUAL", "P2SH", "ROTR 0x80000001 >>> 5"],
["-2147483647 6", "ROTR 100663296 EQUAL", "P2SH", "ROTR 0x80000001 >>> 6"],
["-2147483647 7", "ROTR 50331648 EQUAL", "P2SH", "ROTR 0x80000001 >>> 7"],
["-2147483647 8", "ROTR 25165824 EQUAL", "P2SH", "ROTR 0x80000001 >>> 8"],
["-2147483647 9", "ROTR 12582912 EQUAL", "P2SH", "ROTR 0x80000001 >>> 9"],
["-2147483647 10", "ROTR 6291456 EQUAL", "P2SH", "ROTR 0x80000001 >>> 10"],
["-2147483647 11", "ROTR 3145728 EQUAL", "P2SH", "ROTR 0x80000001 >>> 11"],
["-2147483647 12", "ROTR 1572864 EQUAL", "P2SH", "ROTR 0x80000001 >>> 12"],
["-2147483647 13", "ROTR 786432 EQUAL", "P2SH", "ROTR 0x80000001 >>> 13"],
["-2147483647 14", "ROTR 393216 EQUAL", "P2SH", "ROTR 0x80000001 >>> 14"],
["-2147483647 15", "ROTR 196608 EQUAL", "P2SH", "ROTR 0x80000001 >>> 15"],
["-2147483647 16", "ROTR 98304 EQUAL", "P2SH", "ROTR 0x80000001 >>> 16"],
["-2147483647 17", "ROTR 49152 EQUAL", "P2SH", "ROTR 0x80000001 >>> 17"],
["-2147483647 18", "ROTR 24576 EQUAL", "P2SH", "ROTR 0x80000001 >>> 18"],
["-2147483647 19", "ROTR 12288 EQUAL", "P2SH", "ROTR 0x80000001 >>> 19"],
["-2147483647 20", "ROTR 6144 EQUAL", "P2SH", "ROTR 0x80000001 >>> 20"],
["-2147483647 21", "ROTR 3072 EQUAL", "P2SH", "ROTR 0x80000001 >>> 21"],
["-2147483647 22", "ROTR 1536 EQUAL", "P2SH", "ROTR 0x80000001 >>> 22"],
["-2147483647 23", "ROTR 768 EQUAL", "P2SH", "ROTR 0x80000001 >>> 23"],
["-2147483647 24", "ROTR 384 EQUAL", "P2SH", "ROTR 0x80000001 >>> 24"],
["-2147483647 25", "ROTR 192 EQUAL", "P2SH", "ROTR 0x80000001 >>> 25"],
["-2147483647 26", "ROTR 96 EQUAL", "P2SH", "ROTR 0x80000001 >>> 26"],
["-2147483647 27", "ROTR 48 EQUAL", "P2SH", "ROTR 0x80000001 >>> 27"],
["-2147483647 28", "ROTR 24 EQUAL", "P2SH", "ROTR 0x80000001 >>> 28"],
["-2147483647 29", "ROTR 12 EQUAL", "P2SH", "ROTR 0x80000001 >>> 29"],
["-2147483647 30", "ROTR 6 EQUAL", "P2SH", "ROTR 0x80000001 >>> 30"],
["-2147483647 31", "ROTR 3 EQUAL", "P2SH", "ROTR 0x80000001 >>> 31"],
["-1431655766 1", "ROTR 1431655765 EQUAL", "P2SH", "ROTR 0xaaaaaaaa >>> 1"],
["1431655765 1", "ROTR -1431655766 EQUAL", "P2SH", "ROTR 0x55555555 >>> 1"],
["1 1", "ROTR -2147483648 EQUAL", "P2SH", "ROTR must be able to produce a 5-byte result (0x1 >>> 1)"],
["Left bit rotation related test coverage"],
["-2147483647 1", "ROTL 3 EQUAL", "P2SH", "ROTL 0x80000001 <<< 1"],
["-2147483647 2", "ROTL 6 EQUAL", "P2SH", "ROTL 0x80000001 <<< 2"],
["-2147483647 3", "ROTL 12 EQUAL", "P2SH", "ROTL 0x80000001 <<< 3"],
["-2147483647 4", "ROTL 24 EQUAL", "P2SH", "ROTL 0x80000001 <<< 4"],
["-2147483647 5", "ROTL 48 EQUAL", "P2SH", "ROTL 0x80000001 <<< 5"],
["-2147483647 6", "ROTL 96 EQUAL", "P2SH", "ROTL 0x80000001 <<< 6"],
["-2147483647 7", "ROTL 192 EQUAL", "P2SH", "ROTL 0x80000001 <<< 7"],
["-2147483647 8", "ROTL 384 EQUAL", "P2SH", "ROTL 0x80000001 <<< 8"],
["-2147483647 9", "ROTL 768 EQUAL", "P2SH", "ROTL 0x80000001 <<< 9"],
["-2147483647 10", "ROTL 1536 EQUAL", "P2SH", "ROTL 0x80000001 <<< 10"],
["-2147483647 11", "ROTL 3072 EQUAL", "P2SH", "ROTL 0x80000001 <<< 11"],
["-2147483647 12", "ROTL 6144 EQUAL", "P2SH", "ROTL 0x80000001 <<< 12"],
["-2147483647 13", "ROTL 12288 EQUAL", "P2SH", "ROTL 0x80000001 <<< 13"],
["-2147483647 14", "ROTL 24576 EQUAL", "P2SH", "ROTL 0x80000001 <<< 14"],
["-2147483647 15", "ROTL 49152 EQUAL", "P2SH", "ROTL 0x80000001 <<< 15"],
["-2147483647 16", "ROTL 98304 EQUAL", "P2SH", "ROTL 0x80000001 <<< 16"],
["-2147483647 17", "ROTL 196608 EQUAL", "P2SH", "ROTL 0x80000001 <<< 17"],
["-2147483647 18", "ROTL 393216 EQUAL", "P2SH", "ROTL 0x80000001 <<< 18"],
["-2147483647 19", "ROTL 786432 EQUAL", "P2SH", "ROTL 0x80000001 <<< 19"],
["-2147483647 20", "ROTL 1572864 EQUAL", "P2SH", "ROTL 0x80000001 <<< 20"],
["-2147483647 21", "ROTL 3145728 EQUAL", "P2SH", "ROTL 0x80000001 <<< 21"],
["-2147483647 22", "ROTL 6291456 EQUAL", "P2SH", "ROTL 0x80000001 <<< 22"],
["-2147483647 23", "ROTL 12582912 EQUAL", "P2SH", "ROTL 0x80000001 <<< 23"],
["-2147483647 24", "ROTL 25165824 EQUAL", "P2SH", "ROTL 0x80000001 <<< 24"],
["-2147483647 25", "ROTL 50331648 EQUAL", "P2SH", "ROTL 0x80000001 <<< 25"],
["-2147483647 26", "ROTL 100663296 EQUAL", "P2SH", "ROTL 0x80000001 <<< 26"],
["-2147483647 27", "ROTL 201326592 EQUAL", "P2SH", "ROTL 0x80000001 <<< 27"],
["-2147483647 28", "ROTL 402653184 EQUAL", "P2SH", "ROTL 0x80000001 <<< 28"],
["-2147483647 29", "ROTL 805306368 EQUAL", "P2SH", "ROTL 0x80000001 <<< 29"],
["-2147483647 30", "ROTL 1610612736 EQUAL", "P2SH", "ROTL 0x80000001 <<< 30"],
["-2147483647 31", "ROTL -1073741824 EQUAL", "P2SH", "ROTL 0x80000001 <<< 31"],
["-1431655766 1", "ROTL 1431655765 EQUAL", "P2SH", "ROTL 0xaaaaaaaa <<< 1"],
["1431655765 1", "ROTL -1431655766 EQUAL", "P2SH", "ROTL 0x55555555 <<< 1"],
["1 31", "ROTL -2147483648 EQUAL", "P2SH", "ROTL must be able to produce a 5-byte result (0x1 <<< 31)"],
["1 2 0 IF AND ELSE 1 ENDIF", "NOP", "P2SH"],
["1 2 0 IF OR ELSE 1 ENDIF", "NOP", "P2SH"],
["1 2 0 IF XOR ELSE 1 ENDIF", "NOP", "P2SH"],
["2 0 IF 2MUL ELSE 1 ENDIF", "NOP", "P2SH"],
["2 0 IF 2DIV ELSE 1 ENDIF", "NOP", "P2SH"],
["2 2 0 IF MUL ELSE 1 ENDIF", "NOP", "P2SH"],
["2 2 0 IF DIV ELSE 1 ENDIF", "NOP", "P2SH"],
["2 2 0 IF MOD ELSE 1 ENDIF", "NOP", "P2SH"],
["2 2 0 IF LSHIFT ELSE 1 ENDIF", "NOP", "P2SH"],
["2 2 0 IF RSHIFT ELSE 1 ENDIF", "NOP", "P2SH"],
["2 DUP MUL", "4 EQUAL", "P2SH"],
["Division related test coverage"],
["7 3", "DIV 2 EQUAL", "", "DIV must perform integer division (7 / 3)"],
["8 3", "DIV 2 EQUAL", "", "DIV must perform integer division (8 / 3)"],
["6 3", "DIV 2 EQUAL", "", "DIV must support a positive dividend and divisor"],
["-6 3", "DIV -2 EQUAL", "", "DIV must support a negative dividend with positive divisor"],
["6 -3", "DIV -2 EQUAL", "", "DIV must support a positive dividend with negative divisor"],
["-6 -3", "DIV 2 EQUAL", "", "DIV must support a negative dividend and divisor"],
["-2147483647 DUP", "DIV 1 EQUAL", "", "DIV must support 4-byte negative int32"],
["2 DUP DIV", "1 EQUAL", "P2SH"],
["Modular division related test coverage"],
["7 3", "MOD 1 EQUAL", "", "MOD must produce expected result (7%3)"],
["8 3", "MOD 2 EQUAL", "", "MOD must produce expected result (8%3)"],
["6 3", "MOD 0 EQUAL", "", "MOD must support a positive dividend and divisor"],
["-7 3", "MOD -1 EQUAL", "", "MOD must support a negative dividend with positive divisor with negative result"],
["7 -3", "MOD 1 EQUAL", "", "MOD must support a positive dividend with negative divisor with positve result"],
["-7 -3", "MOD -1 EQUAL", "", "MOD must support a negative dividend and divisor with negative result"],
["-2147483647 1073741823", "MOD -1 EQUAL", "", "MOD must support 4-byte negative int32"],
["Left bit shift related test coverage"],
["1 1", "LSHIFT 2 EQUAL", "P2SH", "LSHIFT 0x1 << 1"],
["1 2", "LSHIFT 4 EQUAL", "P2SH", "LSHIFT 0x1 << 2"],
["1 3", "LSHIFT 8 EQUAL", "P2SH", "LSHIFT 0x1 << 3"],
["1 4", "LSHIFT 16 EQUAL", "P2SH", "LSHIFT 0x1 << 4"],
["1 5", "LSHIFT 32 EQUAL", "P2SH", "LSHIFT 0x1 << 5"],
["1 6", "LSHIFT 64 EQUAL", "P2SH", "LSHIFT 0x1 << 6"],
["1 7", "LSHIFT 128 EQUAL", "P2SH", "LSHIFT 0x1 << 7"],
["1 8", "LSHIFT 256 EQUAL", "P2SH", "LSHIFT 0x1 << 8"],
["1 9", "LSHIFT 512 EQUAL", "P2SH", "LSHIFT 0x1 << 9"],
["1 10", "LSHIFT 1024 EQUAL", "P2SH", "LSHIFT 0x1 << 10"],
["1 11", "LSHIFT 2048 EQUAL", "P2SH", "LSHIFT 0x1 << 11"],
["1 12", "LSHIFT 4096 EQUAL", "P2SH", "LSHIFT 0x1 << 12"],
["1 13", "LSHIFT 8192 EQUAL", "P2SH", "LSHIFT 0x1 << 13"],
["1 14", "LSHIFT 16384 EQUAL", "P2SH", "LSHIFT 0x1 << 14"],
["1 15", "LSHIFT 32768 EQUAL", "P2SH", "LSHIFT 0x1 << 15"],
["1 16", "LSHIFT 65536 EQUAL", "P2SH", "LSHIFT 0x1 << 16"],
["1 17", "LSHIFT 131072 EQUAL", "P2SH", "LSHIFT 0x1 << 17"],
["1 18", "LSHIFT 262144 EQUAL", "P2SH", "LSHIFT 0x1 << 18"],
["1 19", "LSHIFT 524288 EQUAL", "P2SH", "LSHIFT 0x1 << 19"],
["1 20", "LSHIFT 1048576 EQUAL", "P2SH", "LSHIFT 0x1 << 20"],
["1 21", "LSHIFT 2097152 EQUAL", "P2SH", "LSHIFT 0x1 << 21"],
["1 22", "LSHIFT 4194304 EQUAL", "P2SH", "LSHIFT 0x1 << 22"],
["1 23", "LSHIFT 8388608 EQUAL", "P2SH", "LSHIFT 0x1 << 23"],
["1 24", "LSHIFT 16777216 EQUAL", "P2SH", "LSHIFT 0x1 << 24"],
["1 25", "LSHIFT 33554432 EQUAL", "P2SH", "LSHIFT 0x1 << 25"],
["1 26", "LSHIFT 67108864 EQUAL", "P2SH", "LSHIFT 0x1 << 26"],
["1 27", "LSHIFT 134217728 EQUAL", "P2SH", "LSHIFT 0x1 << 27"],
["1 28", "LSHIFT 268435456 EQUAL", "P2SH", "LSHIFT 0x1 << 28"],
["1 29", "LSHIFT 536870912 EQUAL", "P2SH", "LSHIFT 0x1 << 29"],
["1 30", "LSHIFT 1073741824 EQUAL", "P2SH", "LSHIFT 0x1 << 30"],
["1 31", "LSHIFT -2147483648 EQUAL", "P2SH", "LSHIFT must be able to produce a 5-byte result (0x1 << 31)"],
["1 32", "LSHIFT 0 EQUAL", "P2SH", "LSHIFT 0x1 << 32"],
["-1431655766 1", "LSHIFT 1431655764 EQUAL", "P2SH", "LSHIFT 0xaaaaaaaa << 1"],
["1431655765 1", "LSHIFT -1431655766 EQUAL", "P2SH", "LSHIFT 0x55555555 << 1"],
["Right bit shift related test coverage"],
["1073741825 1", "RSHIFT 536870912 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 1"],
["1073741825 2", "RSHIFT 268435456 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 2"],
["1073741825 3", "RSHIFT 134217728 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 3"],
["1073741825 4", "RSHIFT 67108864 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 4"],
["1073741825 5", "RSHIFT 33554432 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 5"],
["1073741825 6", "RSHIFT 16777216 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 6"],
["1073741825 7", "RSHIFT 8388608 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 7"],
["1073741825 8", "RSHIFT 4194304 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 8"],
["1073741825 9", "RSHIFT 2097152 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 9"],
["1073741825 10", "RSHIFT 1048576 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 10"],
["1073741825 11", "RSHIFT 524288 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 11"],
["1073741825 12", "RSHIFT 262144 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 12"],
["1073741825 13", "RSHIFT 131072 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 13"],
["1073741825 14", "RSHIFT 65536 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 14"],
["1073741825 15", "RSHIFT 32768 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 15"],
["1073741825 16", "RSHIFT 16384 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 16"],
["1073741825 17", "RSHIFT 8192 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 17"],
["1073741825 18", "RSHIFT 4096 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 18"],
["1073741825 19", "RSHIFT 2048 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 19"],
["1073741825 20", "RSHIFT 1024 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 20"],
["1073741825 21", "RSHIFT 512 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 21"],
["1073741825 22", "RSHIFT 256 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 22"],
["1073741825 23", "RSHIFT 128 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 23"],
["1073741825 24", "RSHIFT 64 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 24"],
["1073741825 25", "RSHIFT 32 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 25"],
["1073741825 26", "RSHIFT 16 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 26"],
["1073741825 27", "RSHIFT 8 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 27"],
["1073741825 28", "RSHIFT 4 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 28"],
["1073741825 29", "RSHIFT 2 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 29"],
["1073741825 30", "RSHIFT 1 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 30"],
["1073741825 31", "RSHIFT 0 EQUAL", "P2SH", "RSHIFT 0x40000001 >> 31"],
["-1 1", "RSHIFT -1 EQUAL", "P2SH", "RSHIFT of negative number must shift 1s into the high bits (0xffffffff >> 1)"],
["-1 2", "RSHIFT -1 EQUAL", "P2SH", "RSHIFT of negative number must shift 1s into the high bits (0xffffffff >> 2)"],
["-1 3", "RSHIFT -1 EQUAL", "P2SH", "RSHIFT of negative number must shift 1s into the high bits (0xffffffff >> 3)"],
["-2147483647 1", "RSHIFT -1073741824 EQUAL", "P2SH", "RSHIFT of negative number must shift 1s into the high bits (0x80000001 >> 1)"],
["-2147483647 3", "RSHIFT -268435456 EQUAL", "P2SH", "RSHIFT of negative number must shift 1s into the high bits (0x80000001 >> 3)"],
["-1431655766 1", "RSHIFT -715827883 EQUAL", "P2SH", "RSHIFT of negative number must shit 1s into the high bits (0xaaaaaaaa >> 1)"],
["1431655765 1", "RSHIFT 715827882 EQUAL", "P2SH", "RSHIFT 0x55555555 >> 1"],
["0x4c 0x00","0 EQUAL", "P2SH"],
["0x4d 0x0000","0 EQUAL", "P2SH"],
["0x4e 0x00000000","0 EQUAL", "P2SH"],
["0x4f 1000 ADD","999 EQUAL", "P2SH"],
["0", "IF 0x50 ENDIF 1", "P2SH", "0x50 is reserved (ok if not executed)"],
["0x51", "0x5f ADD 0x60 EQUAL", "P2SH", "0x51 through 0x60 push 1 through 16 onto stack"],
["1","NOP", "P2SH"],
["0", "IF VER ELSE 1 ENDIF", "P2SH", "VER non-functional (ok if not executed)"],
["0", "IF RESERVED ELSE 1 ENDIF", "P2SH", "RESERVED ok in un-executed IF"],
["1", "DUP IF ENDIF", "P2SH"],
["1", "IF 1 ENDIF", "P2SH"],
["1", "DUP IF ELSE ENDIF", "P2SH"],
["1", "IF 1 ELSE ENDIF", "P2SH"],
["0", "IF ELSE 1 ENDIF", "P2SH"],
["1 1", "IF IF 1 ELSE 0 ENDIF ENDIF", "P2SH"],
["1 0", "IF IF 1 ELSE 0 ENDIF ENDIF", "P2SH"],
["1 1", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH"],
["0 0", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH"],
["1 0", "NOTIF IF 1 ELSE 0 ENDIF ENDIF", "P2SH"],
["1 1", "NOTIF IF 1 ELSE 0 ENDIF ENDIF", "P2SH"],
["1 0", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH"],
["0 1", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH"],
["0", "IF 0 ELSE 1 ELSE 0 ENDIF", "P2SH", "Multiple ELSE's are valid and executed inverts on each ELSE encountered"],
["1", "IF 1 ELSE 0 ELSE ENDIF", "P2SH"],
["1", "IF ELSE 0 ELSE 1 ENDIF", "P2SH"],
["1", "IF 1 ELSE 0 ELSE 1 ENDIF ADD 2 EQUAL", "P2SH"],
["'' 1", "IF SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ENDIF 0x14 0x68ca4fec736264c13b859bac43d5173df6871682 EQUAL", "P2SH"],
["1", "NOTIF 0 ELSE 1 ELSE 0 ENDIF", "P2SH", "Multiple ELSE's are valid and execution inverts on each ELSE encountered"],
["0", "NOTIF 1 ELSE 0 ELSE ENDIF", "P2SH"],
["0", "NOTIF ELSE 0 ELSE 1 ENDIF", "P2SH"],
["0", "NOTIF 1 ELSE 0 ELSE 1 ENDIF ADD 2 EQUAL", "P2SH"],
["'' 0", "NOTIF SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ENDIF 0x14 0x68ca4fec736264c13b859bac43d5173df6871682 EQUAL", "P2SH"],
["0", "IF 1 IF RETURN ELSE RETURN ELSE RETURN ENDIF ELSE 1 IF 1 ELSE RETURN ELSE 1 ENDIF ELSE RETURN ENDIF ADD 2 EQUAL", "P2SH", "Nested ELSE ELSE"],
["1", "NOTIF 0 NOTIF RETURN ELSE RETURN ELSE RETURN ENDIF ELSE 0 NOTIF 1 ELSE RETURN ELSE 1 ENDIF ELSE RETURN ENDIF ADD 2 EQUAL", "P2SH"],
["0", "IF RETURN ENDIF 1", "P2SH", "RETURN only works if executed"],
["1 1", "VERIFY", "P2SH"],
["1 0x05 0x01 0x00 0x00 0x00 0x00", "VERIFY", "P2SH", "values >4 bytes can be cast to boolean"],
["1 0x01 0x80", "IF 0 ENDIF", "P2SH", "negative 0 is false"],
["10 0 11 TOALTSTACK DROP FROMALTSTACK", "ADD 21 EQUAL", "P2SH"],
["'gavin_was_here' TOALTSTACK 11 FROMALTSTACK", "'gavin_was_here' EQUALVERIFY 11 EQUAL", "P2SH"],
["0 IFDUP", "DEPTH 1 EQUALVERIFY 0 EQUAL", "P2SH"],
["1 IFDUP", "DEPTH 2 EQUALVERIFY 1 EQUALVERIFY 1 EQUAL", "P2SH"],
["0x05 0x0100000000 IFDUP", "DEPTH 2 EQUALVERIFY 0x05 0x0100000000 EQUAL", "P2SH", "IFDUP dups non ints"],
["0 DROP", "DEPTH 0 EQUAL", "P2SH"],
["0", "DUP 1 ADD 1 EQUALVERIFY 0 EQUAL", "P2SH"],
["0 1", "NIP", "P2SH"],
["1 0", "OVER DEPTH 3 EQUALVERIFY", "P2SH"],
["22 21 20", "0 PICK 20 EQUALVERIFY DEPTH 3 EQUAL", "P2SH"],
["22 21 20", "1 PICK 21 EQUALVERIFY DEPTH 3 EQUAL", "P2SH"],
["22 21 20", "2 PICK 22 EQUALVERIFY DEPTH 3 EQUAL", "P2SH"],
["22 21 20", "0 ROLL 20 EQUALVERIFY DEPTH 2 EQUAL", "P2SH"],
["22 21 20", "1 ROLL 21 EQUALVERIFY DEPTH 2 EQUAL", "P2SH"],
["22 21 20", "2 ROLL 22 EQUALVERIFY DEPTH 2 EQUAL", "P2SH"],
["22 21 20", "ROT 22 EQUAL", "P2SH"],
["22 21 20", "ROT DROP 20 EQUAL", "P2SH"],
["22 21 20", "ROT DROP DROP 21 EQUAL", "P2SH"],
["22 21 20", "ROT ROT 21 EQUAL", "P2SH"],
["22 21 20", "ROT ROT ROT 20 EQUAL", "P2SH"],
["25 24 23 22 21 20", "2ROT 24 EQUAL", "P2SH"],
["25 24 23 22 21 20", "2ROT DROP 25 EQUAL", "P2SH"],
["25 24 23 22 21 20", "2ROT 2DROP 20 EQUAL", "P2SH"],
["25 24 23 22 21 20", "2ROT 2DROP DROP 21 EQUAL", "P2SH"],
["25 24 23 22 21 20", "2ROT 2DROP 2DROP 22 EQUAL", "P2SH"],
["25 24 23 22 21 20", "2ROT 2DROP 2DROP DROP 23 EQUAL", "P2SH"],
["25 24 23 22 21 20", "2ROT 2ROT 22 EQUAL", "P2SH"],
["25 24 23 22 21 20", "2ROT 2ROT 2ROT 20 EQUAL", "P2SH"],
["1 0", "SWAP 1 EQUALVERIFY 0 EQUAL", "P2SH"],
["0 1", "TUCK DEPTH 3 EQUALVERIFY SWAP 2DROP", "P2SH"],
["13 14", "2DUP ROT EQUALVERIFY EQUAL", "P2SH"],
["-1 0 1 2", "3DUP DEPTH 7 EQUALVERIFY ADD ADD 3 EQUALVERIFY 2DROP 0 EQUALVERIFY", "P2SH"],
["1 2 3 5", "2OVER ADD ADD 8 EQUALVERIFY ADD ADD 6 EQUAL", "P2SH"],
["1 3 5 7", "2SWAP ADD 4 EQUALVERIFY ADD 12 EQUAL", "P2SH"],
["0", "SIZE 0 EQUAL", "P2SH"],
["1", "SIZE 1 EQUAL", "P2SH"],
["127", "SIZE 1 EQUAL", "P2SH"],
["128", "SIZE 2 EQUAL", "P2SH"],
["32767", "SIZE 2 EQUAL", "P2SH"],
["32768", "SIZE 3 EQUAL", "P2SH"],
["8388607", "SIZE 3 EQUAL", "P2SH"],
["8388608", "SIZE 4 EQUAL", "P2SH"],
["2147483647", "SIZE 4 EQUAL", "P2SH"],
["2147483648", "SIZE 5 EQUAL", "P2SH"],
["549755813887", "SIZE 5 EQUAL", "P2SH"],
["549755813888", "SIZE 6 EQUAL", "P2SH"],
["9223372036854775807", "SIZE 8 EQUAL", "P2SH"],
["-1", "SIZE 1 EQUAL", "P2SH"],
["-127", "SIZE 1 EQUAL", "P2SH"],
["-128", "SIZE 2 EQUAL", "P2SH"],
["-32767", "SIZE 2 EQUAL", "P2SH"],
["-32768", "SIZE 3 EQUAL", "P2SH"],
["-8388607", "SIZE 3 EQUAL", "P2SH"],
["-8388608", "SIZE 4 EQUAL", "P2SH"],
["-2147483647", "SIZE 4 EQUAL", "P2SH"],
["-2147483648", "SIZE 5 EQUAL", "P2SH"],
["-549755813887", "SIZE 5 EQUAL", "P2SH"],
["-549755813888", "SIZE 6 EQUAL", "P2SH"],
["-9223372036854775807", "SIZE 8 EQUAL", "P2SH"],
["'abcdefghijklmnopqrstuvwxyz'", "SIZE 26 EQUAL", "P2SH"],
["42", "SIZE 1 EQUALVERIFY 42 EQUAL", "P2SH", "SIZE does not consume argument"],
["2 -2 ADD", "0 EQUAL", "P2SH"],
["2147483647 -2147483647 ADD", "0 EQUAL", "P2SH"],
["-1 -1 ADD", "-2 EQUAL", "P2SH"],
["0 0","EQUAL", "P2SH"],
["1 1 ADD", "2 EQUAL", "P2SH"],
["1 1ADD", "2 EQUAL", "P2SH"],
["111 1SUB", "110 EQUAL", "P2SH"],
["111 1 ADD 12 SUB", "100 EQUAL", "P2SH"],
["0 ABS", "0 EQUAL", "P2SH"],
["16 ABS", "16 EQUAL", "P2SH"],
["-16 ABS", "-16 NEGATE EQUAL", "P2SH"],
["0 NOT", "NOP", "P2SH"],
["1 NOT", "0 EQUAL", "P2SH"],
["11 NOT", "0 EQUAL", "P2SH"],
["0 0NOTEQUAL", "0 EQUAL", "P2SH"],
["1 0NOTEQUAL", "1 EQUAL", "P2SH"],
["111 0NOTEQUAL", "1 EQUAL", "P2SH"],
["-111 0NOTEQUAL", "1 EQUAL", "P2SH"],
["1 1 BOOLAND", "NOP", "P2SH"],
["1 0 BOOLAND", "NOT", "P2SH"],
["0 1 BOOLAND", "NOT", "P2SH"],
["0 0 BOOLAND", "NOT", "P2SH"],
["16 17 BOOLAND", "NOP", "P2SH"],
["1 1 BOOLOR", "NOP", "P2SH"],
["1 0 BOOLOR", "NOP", "P2SH"],
["0 1 BOOLOR", "NOP", "P2SH"],
["0 0 BOOLOR", "NOT", "P2SH"],
["16 17 BOOLOR", "NOP", "P2SH"],
["11 10 1 ADD", "NUMEQUAL", "P2SH"],
["11 10 1 ADD", "NUMEQUALVERIFY 1", "P2SH"],
["11 10 1 ADD", "NUMNOTEQUAL NOT", "P2SH"],
["111 10 1 ADD", "NUMNOTEQUAL", "P2SH"],
["11 10", "LESSTHAN NOT", "P2SH"],
["4 4", "LESSTHAN NOT", "P2SH"],
["10 11", "LESSTHAN", "P2SH"],
["-11 11", "LESSTHAN", "P2SH"],
["-11 -10", "LESSTHAN", "P2SH"],
["11 10", "GREATERTHAN", "P2SH"],
["4 4", "GREATERTHAN NOT", "P2SH"],
["10 11", "GREATERTHAN NOT", "P2SH"],
["-11 11", "GREATERTHAN NOT", "P2SH"],
["-11 -10", "GREATERTHAN NOT", "P2SH"],
["11 10", "LESSTHANOREQUAL NOT", "P2SH"],
["4 4", "LESSTHANOREQUAL", "P2SH"],
["10 11", "LESSTHANOREQUAL", "P2SH"],
["-11 11", "LESSTHANOREQUAL", "P2SH"],
["-11 -10", "LESSTHANOREQUAL", "P2SH"],
["11 10", "GREATERTHANOREQUAL", "P2SH"],
["4 4", "GREATERTHANOREQUAL", "P2SH"],
["10 11", "GREATERTHANOREQUAL NOT", "P2SH"],
["-11 11", "GREATERTHANOREQUAL NOT", "P2SH"],
["-11 -10", "GREATERTHANOREQUAL NOT", "P2SH"],
["1 0 MIN", "0 NUMEQUAL", "P2SH"],
["0 1 MIN", "0 NUMEQUAL", "P2SH"],
["-1 0 MIN", "-1 NUMEQUAL", "P2SH"],
["0 -2147483647 MIN", "-2147483647 NUMEQUAL", "P2SH"],
["2147483647 0 MAX", "2147483647 NUMEQUAL", "P2SH"],
["0 100 MAX", "100 NUMEQUAL", "P2SH"],
["-100 0 MAX", "0 NUMEQUAL", "P2SH"],
["0 -2147483647 MAX", "0 NUMEQUAL", "P2SH"],
["0 0 1", "WITHIN", "P2SH"],
["1 0 1", "WITHIN NOT", "P2SH"],
["0 -2147483647 2147483647", "WITHIN", "P2SH"],
["-1 -100 100", "WITHIN", "P2SH"],
["11 -100 100", "WITHIN", "P2SH"],
["-2147483647 -100 100", "WITHIN NOT", "P2SH"],
["2147483647 -100 100", "WITHIN NOT", "P2SH"],
["2147483647 2147483647 SUB", "0 EQUAL", "P2SH"],
["2147483647 DUP ADD", "4294967294 EQUAL", "P2SH", ">32 bit EQUAL is valid"],
["2147483647 NEGATE DUP ADD", "-4294967294 EQUAL", "P2SH"],
["''", "RIPEMD160 0x14 0x9c1185a5c5e9fc54612808977ee8f548b2258d31 EQUAL", "P2SH"],
["'a'", "RIPEMD160 0x14 0x0bdc9d2d256b3ee9daae347be6f4dc835a467ffe EQUAL", "P2SH"],
["'abcdefghijklmnopqrstuvwxyz'", "RIPEMD160 0x14 0xf71c27109c692c1b56bbdceb5b9d2865b3708dbc EQUAL", "P2SH"],
["''", "SHA1 0x14 0xda39a3ee5e6b4b0d3255bfef95601890afd80709 EQUAL", "P2SH"],
["'a'", "SHA1 0x14 0x86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 EQUAL", "P2SH"],
["'abcdefghijklmnopqrstuvwxyz'", "SHA1 0x14 0x32d10c7b8cf96570ca04ce37f2a19d84240d3a89 EQUAL", "P2SH"],
["''", "SHA256 0x20 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 EQUAL", "P2SH,SHA256"],
["'a'", "SHA256 0x20 0xca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb EQUAL", "P2SH,SHA256"],
["'abcdefghijklmnopqrstuvwxyz'", "SHA256 0x20 0x71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 EQUAL", "P2SH,SHA256"],
["''", "BLAKE256 0x20 0x716f6e863f744b9ac22c97ec7b76ea5f5908bc5b2f67c61510bfc4751384ea7a EQUAL", "P2SH"],
["'a'", "BLAKE256 0x20 0x43234ff894a9c0590d0246cfc574eb781a80958b01d7a2fa1ac73c673ba5e311 EQUAL", "P2SH"],
["'abcdefghijklmnopqrstuvwxyz'", "BLAKE256 0x20 0x6c648655a21f704a0bc72eb367b24144c9e8a1b07efc34165b561b6c33514427 EQUAL", "P2SH"],
["''", "DUP HASH160 SWAP BLAKE256 RIPEMD160 EQUAL", "P2SH"],
["''", "DUP HASH256 SWAP BLAKE256 BLAKE256 EQUAL", "P2SH"],
["''", "NOP HASH160 0x14 0x413320bee32a3bdb92b145d337316739d54a9287 EQUAL", "P2SH"],
["'a'", "HASH160 NOP 0x14 0x8704ae49993a1b72b8a8b28decc7f9e58be752ce EQUAL", "P2SH"],
["'abcdefghijklmnopqrstuvwxyz'", "HASH160 0x4c 0x14 0x64d140650ed333a070a8ae05fac65032aebdfe5f EQUAL", "P2SH"],
["''", "HASH256 0x20 0xd8ee5f957b78a961fb729098b4efb56440a14e05e3c55890f5edbc626380aaa6 EQUAL", "P2SH"],
["'a'", "HASH256 0x20 0x8a298a038c1a85591aa7abda75a8a393b742ee3f6b759ff15a3b5a8edff78532 EQUAL", "P2SH"],
["'abcdefghijklmnopqrstuvwxyz'", "HASH256 0x4c 0x20 0x513d6e9cb7f369fa60933bc48818da2cd0c0a079ebdd29a0cce382d4625dcb39 EQUAL", "P2SH"],
["1","NOP1 CHECKLOCKTIMEVERIFY NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 1 EQUAL", "P2SH"],
["'NOP_1_to_10' NOP1 CHECKLOCKTIMEVERIFY NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_10' EQUAL", "P2SH"],
["1", "NOP", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discourage NOPx flag allows OP_NOP"],
["0", "IF NOP1 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP1 allowed if not executed"],
["0", "IF NOP2 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP2 allowed if not executed when CLTV is inactive"],
["0", "IF NOP3 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP3 allowed if not executed when CSV is inactive"],
["0", "IF NOP4 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP4 allowed if not executed"],
["0", "IF NOP5 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP5 allowed if not executed"],
["0", "IF NOP6 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP6 allowed if not executed"],
["0", "IF NOP7 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP7 allowed if not executed"],
["0", "IF NOP8 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP8 allowed if not executed"],
["0", "IF NOP9 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP9 allowed if not executed"],
["0", "IF NOP10 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP10 allowed if not executed"],
["0", "IF 0xc0 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc0 allowed if not executed when SHA256 is inactive"],
["0", "IF 0xc1 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc1 allowed if not executed"],
["0", "IF 0xc2 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc2 allowed if not executed"],
["0", "IF 0xc3 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc3 allowed if not executed"],
["0", "IF 0xc4 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc4 allowed if not executed"],
["0", "IF 0xc5 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc5 allowed if not executed"],
["0", "IF 0xc6 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc6 allowed if not executed"],
["0", "IF 0xc7 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc7 allowed if not executed"],
["0", "IF 0xc8 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc8 allowed if not executed"],
["0", "IF 0xc9 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xc9 allowed if not executed"],
["0", "IF 0xca ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xca allowed if not executed"],
["0", "IF 0xcb ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xcb allowed if not executed"],
["0", "IF 0xcc ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xcc allowed if not executed"],
["0", "IF 0xcd ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xcd allowed if not executed"],
["0", "IF 0xce ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xce allowed if not executed"],
["0", "IF 0xcf ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xcf allowed if not executed"],
["0", "IF 0xd0 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd0 allowed if not executed"],
["0", "IF 0xd1 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd1 allowed if not executed"],
["0", "IF 0xd2 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd2 allowed if not executed"],
["0", "IF 0xd3 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd3 allowed if not executed"],
["0", "IF 0xd4 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd4 allowed if not executed"],
["0", "IF 0xd5 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd5 allowed if not executed"],
["0", "IF 0xd6 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd6 allowed if not executed"],
["0", "IF 0xd7 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd7 allowed if not executed"],
["0", "IF 0xd8 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd8 allowed if not executed"],
["0", "IF 0xd9 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xd9 allowed if not executed"],
["0", "IF 0xda ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xda allowed if not executed"],
["0", "IF 0xdb ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xdb allowed if not executed"],
["0", "IF 0xdc ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xdc allowed if not executed"],
["0", "IF 0xdd ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xdd allowed if not executed"],
["0", "IF 0xde ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xde allowed if not executed"],
["0", "IF 0xdf ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xdf allowed if not executed"],
["0", "IF 0xe0 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe0 allowed if not executed"],
["0", "IF 0xe1 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe1 allowed if not executed"],
["0", "IF 0xe2 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe2 allowed if not executed"],
["0", "IF 0xe3 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe3 allowed if not executed"],
["0", "IF 0xe4 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe4 allowed if not executed"],
["0", "IF 0xe5 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe5 allowed if not executed"],
["0", "IF 0xe6 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe6 allowed if not executed"],
["0", "IF 0xe7 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe7 allowed if not executed"],
["0", "IF 0xe8 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe8 allowed if not executed"],
["0", "IF 0xe9 ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xe9 allowed if not executed"],
["0", "IF 0xea ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xea allowed if not executed"],
["0", "IF 0xeb ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xeb allowed if not executed"],
["0", "IF 0xec ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xec allowed if not executed"],
["0", "IF 0xed ENDIF 1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged nop opcode 0xed allowed if not executed"],
["0", "IF 0x50 ELSE 1 ENDIF", "P2SH", "Reserved opcode 0x50 allowed if not executed"],
["0", "IF 0xfa ELSE 1 ENDIF", "P2SH", "Reserved opcode 0xfa allowed if not executed"],
["0", "IF 0xfb ELSE 1 ENDIF", "P2SH", "Reserved opcode 0xfb allowed if not executed"],
["0", "IF 0xfc ELSE 1 ENDIF", "P2SH", "Reserved opcode 0xfc allowed if not executed"],
["0", "IF 0xfd ELSE 1 ENDIF", "P2SH", "Reserved opcode 0xfd allowed if not executed"],
["0", "IF 0xfe ELSE 1 ENDIF", "P2SH", "Reserved opcode 0xfe allowed if not executed"],
["0", "IF 0xff ELSE 1 ENDIF", "P2SH", "Reserved opcode 0xff allowed if not executed"],
["NOP", "'b'{2048}", "P2SH", "2048 byte push"],
["1", "0x61{255}", "P2SH", "255 opcodes executed. 0x61 is NOP"],
["1 2 3 4 5 0x6f{172}", "1 2 3 4 5 0x6f{166}", "P2SH", "1,024 stack size (0x6f is 3DUP)"],
["1 TOALTSTACK 2 TOALTSTACK 3 4 5 0x6f{172}", "1 2 3 4 5 6 7 0x6f{166}", "P2SH", "1,024 stack size (altstack cleared between scriptSig/scriptPubKey)"],
["'a'{2048} 'b'{2048} 'b'{2048} 'b'{2048} 'b'{2048} 'b'{2048} 'b'{2048} 'b'{1764} 1 2 3 4 5 0x6f{255}",
"'a'{2048} 'b'{2048} 'b'{2048} 'b'{2048} 'b'{2048} 'b'{2048} 'b'{2048} 'b'{1786} 1 2 3 4 0x6f{78}", "P2SH",
"Max-size (16384 bytes), max-push (2048 bytes), max-opcodes (255), max stack size (1024 items). 0x6f is 3DUP, 0x61 is NOP"],
["0", "IF 0x50{255} ENDIF 1", "P2SH", ">255 opcodes, but RESERVED (0x50) doesn't count towards opcode limit."],
["NOP","1", "P2SH"],
["1", "0x01 0x01 EQUAL", "P2SH", "The following is useful for checking implementations of BN_bn2mpi"],
["127", "0x01 0x7F EQUAL", "P2SH"],
["128", "0x02 0x8000 EQUAL", "P2SH", "Leave room for the sign bit"],
["32767", "0x02 0xFF7F EQUAL", "P2SH"],
["32768", "0x03 0x008000 EQUAL", "P2SH"],
["8388607", "0x03 0xFFFF7F EQUAL", "P2SH"],
["8388608", "0x04 0x00008000 EQUAL", "P2SH"],
["2147483647", "0x04 0xFFFFFF7F EQUAL", "P2SH"],
["2147483648", "0x05 0x0000008000 EQUAL", "P2SH"],
["549755813887", "0x05 0xFFFFFFFF7F EQUAL", "P2SH"],
["549755813888", "0x06 0xFFFFFFFF7F EQUAL", "P2SH"],
["9223372036854775807", "0x08 0xFFFFFFFFFFFFFF7F EQUAL", "P2SH"],
["-1", "0x01 0x81 EQUAL", "P2SH", "Numbers are little-endian with the MSB being a sign bit"],
["-127", "0x01 0xFF EQUAL", "P2SH"],
["-128", "0x02 0x8080 EQUAL", "P2SH"],
["-32767", "0x02 0xFFFF EQUAL", "P2SH"],
["-32768", "0x03 0x008080 EQUAL", "P2SH"],
["-8388607", "0x03 0xFFFFFF EQUAL", "P2SH"],
["-8388608", "0x04 0x00008080 EQUAL", "P2SH"],
["-2147483647", "0x04 0xFFFFFFFF EQUAL", "P2SH"],
["-2147483648", "0x05 0x0000008080 EQUAL", "P2SH"],
["-4294967295", "0x05 0xFFFFFFFF80 EQUAL", "P2SH"],
["-549755813887", "0x05 0xFFFFFFFFFF EQUAL", "P2SH"],
["-549755813888", "0x06 0x000000008080 EQUAL", "P2SH"],
["-9223372036854775807", "0x08 0xFFFFFFFFFFFFFFFF EQUAL", "P2SH"],
["2147483647", "1ADD 2147483648 EQUAL", "P2SH", "We can do math on 4-byte integers, and compare 5-byte ones"],
["2147483647", "1ADD 1", "P2SH"],
["-2147483647", "1ADD 1", "P2SH"],
["1", "0x02 0x0100 EQUAL NOT", "P2SH", "Not the same byte array..."],
["1", "0x02 0x0100 NUMEQUAL", "P2SH", "... but they are numerically equal"],
["11", "0x4c 0x03 0x0b0000 NUMEQUAL", "P2SH"],
["0", "0x01 0x80 EQUAL NOT", "P2SH"],
["0", "0x01 0x80 NUMEQUAL", "P2SH", "Zero numerically equals negative zero"],
["0", "0x02 0x0080 NUMEQUAL", "P2SH"],
["0x03 0x000080", "0x04 0x00000080 NUMEQUAL", "P2SH"],
["0x03 0x100080", "0x04 0x10000080 NUMEQUAL", "P2SH"],
["0x03 0x100000", "0x04 0x10000000 NUMEQUAL", "P2SH"],
["NOP", "NOP 1", "P2SH", "The following tests check the if(stack.size() < N) tests in each opcode"],
["1", "IF 1 ENDIF", "P2SH", "They are here to catch copy-and-paste errors"],
["0", "NOTIF 1 ENDIF", "P2SH", "Most of them are duplicated elsewhere,"],
["1", "VERIFY 1", "P2SH", "but, hey, more is always better, right?"],
["0", "TOALTSTACK 1", "P2SH"],
["1", "TOALTSTACK FROMALTSTACK", "P2SH"],
["0 0", "2DROP 1", "P2SH"],
["0 1", "2DUP", "P2SH"],
["0 0 1", "3DUP", "P2SH"],
["0 1 0 0", "2OVER", "P2SH"],
["0 1 0 0 0 0", "2ROT", "P2SH"],
["0 1 0 0", "2SWAP", "P2SH"],
["1", "IFDUP", "P2SH"],
["NOP", "DEPTH 1", "P2SH"],
["0", "DROP 1", "P2SH"],
["1", "DUP", "P2SH"],
["0 1", "NIP", "P2SH"],
["1 0", "OVER", "P2SH"],
["1 0 0 0 3", "PICK", "P2SH"],
["1 0", "PICK", "P2SH"],
["1 0 0 0 3", "ROLL", "P2SH"],
["1 0", "ROLL", "P2SH"],
["1 0 0", "ROT", "P2SH"],
["1 0", "SWAP", "P2SH"],
["0 1", "TUCK", "P2SH"],
["1", "SIZE", "P2SH"],
["0 0", "EQUAL", "P2SH"],
["0 0", "EQUALVERIFY 1", "P2SH"],
["0 0 1", "EQUAL EQUAL", "P2SH", "OP_0 and bools must have identical byte representations"],
["0", "1ADD", "P2SH"],
["2", "1SUB", "P2SH"],
["-1", "NEGATE", "P2SH"],
["-1", "ABS", "P2SH"],
["0", "NOT", "P2SH"],
["-1", "0NOTEQUAL", "P2SH"],
["1 0", "ADD", "P2SH"],
["1 0", "SUB", "P2SH"],
["-1 -1", "BOOLAND", "P2SH"],
["-1 0", "BOOLOR", "P2SH"],
["0 0", "NUMEQUAL", "P2SH"],
["0 0", "NUMEQUALVERIFY 1", "P2SH"],
["-1 0", "NUMNOTEQUAL", "P2SH"],
["-1 0", "LESSTHAN", "P2SH"],
["1 0", "GREATERTHAN", "P2SH"],
["0 0", "LESSTHANOREQUAL", "P2SH"],
["0 0", "GREATERTHANOREQUAL", "P2SH"],
["-1 0", "MIN", "P2SH"],
["1 0", "MAX", "P2SH"],
["-1 -1 0", "WITHIN", "P2SH"],
["0", "RIPEMD160", "P2SH"],
["0", "SHA1", "P2SH"],
["0", "SHA256", "P2SH,SHA256"],
["0", "BLAKE256", "P2SH"],
["0", "HASH160", "P2SH"],
["0", "HASH256", "P2SH"],
["NOP", "1", "P2SH"],
["NOP", "NOP1 1", "P2SH"],
["NOP", "CHECKLOCKTIMEVERIFY 1", "P2SH"],
["NOP", "NOP3 1", "P2SH"],
["NOP", "NOP4 1", "P2SH"],
["NOP", "NOP5 1", "P2SH"],
["NOP", "NOP6 1", "P2SH"],
["NOP", "NOP7 1", "P2SH"],
["NOP", "NOP8 1", "P2SH"],
["NOP", "NOP9 1", "P2SH"],
["NOP", "NOP10 1", "P2SH"],
["0 0x01 1", "HASH160 0x14 0xf5a8302ee8695bf836258b8f2b57b38a0be14e47 EQUAL", "P2SH", "Very basic P2SH"],
["0x4c 0 0x01 1", "HASH160 0x14 0xf5a8302ee8695bf836258b8f2b57b38a0be14e47 EQUAL", "P2SH"],
["0x40 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242",
"0x4d 0x4000 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 EQUAL",
"P2SH",
"Basic PUSH signedness check"],
["0x4c 0x40 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242",
"0x4d 0x4000 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 EQUAL",
"P2SH",
"Basic PUSHDATA1 signedness check"],
["all PUSHDATA forms are equivalent"],
["0x4c 0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "PUSHDATA1 of 75 bytes equals direct push of it"],
["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4c 0xFF 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "PUSHDATA2 of 255 bytes equals PUSHDATA1 of it"],
["0x00", "SIZE 0 EQUAL", "P2SH", "Basic OP_0 execution"],
["Numeric pushes"],
["0x01 0x81", "0x4f EQUAL", "", "OP1_NEGATE pushes 0x81"],
["0x01 0x01", "0x51 EQUAL", "", "OP_1 pushes 0x01"],
["0x01 0x02", "0x52 EQUAL", "", "OP_2 pushes 0x02"],
["0x01 0x03", "0x53 EQUAL", "", "OP_3 pushes 0x03"],
["0x01 0x04", "0x54 EQUAL", "", "OP_4 pushes 0x04"],
["0x01 0x05", "0x55 EQUAL", "", "OP_5 pushes 0x05"],
["0x01 0x06", "0x56 EQUAL", "", "OP_6 pushes 0x06"],
["0x01 0x07", "0x57 EQUAL", "", "OP_7 pushes 0x07"],
["0x01 0x08", "0x58 EQUAL", "", "OP_8 pushes 0x08"],
["0x01 0x09", "0x59 EQUAL", "", "OP_9 pushes 0x09"],
["0x01 0x0a", "0x5a EQUAL", "", "OP_10 pushes 0x0a"],
["0x01 0x0b", "0x5b EQUAL", "", "OP_11 pushes 0x0b"],
["0x01 0x0c", "0x5c EQUAL", "", "OP_12 pushes 0x0c"],
["0x01 0x0d", "0x5d EQUAL", "", "OP_13 pushes 0x0d"],
["0x01 0x0e", "0x5e EQUAL", "", "OP_14 pushes 0x0e"],
["0x01 0x0f", "0x5f EQUAL", "", "OP_15 pushes 0x0f"],
["0x01 0x10", "0x60 EQUAL", "", "OP_16 pushes 0x10"],
["Equivalency of different numeric encodings"],
["0x02 0x8000", "128 NUMEQUAL", "", "0x8000 equals 128"],
["0x01 0x00", "0 NUMEQUAL", "", "0x00 numequals 0"],
["0x01 0x80", "0 NUMEQUAL", "", "0x80 (negative zero) numequals 0"],
["0x02 0x0080", "0 NUMEQUAL", "", "0x0080 numequals 0"],
["0x02 0x0500", "5 NUMEQUAL", "", "0x0500 numequals 5"],
["0x03 0xff7f80", "0x02 0xffff NUMEQUAL", "", ""],
["0x03 0xff7f00", "0x02 0xff7f NUMEQUAL", "", ""],
["0x04 0xffff7f80", "0x03 0xffffff NUMEQUAL", "", ""],
["0x04 0xffff7f00", "0x03 0xffff7f NUMEQUAL", "", ""],
["Unevaluated non-minimal pushes are ignored"],
["0 IF 0x4c 0x00 ENDIF 1", "", "MINIMALDATA", "non-minimal PUSHDATA1 ignored"],
["0 IF 0x4d 0x0000 ENDIF 1", "", "MINIMALDATA", "non-minimal PUSHDATA2 ignored"],
["0 IF 0x4c 0x00000000 ENDIF 1", "", "MINIMALDATA", "non-minimal PUSHDATA4 ignored"],
["0 IF 0x01 0x81 ENDIF 1", "", "MINIMALDATA", "1NEGATE equiv"],
["0 IF 0x01 0x01 ENDIF 1", "", "MINIMALDATA", "OP_1 equiv"],
["0 IF 0x01 0x02 ENDIF 1", "", "MINIMALDATA", "OP_2 equiv"],
["0 IF 0x01 0x03 ENDIF 1", "", "MINIMALDATA", "OP_3 equiv"],
["0 IF 0x01 0x04 ENDIF 1", "", "MINIMALDATA", "OP_4 equiv"],
["0 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "OP_5 equiv"],
["0 IF 0x01 0x06 ENDIF 1", "", "MINIMALDATA", "OP_6 equiv"],
["0 IF 0x01 0x07 ENDIF 1", "", "MINIMALDATA", "OP_7 equiv"],
["0 IF 0x01 0x08 ENDIF 1", "", "MINIMALDATA", "OP_8 equiv"],
["0 IF 0x01 0x09 ENDIF 1", "", "MINIMALDATA", "OP_9 equiv"],
["0 IF 0x01 0x0a ENDIF 1", "", "MINIMALDATA", "OP_10 equiv"],
["0 IF 0x01 0x0b ENDIF 1", "", "MINIMALDATA", "OP_11 equiv"],
["0 IF 0x01 0x0c ENDIF 1", "", "MINIMALDATA", "OP_12 equiv"],
["0 IF 0x01 0x0d ENDIF 1", "", "MINIMALDATA", "OP_13 equiv"],
["0 IF 0x01 0x0e ENDIF 1", "", "MINIMALDATA", "OP_14 equiv"],
["0 IF 0x01 0x0f ENDIF 1", "", "MINIMALDATA", "OP_15 equiv"],
["0 IF 0x01 0x10 ENDIF 1", "", "MINIMALDATA", "OP_16 equiv"],
["Numeric minimaldata rules are only applied when a stack item is numerically evaluated; the push itself is allowed"],
["0x01 0x00", "1", "MINIMALDATA"],
["0x01 0x80", "1", "MINIMALDATA"],
["0x02 0x0180", "1", "MINIMALDATA"],
["0x02 0x0100", "1", "MINIMALDATA"],
["0x02 0x0200", "1", "MINIMALDATA"],
["0x02 0x0300", "1", "MINIMALDATA"],
["0x02 0x0400", "1", "MINIMALDATA"],
["0x02 0x0500", "1", "MINIMALDATA"],
["0x02 0x0600", "1", "MINIMALDATA"],
["0x02 0x0700", "1", "MINIMALDATA"],
["0x02 0x0800", "1", "MINIMALDATA"],
["0x02 0x0900", "1", "MINIMALDATA"],
["0x02 0x0a00", "1", "MINIMALDATA"],
["0x02 0x0b00", "1", "MINIMALDATA"],
["0x02 0x0c00", "1", "MINIMALDATA"],
["0x02 0x0d00", "1", "MINIMALDATA"],
["0x02 0x0e00", "1", "MINIMALDATA"],
["0x02 0x0f00", "1", "MINIMALDATA"],
["0x02 0x1000", "1", "MINIMALDATA"],
["Valid version of the 'Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule' script_invalid test"],
["1 0x02 0x0000", "PICK DROP", ""],
["1 0x02 0x0000", "ROLL DROP 1", ""],
["0x02 0x0000", "1ADD DROP 1", ""],
["0x02 0x0000", "1SUB DROP 1", ""],
["0x02 0x0000", "NEGATE DROP 1", ""],
["0x02 0x0000", "ABS DROP 1", ""],
["0x02 0x0000", "NOT DROP 1", ""],
["0x02 0x0000", "0NOTEQUAL DROP 1", ""],
["0 0x02 0x0000", "ADD DROP 1", ""],
["0x02 0x0000 0", "ADD DROP 1", ""],
["0 0x02 0x0000", "SUB DROP 1", ""],
["0x02 0x0000 0", "SUB DROP 1", ""],
["0 0x02 0x0000", "BOOLAND DROP 1", ""],
["0x02 0x0000 0", "BOOLAND DROP 1", ""],
["0 0x02 0x0000", "BOOLOR DROP 1", ""],
["0x02 0x0000 0", "BOOLOR DROP 1", ""],
["0 0x02 0x0000", "NUMEQUAL DROP 1", ""],
["0x02 0x0000 1", "NUMEQUAL DROP 1", ""],
["0 0x02 0x0000", "NUMEQUALVERIFY 1", ""],
["0x02 0x0000 0", "NUMEQUALVERIFY 1", ""],
["0 0x02 0x0000", "NUMNOTEQUAL DROP 1", ""],
["0x02 0x0000 0", "NUMNOTEQUAL DROP 1", ""],
["0 0x02 0x0000", "LESSTHAN DROP 1", ""],
["0x02 0x0000 0", "LESSTHAN DROP 1", ""],
["0 0x02 0x0000", "GREATERTHAN DROP 1", ""],
["0x02 0x0000 0", "GREATERTHAN DROP 1", ""],
["0 0x02 0x0000", "LESSTHANOREQUAL DROP 1", ""],
["0x02 0x0000 0", "LESSTHANOREQUAL DROP 1", ""],
["0 0x02 0x0000", "GREATERTHANOREQUAL DROP 1", ""],
["0x02 0x0000 0", "GREATERTHANOREQUAL DROP 1", ""],
["0 0x02 0x0000", "MIN DROP 1", ""],
["0x02 0x0000 0", "MIN DROP 1", ""],
["0 0x02 0x0000", "MAX DROP 1", ""],
["0x02 0x0000 0", "MAX DROP 1", ""],
["0x02 0x0000 0 0", "WITHIN DROP 1", ""],
["0 0x02 0x0000 0", "WITHIN DROP 1", ""],
["0 0 0x02 0x0000", "WITHIN DROP 1", ""],
["0 0 0x02 0x0000", "CHECKMULTISIG DROP 1", ""],
["0 0x02 0x0000 0", "CHECKMULTISIG DROP 1", ""],
["0 0x02 0x0000 0 1", "CHECKMULTISIG DROP 1", ""],
["0 0 0x02 0x0000", "CHECKMULTISIGVERIFY 1", ""],
["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", ""],
["Test coverage for CHECKSIG"],
["NOTE: The following keys are used throughout the signature tests:"],
[" private key 1: 0x0000000000000000000000000000000000000000000000000000000000000001"],
[" compressed pubkey 1: 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"],
[" uncompressed pubkey 1: 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"],
[" hybrid pubkey 1: 0x0579be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"],
[" compressed pubkey hash 1: 0xe280cb6e66b96679aec288b1fbdbd4db08077a1b"],
[" uncompressed pubkey hash 1: 0x76a2e145da57d32c5a40f6406287c9248e0d5040"],
[" private key 2: 0x0000000000000000000000000000000000000000000000000000000000000003"],
[" compressed pubkey 2: 0x02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9"],
[" uncompressed pubkey 2: 0x04f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],
[" hybrid pubkey 2: 0x05f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],
[" compressed pubkey hash 2: 0x01557763e0252dc0ff9e0996ad1d04b167bb993c"],
[" uncompressed pubkey hash 2: 0x84e54168b44c30bc76a97ac78b53ecbd75106e13"],
[" private key 3: 0x0000000000000000000000000000000000000000000000000000000000000006"],
[" compressed pubkey 3: 0x03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556"],
[" uncompressed pubkey 3: 0x04fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556ae12777aacfbb620f3be96017f45c560de80f0f6518fe4a03c870c36b075f297"],
[" hybrid pubkey 3: 0x06fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556ae12777aacfbb620f3be96017f45c560de80f0f6518fe4a03c870c36b075f297"],
[" compressed pubkey hash 3: 0x2f0b8922f80989a85a53e136af931e473343bcad"],
[" uncompressed pubkey hash 3: 0x1891523d072e152ef254f4326eba0729a9131ef8"],
[
"0x48 0x3045022100f5353150d31a63f4a0d06d1f5a01ac65f7267a719e49f2a1ac584fd546bef074022030e09575e7a1541aa018876a4003cefe1b061a90556b5140c63e0ef84813524801",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys under SigHashAll"
],
[
"0x48 0x304502210098676274838e0f45ca405918668201eeafb7c829f043daf77c3055dda4bb73ac022019202b189d1324533a82906e546d24d468b854cbb13a03e5fca7ca9e45b835eb02",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys under SigHashNone"
],
[
"0x47 0x304402207a5a5a18fd1c0f3e76fa5f0a06751e52e1246a2361843d40c13e95906feccc9a0220642530a8aeff9b8242ee1a6110a6d951707ae28bed6b4367790ebc8829ad1a9503",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys under SigHashSingle"
],
[
"0x48 0x3045022100a22bcae4c96e7fd7251e92c3542a21304701d5c8f94b31035b060f2b96a5cd410220526ffd300f848fb0e5eda14fb410221999e837e3bfbff5c75e20270336c501cc81",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys under SigHashAll|SigHashAnyOneCanPay"
],
[
"0x47 0x304402206aa27c6d7d5db864eb06eb163231a49598f71efab7c07a9091bf6620b2f49c8d022069a8b9ceb0d79034a9c582b465432826a10b97bee29ddfc56534d04ba50a315e82",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys under SigHashNone|SigHashAnyOneCanPay"
],
[
"0x47 0x304402200f9d9048a7b313ebe540a895f1721fc327477e11a3ca3a6a7f9e2af11374bbb20220202914bec4369f8d9e70c82c720d9d87d52c5ced7f804ac1f70a3cf993341ba983",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys under SigHashSingle|SigHashAnyOneCanPay"
],
[
"0x47 0x304402206f02f07d84e9bef57e3c211887902f0e3d2067e210678e7637927a3397e38ecc0220795a47bcc1585e8b329a5172fb412c51368dd4d273e8e0766e918590a3141bfe01",
"0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
"",
"CHECKSIG must work with uncompressed pubkeys under SigHashAll"
],
[
"0x47 0x304402201c57a7b1befacfc8b6a02d83724334966a3d9a214c54661fecc9ecc4f90c421f02201bcd5bc018f66ef0f9b1445fbbf2336a9e8fb405e4b93ac8b61b9d7ebe613d8602",
"0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
"",
"CHECKSIG must work with uncompressed pubkeys under SigHashNone"
],
[
"0x48 0x3045022100e977d8f5826d5b0faa2ec19e55c82e8d2e77b510b37455dcb0fee6a97f7297c50220139b3bb22739e4cb2b21ae285eb0a6fb83888762cdccdbd7adf596d429a5ab7b03",
"0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
"",
"CHECKSIG must work with uncompressed pubkeys under SigHashSingle"
],
[
"0x47 0x304402200e1bf09e5bd4493bcac49225fe0858fe820ac23f3f81a9ebcf89c562c21ba60202200e3e8ce3dafdbc661fc16e34c2b8ed87f46c2600eed06fafafc6c5e6acce4abb81",
"0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
"",
"CHECKSIG must work with uncompressed pubkeys under SigHashAll|SigHashAnyOneCanPay"
],
[
"0x47 0x304402202ed7cbdec56c056cba689ca9f097f245de82b4732eed17060443349aa1098b6a022046dba0f9c0b807ab4f8cbcf9853548d86e4e3847103e662063e764248d27c25982",
"0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
"",
"CHECKSIG must work with uncompressed pubkeys under SigHashNone|SigHashAnyOneCanPay"
],
[
"0x48 0x304502210093515fc4e75735746b8e7468b5855cd2ed2be85e48ca9771f18ab3e757e37497022003aab10a26f94122c186e9705c902e249f12a31ac96de9f5c5a7ce6e5f76bd9483",
"0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
"",
"CHECKSIG must work with uncompressed pubkeys under SigHashSingle|SigHashAnyOneCanPay"
],
[
"0x48 0x3045022100dfe97c482347767875efb2d95ae94cb21d3a2f5e798c48fe202595ed8128038202201c49c43648d581280d1921e2837972a8bd800d85065a8e1f41e61161524c450d01",
"0x21 0x03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556 CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys with y bit set (P2PK)"
],
[
"0x48 0x3045022100e67ff2e958d066294263617782bedca9eddf1a88e15711caa8a0dd5db5317cfb0220490ca23dced8b91476492ef7e510847f2dd9e67c8f4a7f24ad2bc0e6e574b70201 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
"DUP HASH160 0x14 0xe280cb6e66b96679aec288b1fbdbd4db08077a1b EQUALVERIFY CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys without y bit set (P2PKH)"
],
[
"0x47 0x304402204344dda380768b2b87bf3ca615682a2630e7c957f9bfd27725a705305ea5581702203ac1b46f6e37263af61a9c5459a40505fd250e3cd07af88a311a3b60ad28dc8001 0x21 0x03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556",
"DUP HASH160 0x14 0x2f0b8922f80989a85a53e136af931e473343bcad EQUALVERIFY CHECKSIG",
"",
"CHECKSIG must work with compressed pubkeys with y bit set (P2PKH)"
],
[
"0x47 0x304402200cde54f44c5cfc3bf6fd71f18ac0570ab18b5a4e643145fd00cd9863da17bb0102200ad95f822df6fc4c7c4d1dd8fe9b554044bdc2c44aaf6b0843d46fed9f38d7b101 0x41 0x04f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672",
"DUP HASH160 0x14 0x84e54168b44c30bc76a97ac78b53ecbd75106e13 EQUALVERIFY CHECKSIG",
"",
"CHECKSIG must work with uncompressed pubkeys (P2PKH)"
],
[
"0x47 0x304402205550606a87650619f98b261adde6d343aad0c3fdd526c68d5ed718819ee59a7e0220335af6a47a18064681a77f8387c95934439bdf74b61e290a3353528311b8c99301 0x23 0x210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
"HASH160 0x14 0xe57d091fa806258280dc78a1d8544a47a5b16a19 EQUAL",
"P2SH",
"CHECKSIG must work with compressed pubkeys with y bit set when in a P2SH redeem script"
],
[
"0x47 0x304402205708a07bf55b7ce3961d25e2495d522c7130261f00fb145525af4ac176b4656b02207ffad7719f55d73ccb57ccc4f139511f8c9325f8d1258adc63a441871c83c3ae01 0x23 0x2103fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556ac",
"HASH160 0x14 0xfa07a95bb9386647aa5a40555415277be50d4ff1 EQUAL",
"P2SH",
"CHECKSIG must work with compressed pubkeys without y bit set when in a P2SH redeem script"
],
[
"0x47 0x304402202dba5e6a3653b0e6117e1e96abd8c0ab026963d4ba57505b876ee8f728c43d9d02204cf1113ea5bd191addaff587809ac7bca1bf0a4e12e9a18a81c69ffbf23ce1fc01 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914e280cb6e66b96679aec288b1fbdbd4db08077a1b88ac",
"HASH160 0x14 0x6c3d84ad3f335eb67d9b66245b6b45cb8154bc5a EQUAL",
"P2SH",
"CHECKSIG must work with uncompressed pubkeys when in a P2SH redeem script"
],
[
"0",
"0x21 0x03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556 CHECKSIG NOT",
"DERSIG",
"CHECKSIG must push false with invalid non-null DER-compliant sig with DERSIG (P2PK NOT 0 sig)"
],
[
"0x09 0x300602010102010101",
"0x21 0x03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556 CHECKSIG NOT",
"DERSIG",
"CHECKSIG must push false with invalid non-null DER-compliant sig with DERSIG (P2PK NOT min sig)"
],
[
"1",
"0x21 0x03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556 CHECKSIG NOT",
"",
"CHECKSIG must push false with invalid non-DER-compliant sig without DERSIG"
],
[
"0x48 0x304402204de4b86166781ffbd4375650776a338d53a0eabcc61f371ce256364f058f88ba0220597090d34c536b727fb555d61b100703a3f63b7a6ad7aa0164138c6ab3c63f880101",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"CHECKSIG must push true for otherwise valid sig with multi-byte hash type without DERSIG"
],
[
"0x48 0x304502204fc10344934662ca0a93a84d14d650d8a21cf2ab91f608e8783d2999c95544320221008441aacd6b17038ff3f6700b042934f9a6fea0cec2051b51dc709e52a5bb7d6101",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"CHECKSIG must push true when S is greater than the curve half order and sig is valid without DERSIG"
],
["Additional test coverage with standard payment forms involving CHECKSIG"],
[
"0x48 0x3045022100f5353150d31a63f4a0d06d1f5a01ac65f7267a719e49f2a1ac584fd546bef074022030e09575e7a1541aa018876a4003cefe1b061a90556b5140c63e0ef84813524801 NOP",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"",
"Execution must not error with non-push-only sig script without P2SH or SIGPUSHONLY"
],
[
"0x48 0x3045022100f5353150d31a63f4a0d06d1f5a01ac65f7267a719e49f2a1ac584fd546bef074022030e09575e7a1541aa018876a4003cefe1b061a90556b5140c63e0ef84813524801 NOP",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"P2SH",
"Execution must not error with non-push-only sig script with P2SH and without SIGPUSHONLY"
],
[
"0x47 0x304402205550606a87650619f98b261adde6d343aad0c3fdd526c68d5ed718819ee59a7e0220335af6a47a18064681a77f8387c95934439bdf74b61e290a3353528311b8c99301 NOP 0x23 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"HASH160 0x14 0xe57d091fa806258280dc78a1d8544a47a5b16a19 EQUAL",
"",
"Unexecuted P2SH must not error with non-push-only sig script without P2SH or SIGPUSHONLY"
],
[
"11 0x48 0x3045022100f5353150d31a63f4a0d06d1f5a01ac65f7267a719e49f2a1ac584fd546bef074022030e09575e7a1541aa018876a4003cefe1b061a90556b5140c63e0ef84813524801",
"0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"P2SH",
"Execution must not error when the script finishes with data on the stack without CLEANSTACK (P2PK with extra input)"
],
[
"0x47 0x304402205550606a87650619f98b261adde6d343aad0c3fdd526c68d5ed718819ee59a7e0220335af6a47a18064681a77f8387c95934439bdf74b61e290a3353528311b8c99301 0x23 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"HASH160 0x14 0xe57d091fa806258280dc78a1d8544a47a5b16a19 EQUAL",
"CLEANSTACK,P2SH",
"P2SH execution must not error when the script finishes without data on the stack with CLEANSTACK"
],
[
"11 0x47 0x304402205550606a87650619f98b261adde6d343aad0c3fdd526c68d5ed718819ee59a7e0220335af6a47a18064681a77f8387c95934439bdf74b61e290a3353528311b8c99301 0x23 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG",
"HASH160 0x14 0xe57d091fa806258280dc78a1d8544a47a5b16a19 EQUAL",
"P2SH",
"P2SH execution must not error when the script finishes with data on the stack without CLEANSTACK"
],
["Test coverage for CHECKMULTISIG"],
["NOTE: See the CHECKSIG section above for information about the keys used in these tests:"],
["", "<0 0 CHECKMULTISIG>{255}", "P2SH", "CHECKMULTSIG increments op count by num pubkeys evaluated in addition to the usual one per op"],
[
"",
"<NOP>{3} <0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG>{12}",
"P2SH",
"CHECKMULTISIG with no sigs checked still increments op count by num pubkeys evaluated (12 * 21 + 3 = 255)"
],
["", "0 0 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG is allowed to have zero pubkeys and/or sigs"],
["", "0 0 1 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG zero sigs means no sigs or pubkeys are checked"],
["", "0 <0>{2} 2 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 2 pubkeys"],
["", "0 <0>{3} 3 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 3 pubkeys"],
["", "0 <0>{4} 4 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 4 pubkeys"],
["", "0 <0>{5} 5 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 5 pubkeys"],
["", "0 <0>{6} 6 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 6 pubkeys"],
["", "0 <0>{7} 7 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 7 pubkeys"],
["", "0 <0>{8} 8 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 8 pubkeys"],
["", "0 <0>{9} 9 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 9 pubkeys"],
["", "0 <0>{10} 10 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 10 pubkeys"],
["", "0 <0>{11} 11 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 11 pubkeys"],
["", "0 <0>{12} 12 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 12 pubkeys"],
["", "0 <0>{13} 13 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 13 pubkeys"],
["", "0 <0>{14} 14 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 14 pubkeys"],
["", "0 <0>{15} 15 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 15 pubkeys"],
["", "0 <0>{16} 16 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 16 pubkeys"],
["", "0 <0>{17} 17 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 17 pubkeys"],
["", "0 <0>{18} 18 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 18 pubkeys"],
["", "0 <0>{19} 19 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 19 pubkeys"],
["", "0 <0>{20} 20 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIG must allow 20 pubkeys"],
[
"0x47 0x304402203f419012d8e26a336579b8a1410c6a2bb460965d093beee381851998e946013b02205281ee195559c758fb3a3abb9d38ad32ed83d53e319793fb7e5fab31ac48ec0c01 0x47 0x304402206c5bb54f2a8681d4ebbd762042addc2837d2a0e3dc3e600a09c1901512643e8b022072f3acdcce1f2adde1fddfc642e2403f84f040e7dbb0d4249a9b837f98ad259101 0x48 0x3045022100c99fdb4f2f1df128d5646dd24b603c3a7c3a93912f457a03a38a70d83acd1f52022059929aa3f91bdc711d20a4c6773fac5ef7b12b0a12c1f93192ba0eefa3bdb3d301",
"3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 0x21 0x03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556 3 CHECKMULTISIG",
"",
"CHECKMULTISIG must push true when provided the specified number of valid sigs (3-of-3, 3 valid sigs)"
],
[
"0x47 0x3044022015dd38cbf89c82f64393ffed0dc2a388a791086950d82fd201e5a8395fc79a2e0220379c89ff963bd904614e5e2b12acbdd14b927f35232bf53b1d598e45a4ed922c01 0x48 0x3045022100aa2c8c3d545d53109b9f9c1c808026c328e5a171c06b9202352530ab9c43c21d0220476e919d7e5c6cf8832122b33ba57aed45c83f481296d89b8f61d30f1c4271e601 0x4c69 2 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 0x21 0x03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556 3 CHECKMULTISIG",
"HASH160 0x14 0xf86b5a7c6d32566aa4dccc04d1533530b4d64cf3 EQUAL",
"P2SH",
"CHECKMULTISIG must work in a P2SH redeem script (2-of-3, 2 valid sigs)"
],
[
"0 0x47 0x30440220ea377dcb8630e68da3a0eeb57e96e195b4d9c437381f76912c0e6fc28bae6e3502204096da36de10b7261bfa6ae0fddbe11428c1d13160bcb1110ed04f3f7d2f389f01",
"2 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 2 CHECKMULTISIG NOT",
"",
"CHECKMULTISIG must not error with sigs where R is negative without DERSIG (2-of-2, first sig valid non-DER, second sig invalid but DER compliant)"
],
[
"0x47 0x30440220eb8231fbc543176e5ee8b80591b7db91d4dab835daada515d95f3532eb54b86102203e76890b026b24030a99a2ae5957d573b7a9ecbc382d613b18c25c124d0fac9a01 0",
"2 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 2 CHECKMULTISIG NOT",
"",
"CHECKMULTISIG must not error with sigs where R is negative without DERSIG (2-of-2, first sig invalid but DER compliant, second sig valid non-DER)"
],
["Additional test coverage with standard payment forms involving CHECKMULTISIG"],
[
"0x48 0x3045022100c40b401e745675a9280ef213d6bfc453bd941d61004e30acdcc2704c5098bcbb02206d2f2549311cf537b67a46840044124f2068759d3ba0ac4f1d377ded06d3532101 DUP",
"2 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 DUP 2 CHECKMULTISIG",
"",
"Execution must not error when signature script contains non-push-only opcodes without SIGPUSHONLY (2-of-2, identical keys and sigs pushed via DUP)"
],
["CHECKMULTISIG evaluation order tests. CHECKMULTISIG evaluates signatures and"],
["pubkeys in a specific order, and will exit early if the number of signatures"],
["left to check is greater than the number of keys left. As strict encoding fails the"],
["script when it reaches an invalidly encoded signature or pubkey, we can use it"],
["to test the exact order in which signatures and pubkeys are evaluated by"],
["distinguishing CHECKMULTISIG returning false on the stack and the script as a"],
["whole failing."],
["See also the corresponding inverted versions of these tests in script_invalid.json"],
[
"0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
"2 0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
"",
"2-of-2 CHECKMULTISIG NOT with the second pubkey invalid, and both signatures validly encoded. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid pubkey."
],
[
"0 0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
"2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
"",
"2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but second signature invalid. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid signature."
],
["While not really correctly DER encoded, the empty signature is allowed by"],
["strict encoding to provide a compact way to provide a delibrately invalid signature."],
["0", "0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 CHECKSIG NOT", ""],
["0", "1 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 1 CHECKMULTISIG NOT", ""],
["Test coverage for CHECKMULTISIGVERIFY"],
["1", "<0 0 CHECKMULTISIGVERIFY>{255}", "P2SH", "CHECKMULTSIGVERIFY increments op count by num pubkeys evaluated in addition to the usual one per op"],
[
"1",
"<NOP>{3} <0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY>{12}",
"P2SH",
"CHECKMULTISIGVERIFY with no sigs checked still increments op count by num pubkeys evaluated (12 * 21 + 3 = 255)"
],
["", "0 0 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY is allowed to have zero pubkeys and/or sigs"],
["", "0 0 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY zero sigs means no sigs or pubkeys are checked"],
["", "0 <0>{2} 2 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 2 pubkeys"],
["", "0 <0>{3} 3 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 3 pubkeys"],
["", "0 <0>{4} 4 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 4 pubkeys"],
["", "0 <0>{5} 5 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 5 pubkeys"],
["", "0 <0>{6} 6 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 6 pubkeys"],
["", "0 <0>{7} 7 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 7 pubkeys"],
["", "0 <0>{8} 8 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 8 pubkeys"],
["", "0 <0>{9} 9 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 9 pubkeys"],
["", "0 <0>{10} 10 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 10 pubkeys"],
["", "0 <0>{11} 11 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 11 pubkeys"],
["", "0 <0>{12} 12 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 12 pubkeys"],
["", "0 <0>{13} 13 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 13 pubkeys"],
["", "0 <0>{14} 14 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 14 pubkeys"],
["", "0 <0>{15} 15 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 15 pubkeys"],
["", "0 <0>{16} 16 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 16 pubkeys"],
["", "0 <0>{17} 17 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 17 pubkeys"],
["", "0 <0>{18} 18 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 18 pubkeys"],
["", "0 <0>{19} 19 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 19 pubkeys"],
["", "0 <0>{20} 20 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH", "CHECKMULTISIGVERIFY must allow 20 pubkeys"],
["The End"]
]