Changeset View
Changeset View
Standalone View
Standalone View
src/test/data/script_tests.json
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | |||||
["1","NOP1 CHECKLOCKTIMEVERIFY CHECKSEQUENCEVERIFY NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 1 EQUAL", "P2SH,STRICTENC", "OK"], | ["1","NOP1 CHECKLOCKTIMEVERIFY CHECKSEQUENCEVERIFY NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 1 EQUAL", "P2SH,STRICTENC", "OK"], | ||||
["'NOP_1_to_10' NOP1 CHECKLOCKTIMEVERIFY CHECKSEQUENCEVERIFY NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_10' EQUAL", "P2SH,STRICTENC", "OK"], | ["'NOP_1_to_10' NOP1 CHECKLOCKTIMEVERIFY CHECKSEQUENCEVERIFY NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_10' EQUAL", "P2SH,STRICTENC", "OK"], | ||||
["1", "NOP", "P2SH,STRICTENC,DISCOURAGE_UPGRADABLE_NOPS", "OK", "Discourage NOPx flag allows OP_NOP"], | ["1", "NOP", "P2SH,STRICTENC,DISCOURAGE_UPGRADABLE_NOPS", "OK", "Discourage NOPx flag allows OP_NOP"], | ||||
["0", "IF NOP10 ENDIF 1", "P2SH,STRICTENC,DISCOURAGE_UPGRADABLE_NOPS", "OK", | ["0", "IF NOP10 ENDIF 1", "P2SH,STRICTENC,DISCOURAGE_UPGRADABLE_NOPS", "OK", | ||||
"Discouraged NOPs are allowed if not executed"], | "Discouraged NOPs are allowed if not executed"], | ||||
["0", "IF 0xba ELSE 1 ENDIF", "P2SH,STRICTENC", "OK", "opcodes >= FIRST_UNDEFINED_OP_VALUE invalid if executed"], | ["0", "IF 0xbc ELSE 1 ENDIF", "P2SH,STRICTENC", "OK", "opcodes >= FIRST_UNDEFINED_OP_VALUE invalid if executed"], | ||||
["0", "IF 0xbb ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | |||||
["0", "IF 0xbc ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | |||||
["0", "IF 0xbd ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ["0", "IF 0xbd ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ||||
["0", "IF 0xbe ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ["0", "IF 0xbe ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ||||
["0", "IF 0xbf ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ["0", "IF 0xbf ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ||||
["0", "IF 0xc0 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ["0", "IF 0xc0 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ||||
["0", "IF 0xc1 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ["0", "IF 0xc1 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ||||
["0", "IF 0xc2 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ["0", "IF 0xc2 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ||||
["0", "IF 0xc3 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ["0", "IF 0xc3 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ||||
["0", "IF 0xc4 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ["0", "IF 0xc4 ELSE 1 ENDIF", "P2SH,STRICTENC", "OK"], | ||||
▲ Show 20 Lines • Show All 673 Lines • ▼ Show 20 Lines | |||||
["Disabled opcodes"], | ["Disabled opcodes"], | ||||
["'abc'", "IF INVERT ELSE 1 ENDIF", "P2SH,STRICTENC", "DISABLED_OPCODE", "INVERT disabled"], | ["'abc'", "IF INVERT ELSE 1 ENDIF", "P2SH,STRICTENC", "DISABLED_OPCODE", "INVERT disabled"], | ||||
["2 0 IF 2MUL ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "2MUL disabled"], | ["2 0 IF 2MUL ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "2MUL disabled"], | ||||
["2 0 IF 2DIV ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "2DIV disabled"], | ["2 0 IF 2DIV ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "2DIV disabled"], | ||||
["2 2 0 IF MUL ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "MUL disabled"], | ["2 2 0 IF MUL ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "MUL disabled"], | ||||
["2 2 0 IF LSHIFT ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "LSHIFT disabled"], | ["2 2 0 IF LSHIFT ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "LSHIFT disabled"], | ||||
["2 2 0 IF RSHIFT ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "RSHIFT disabled"], | ["2 2 0 IF RSHIFT ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "RSHIFT disabled"], | ||||
["0 0 0 HASH256 0 IF CHECKDATASIG ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "RSHIFT disabled"], | |||||
["0 0 0 HASH256 0 IF CHECKDATASIGVERIFY ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DISABLED_OPCODE", "RSHIFT disabled"], | |||||
["Bitwise opcodes"], | ["Bitwise opcodes"], | ||||
["AND"], | ["AND"], | ||||
["0 0", "AND 0 EQUAL", "P2SH,STRICTENC", "OK", "AND, empty parameters"], | ["0 0", "AND 0 EQUAL", "P2SH,STRICTENC", "OK", "AND, empty parameters"], | ||||
["0x01 0x00 0x01 0x00", "AND 0x01 0x00 EQUAL", "P2SH,STRICTENC", "OK", "AND, simple and"], | ["0x01 0x00 0x01 0x00", "AND 0x01 0x00 EQUAL", "P2SH,STRICTENC", "OK", "AND, simple and"], | ||||
["1 0x01 0x00", "AND 0x01 0x00 EQUAL", "P2SH,STRICTENC", "OK", "AND, simple and"], | ["1 0x01 0x00", "AND 0x01 0x00 EQUAL", "P2SH,STRICTENC", "OK", "AND, simple and"], | ||||
["0x01 0x00 1", "AND 0x01 0x00 EQUAL", "P2SH,STRICTENC", "OK", "AND, simple and"], | ["0x01 0x00 1", "AND 0x01 0x00 EQUAL", "P2SH,STRICTENC", "OK", "AND, simple and"], | ||||
["1 1", "AND 1 EQUAL", "P2SH,STRICTENC", "OK", "AND, simple and"], | ["1 1", "AND 1 EQUAL", "P2SH,STRICTENC", "OK", "AND, simple and"], | ||||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
["1", "NOP10", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "DISCOURAGE_UPGRADABLE_NOPS"], | ["1", "NOP10", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "DISCOURAGE_UPGRADABLE_NOPS"], | ||||
["NOP10", "1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP10 in scriptSig"], | ["NOP10", "1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP10 in scriptSig"], | ||||
["1 0x01 0xb9", "HASH160 0x14 0x15727299b05b45fdaf9ac9ecf7565cfe27c3e567 EQUAL", | ["1 0x01 0xb9", "HASH160 0x14 0x15727299b05b45fdaf9ac9ecf7565cfe27c3e567 EQUAL", | ||||
"P2SH,DISCOURAGE_UPGRADABLE_NOPS", "DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP10 in redeemScript"], | "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP10 in redeemScript"], | ||||
["0x50","1", "P2SH,STRICTENC", "BAD_OPCODE", "opcode 0x50 is reserved"], | ["0x50","1", "P2SH,STRICTENC", "BAD_OPCODE", "opcode 0x50 is reserved"], | ||||
["1", "IF 0xba ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE", "opcodes >= FIRST_UNDEFINED_OP_VALUE invalid if executed"], | ["1", "IF 0xbc ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE", "opcodes >= FIRST_UNDEFINED_OP_VALUE invalid if executed"], | ||||
["1", "IF 0xbb ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | |||||
["1", "IF 0xbc ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | |||||
["1", "IF 0xbd ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ["1", "IF 0xbd ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ||||
["1", "IF 0xbe ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ["1", "IF 0xbe ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ||||
["1", "IF 0xbf ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ["1", "IF 0xbf ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ||||
["1", "IF 0xc0 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ["1", "IF 0xc0 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ||||
["1", "IF 0xc1 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ["1", "IF 0xc1 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ||||
["1", "IF 0xc2 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ["1", "IF 0xc2 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ||||
["1", "IF 0xc3 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ["1", "IF 0xc3 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ||||
["1", "IF 0xc4 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ["1", "IF 0xc4 ELSE 1 ENDIF", "P2SH,STRICTENC", "BAD_OPCODE"], | ||||
▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | |||||
["NOP1","NOP10", "P2SH,STRICTENC", "EVAL_FALSE"], | ["NOP1","NOP10", "P2SH,STRICTENC", "EVAL_FALSE"], | ||||
["1","VER", "P2SH,STRICTENC", "BAD_OPCODE", "OP_VER is reserved"], | ["1","VER", "P2SH,STRICTENC", "BAD_OPCODE", "OP_VER is reserved"], | ||||
["1","VERIF", "P2SH,STRICTENC", "BAD_OPCODE", "OP_VERIF is reserved"], | ["1","VERIF", "P2SH,STRICTENC", "BAD_OPCODE", "OP_VERIF is reserved"], | ||||
["1","VERNOTIF", "P2SH,STRICTENC", "BAD_OPCODE", "OP_VERNOTIF is reserved"], | ["1","VERNOTIF", "P2SH,STRICTENC", "BAD_OPCODE", "OP_VERNOTIF is reserved"], | ||||
["1","RESERVED", "P2SH,STRICTENC", "BAD_OPCODE", "OP_RESERVED is reserved"], | ["1","RESERVED", "P2SH,STRICTENC", "BAD_OPCODE", "OP_RESERVED is reserved"], | ||||
["1","RESERVED1", "P2SH,STRICTENC", "BAD_OPCODE", "OP_RESERVED1 is reserved"], | ["1","RESERVED1", "P2SH,STRICTENC", "BAD_OPCODE", "OP_RESERVED1 is reserved"], | ||||
["1","RESERVED2", "P2SH,STRICTENC", "BAD_OPCODE", "OP_RESERVED2 is reserved"], | ["1","RESERVED2", "P2SH,STRICTENC", "BAD_OPCODE", "OP_RESERVED2 is reserved"], | ||||
["1","0xba", "P2SH,STRICTENC", "BAD_OPCODE", "0xba == FIRST_UNDEFINED_OP_VALUE"], | ["1","0xbc", "P2SH,STRICTENC", "BAD_OPCODE", "0xbc == FIRST_UNDEFINED_OP_VALUE"], | ||||
["2147483648", "1ADD 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do math on 5-byte integers"], | ["2147483648", "1ADD 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do math on 5-byte integers"], | ||||
["2147483648", "NEGATE 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do math on 5-byte integers"], | ["2147483648", "NEGATE 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do math on 5-byte integers"], | ||||
["-2147483648", "1ADD 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "Because we use a sign bit, -2147483648 is also 5 bytes"], | ["-2147483648", "1ADD 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "Because we use a sign bit, -2147483648 is also 5 bytes"], | ||||
["2147483647", "1ADD 1SUB 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do math on 5-byte integers, even if the result is 4-bytes"], | ["2147483647", "1ADD 1SUB 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do math on 5-byte integers, even if the result is 4-bytes"], | ||||
["2147483648", "1SUB 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do math on 5-byte integers, even if the result is 4-bytes"], | ["2147483648", "1SUB 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do math on 5-byte integers, even if the result is 4-bytes"], | ||||
["2147483648 1", "BOOLOR 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do BOOLOR on 5-byte integers (but we can still do IF etc)"], | ["2147483648 1", "BOOLOR 1", "P2SH,STRICTENC", "UNKNOWN_ERROR", "We cannot do BOOLOR on 5-byte integers (but we can still do IF etc)"], | ||||
▲ Show 20 Lines • Show All 983 Lines • Show Last 20 Lines |