Skip to content

Commit 4efa3fb

Browse files
committed
Commit BCH_2026 tests
1 parent 3075c46 commit 4efa3fb

File tree

52 files changed

+681
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+681
-24
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ src/lib/vmb-tests/export
1717
src/lib/vmb-tests/generated/.vmb-*
1818
src/lib/vmb-tests/generated/**/*bench.csv
1919
src/lib/vmb-tests/generated/bch_chip_*
20-
src/lib/vmb-tests/generated/bch_2026_*
2120

2221
src/lib/bin/**/*.html
2322
src/lib/bin/**/*.js

src/lib/vm/instruction-sets/bch/2026/bch-2026-descriptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { OpcodeDescriptionsBch2023 } from '../2023/bch-2023-descriptions.js';
55
* beyond those present in `BCH_2025_05`.
66
*/
77
export enum OpcodeDescriptionsBch2026Additions {
8-
OP_EVAL = 'Pop the top item from the stack as bytecode. Preserve the active bytecode at the top of the control stack, then evaluate the bytecode as if it were the active bytecode (without modifying the stack, alternate stack, or other evaluation context). When the evaluation is complete, restore the original bytecode and continue evaluation after the OP_EVAL instruction. If the bytecode is malformed, error.',
8+
OP_EVAL = 'Pop the top item from the stack as bytecode. Preserve the active bytecode at the top of the control stack, then evaluate the stack-provided bytecode as if it were the active bytecode (without modifying the stack, alternate stack, or other evaluation context). When the evaluation is complete, restore the original bytecode and continue evaluation after the OP_EVAL instruction. If the bytecode is malformed, error.',
99
OP_BEGIN = 'Push the current instruction pointer index to the control stack as an integer (to be read by OP_UNTIL).',
1010
OP_UNTIL = 'Pop the top item from the control stack (if the control value is not an integer, error). Add the difference between the control value and the current instruction pointer index to the repeated bytes counter, if the sum of the repeated bytes counter and the active bytecode length is greater than the maximum bytecode length, error. Pop the top item from the stack, if the value is not truthy, move the instruction pointer to the control value (and re-evaluate the OP_BEGIN).',
1111
}

src/lib/vmb-tests/generated/bch_2025_invalid/chip.eval.nonstandard_limits.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@
1717
"05fpsr":[309,247200,465,"OP_EVAL: Control stack limited to depth of 100 (nonP2SH)"],
1818
"4xfv3c":[311,248800,1035,"OP_EVAL: Control stack limited to depth of 100 (P2SH20)"],
1919
"c8frkn":[311,248800,1059,"OP_EVAL: Control stack limited to depth of 100 (P2SH32)"],
20-
"g3u8du":[41,32800,685,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (nonP2SH)"],
21-
"4cvzpw":[335,268000,1801,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH20)"],
22-
"9782kk":[335,268000,1825,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH32)"],
23-
"ekqyxw":[41,32800,687,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (nonP2SH)"],
24-
"sqwlkq":[337,269600,1805,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (P2SH20)"],
25-
"ltlhp7":[337,269600,1829,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (P2SH32)"],
20+
"g3u8du":[41,32800,685,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, \"OP_1\" at 100 (nonP2SH)"],
21+
"4cvzpw":[335,268000,1801,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, \"OP_1\" at 100 (P2SH20)"],
22+
"9782kk":[335,268000,1825,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, \"OP_1\" at 100 (P2SH32)"],
23+
"ekqyxw":[41,32800,687,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"<OP_1> OP_EVAL\" at 100 (nonP2SH)"],
24+
"sqwlkq":[337,269600,1805,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"<OP_1> OP_EVAL\" at 100 (P2SH20)"],
25+
"ltlhp7":[337,269600,1829,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"<OP_1> OP_EVAL\" at 100 (P2SH32)"],
26+
"t0rx6q":[41,32800,687,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"OP_1 OP_0 OP_EVAL\" (evaluation of empty bytecode) at 100 (nonP2SH)"],
27+
"x55fkv":[337,269600,1805,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"OP_1 OP_0 OP_EVAL\" (evaluation of empty bytecode) at 100 (P2SH20)"],
28+
"2wcdcd":[337,269600,1829,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"OP_1 OP_0 OP_EVAL\" (evaluation of empty bytecode) at 100 (P2SH32)"],
2629
"unhdgg":[47,37600,205,"OP_EVAL: ((2 2 +)) 4 = (nonP2SH)"],
2730
"k0n4m0":[51,40800,777,"OP_EVAL: ((2 2 +)) 4 = (P2SH20)"],
2831
"htr8ly":[51,40800,801,"OP_EVAL: ((2 2 +)) 4 = (P2SH32)"],

src/lib/vmb-tests/generated/bch_2025_invalid/chip.eval.nonstandard_results.json

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"ekqyxw":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
2424
"sqwlkq":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
2525
"ltlhp7":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
26+
"t0rx6q":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
27+
"x55fkv":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
28+
"2wcdcd":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
2629
"unhdgg":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
2730
"k0n4m0":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
2831
"htr8ly":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",

src/lib/vmb-tests/generated/bch_2025_invalid/chip.eval.nonstandard_stats.csv

+12-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,18 @@ c8frkn,"OP_EVAL: Control stack limited to depth of 100 (P2SH32)",483,79,2,1,311,
2020
g3u8du,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (nonP2SH)",211,337,2,1,41,32800,685,1,0,143,0,4,285,0
2121
4cvzpw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH20)",507,67,2,1,335,268000,1801,8,0,1172,6,8,617,0
2222
9782kk,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH32)",507,79,2,1,335,268000,1825,8,0,1172,6,8,641,0
23-
ekqyxw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (nonP2SH)",211,339,2,1,41,32800,687,1,0,143,0,4,287,0
24-
sqwlkq,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (P2SH20)",509,67,2,1,337,269600,1805,8,0,1179,6,8,621,0
25-
ltlhp7,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (P2SH32)",509,79,2,1,337,269600,1829,8,0,1179,6,8,645,0
23+
g3u8du,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (nonP2SH)",211,337,2,1,41,32800,685,1,0,143,0,4,285,0
24+
4cvzpw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH20)",507,67,2,1,335,268000,1801,8,0,1172,6,8,617,0
25+
9782kk,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH32)",507,79,2,1,335,268000,1825,8,0,1172,6,8,641,0
26+
g3u8du,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, "OP_1" at 100 (nonP2SH)",211,337,2,1,41,32800,685,1,0,143,0,4,285,0
27+
4cvzpw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, "OP_1" at 100 (P2SH20)",507,67,2,1,335,268000,1801,8,0,1172,6,8,617,0
28+
9782kk,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, "OP_1" at 100 (P2SH32)",507,79,2,1,335,268000,1825,8,0,1172,6,8,641,0
29+
ekqyxw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "<OP_1> OP_EVAL" at 100 (nonP2SH)",211,339,2,1,41,32800,687,1,0,143,0,4,287,0
30+
sqwlkq,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "<OP_1> OP_EVAL" at 100 (P2SH20)",509,67,2,1,337,269600,1805,8,0,1179,6,8,621,0
31+
ltlhp7,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "<OP_1> OP_EVAL" at 100 (P2SH32)",509,79,2,1,337,269600,1829,8,0,1179,6,8,645,0
32+
t0rx6q,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "OP_1 OP_0 OP_EVAL" (evaluation of empty bytecode) at 100 (nonP2SH)",211,339,2,1,41,32800,687,1,0,143,0,4,287,0
33+
x55fkv,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "OP_1 OP_0 OP_EVAL" (evaluation of empty bytecode) at 100 (P2SH20)",509,67,2,1,337,269600,1805,8,0,1179,6,8,621,0
34+
2wcdcd,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "OP_1 OP_0 OP_EVAL" (evaluation of empty bytecode) at 100 (P2SH32)",509,79,2,1,337,269600,1829,8,0,1179,6,8,645,0
2635
unhdgg,"OP_EVAL: ((2 2 +)) 4 = (nonP2SH)",217,47,2,1,47,37600,205,1,0,164,0,2,5,0
2736
k0n4m0,"OP_EVAL: ((2 2 +)) 4 = (P2SH20)",221,67,2,1,51,40800,777,1,0,178,2,6,49,0
2837
htr8ly,"OP_EVAL: ((2 2 +)) 4 = (P2SH32)",221,79,2,1,51,40800,801,1,0,178,2,6,73,0

src/lib/vmb-tests/generated/bch_2025_invalid/chip.eval.standard_limits.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@
1717
"05fpsr":[309,247200,465,"OP_EVAL: Control stack limited to depth of 100 (nonP2SH)"],
1818
"4xfv3c":[311,248800,1291,"OP_EVAL: Control stack limited to depth of 100 (P2SH20)"],
1919
"c8frkn":[311,248800,1315,"OP_EVAL: Control stack limited to depth of 100 (P2SH32)"],
20-
"g3u8du":[41,32800,685,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (nonP2SH)"],
21-
"4cvzpw":[335,268000,2569,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH20)"],
22-
"9782kk":[335,268000,2593,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH32)"],
23-
"ekqyxw":[41,32800,687,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (nonP2SH)"],
24-
"sqwlkq":[337,269600,2573,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (P2SH20)"],
25-
"ltlhp7":[337,269600,2597,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (P2SH32)"],
20+
"g3u8du":[41,32800,685,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, \"OP_1\" at 100 (nonP2SH)"],
21+
"4cvzpw":[335,268000,2569,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, \"OP_1\" at 100 (P2SH20)"],
22+
"9782kk":[335,268000,2593,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, \"OP_1\" at 100 (P2SH32)"],
23+
"ekqyxw":[41,32800,687,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"<OP_1> OP_EVAL\" at 100 (nonP2SH)"],
24+
"sqwlkq":[337,269600,2573,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"<OP_1> OP_EVAL\" at 100 (P2SH20)"],
25+
"ltlhp7":[337,269600,2597,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"<OP_1> OP_EVAL\" at 100 (P2SH32)"],
26+
"t0rx6q":[41,32800,687,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"OP_1 OP_0 OP_EVAL\" (evaluation of empty bytecode) at 100 (nonP2SH)"],
27+
"x55fkv":[337,269600,2573,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"OP_1 OP_0 OP_EVAL\" (evaluation of empty bytecode) at 100 (P2SH20)"],
28+
"2wcdcd":[337,269600,2597,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt \"OP_1 OP_0 OP_EVAL\" (evaluation of empty bytecode) at 100 (P2SH32)"],
2629
"unhdgg":[47,37600,205,"OP_EVAL: ((2 2 +)) 4 = (nonP2SH)"],
2730
"k0n4m0":[51,40800,1033,"OP_EVAL: ((2 2 +)) 4 = (P2SH20)"],
2831
"htr8ly":[51,40800,1057,"OP_EVAL: ((2 2 +)) 4 = (P2SH32)"],

src/lib/vmb-tests/generated/bch_2025_invalid/chip.eval.standard_results.json

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"ekqyxw":"Unable to verify standard transaction: standard transactions may only spend standard output types. Source output 1 is non-standard: locking bytecode does not match a standard pattern: P2PKH, P2PK, P2SH, P2MS, or arbitrary data (OP_RETURN).",
2424
"sqwlkq":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
2525
"ltlhp7":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
26+
"t0rx6q":"Unable to verify standard transaction: standard transactions may only spend standard output types. Source output 1 is non-standard: locking bytecode does not match a standard pattern: P2PKH, P2PK, P2SH, P2MS, or arbitrary data (OP_RETURN).",
27+
"x55fkv":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
28+
"2wcdcd":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
2629
"unhdgg":"Unable to verify standard transaction: standard transactions may only spend standard output types. Source output 1 is non-standard: locking bytecode does not match a standard pattern: P2PKH, P2PK, P2SH, P2MS, or arbitrary data (OP_RETURN).",
2730
"k0n4m0":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",
2831
"htr8ly":"Unable to verify transaction: error in evaluating input index 1: Program called an unassigned, reserved operation.",

src/lib/vmb-tests/generated/bch_2025_invalid/chip.eval.standard_stats.csv

+12-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,18 @@ c8frkn,"OP_EVAL: Control stack limited to depth of 100 (P2SH32)",483,79,2,1,311,
2020
g3u8du,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (nonP2SH)",211,337,2,1,41,32800,685,1,0,20,0,4,285,0
2121
4cvzpw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH20)",507,67,2,1,335,268000,2569,8,0,167,6,8,617,0
2222
9782kk,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH32)",507,79,2,1,335,268000,2593,8,0,167,6,8,641,0
23-
ekqyxw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (nonP2SH)",211,339,2,1,41,32800,687,1,0,20,0,4,287,0
24-
sqwlkq,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (P2SH20)",509,67,2,1,337,269600,2573,8,0,168,6,8,621,0
25-
ltlhp7,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt OP_EVAL at 100 (P2SH32)",509,79,2,1,337,269600,2597,8,0,168,6,8,645,0
23+
g3u8du,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (nonP2SH)",211,337,2,1,41,32800,685,1,0,20,0,4,285,0
24+
4cvzpw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH20)",507,67,2,1,335,268000,2569,8,0,167,6,8,617,0
25+
9782kk,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100 (P2SH32)",507,79,2,1,335,268000,2593,8,0,167,6,8,641,0
26+
g3u8du,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, "OP_1" at 100 (nonP2SH)",211,337,2,1,41,32800,685,1,0,20,0,4,285,0
27+
4cvzpw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, "OP_1" at 100 (P2SH20)",507,67,2,1,335,268000,2569,8,0,167,6,8,617,0
28+
9782kk,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, "OP_1" at 100 (P2SH32)",507,79,2,1,335,268000,2593,8,0,167,6,8,641,0
29+
ekqyxw,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "<OP_1> OP_EVAL" at 100 (nonP2SH)",211,339,2,1,41,32800,687,1,0,20,0,4,287,0
30+
sqwlkq,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "<OP_1> OP_EVAL" at 100 (P2SH20)",509,67,2,1,337,269600,2573,8,0,168,6,8,621,0
31+
ltlhp7,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "<OP_1> OP_EVAL" at 100 (P2SH32)",509,79,2,1,337,269600,2597,8,0,168,6,8,645,0
32+
t0rx6q,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "OP_1 OP_0 OP_EVAL" (evaluation of empty bytecode) at 100 (nonP2SH)",211,339,2,1,41,32800,687,1,0,20,0,4,287,0
33+
x55fkv,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "OP_1 OP_0 OP_EVAL" (evaluation of empty bytecode) at 100 (P2SH20)",509,67,2,1,337,269600,2573,8,0,168,6,8,621,0
34+
2wcdcd,"OP_EVAL: Nesting with OP_IF/OP_ENDIF to depth 100, attempt "OP_1 OP_0 OP_EVAL" (evaluation of empty bytecode) at 100 (P2SH32)",509,79,2,1,337,269600,2597,8,0,168,6,8,645,0
2635
unhdgg,"OP_EVAL: ((2 2 +)) 4 = (nonP2SH)",217,47,2,1,47,37600,205,1,0,23,0,2,5,0
2736
k0n4m0,"OP_EVAL: ((2 2 +)) 4 = (P2SH20)",221,67,2,1,51,40800,1033,1,0,25,2,6,49,0
2837
htr8ly,"OP_EVAL: ((2 2 +)) 4 = (P2SH32)",221,79,2,1,51,40800,1057,1,0,25,2,6,73,0

0 commit comments

Comments
 (0)