You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -57,7 +57,7 @@ test('bch_vmb_tests.json is up to date and contains no test ID collisions', asyn
57
57
t.deepEqual(
58
58
allTestCases,
59
59
vmbTestsBchJson,
60
-
'New test definitions were added to `bch-vmb.tests.ts`, but the generated tests were not updated. Run "yarn gen:vmb-tests" to correct this issue. (Note: tsc watch tasks don\'t always update cached JSON imports when the source file changes. You may need to restart tsc to clear this error after re-generating tests.)',
60
+
'New test definitions were added to `bch-vmb.tests.ts`, but the generated tests were not updated. Run "yarn gen:vmb_tests" to correct this issue. (Note: tsc watch tasks don\'t always update cached JSON imports when the source file changes. You may need to restart tsc to clear this error after re-generating tests.)',
Copy file name to clipboardexpand all lines: src/lib/vmb-tests/readme.md
+8-7
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,13 @@ Like the C++ implementation's [`script_tests.json`](../vm/instruction-sets/xec/f
12
12
13
13
Each VMB test is an array including:
14
14
15
-
- A short, unique identifier for the test (based on the hash of the test contents)
16
-
- A string describing the purpose/behavior of the test
17
-
- The unlocking script under test (disassembled, i.e. human-readable)
18
-
- The locking script under test (disassembled)
19
-
- The full, encoded test transaction
20
-
- An encoded list of unspent transaction outputs (UTXOs) with which to verify the test transaction (ordered to match the input order of the test transaction)
15
+
0.**`shortId`** - A short, unique identifier for the test (based on the hash of the test contents)
16
+
1.**`testDescription`** - A string describing the purpose/behavior of the test
17
+
2.**`unlockingScriptAsm`** - The unlocking script under test (disassembled, i.e. human-readable)
18
+
3.**`redeemOrLockingScriptAsm`** - The locking script under test (disassembled)
19
+
4.**`testTransactionHex`** - The full, encoded test transaction
20
+
5.**`sourceOutputsHex`** - An encoded list of unspent transaction outputs (UTXOs) with which to verify the test transaction (ordered to match the input order of the test transaction)
21
+
6.**`inputIndex` (default: `0`)** - The input index of the primary input under test (evaluating the scripts from array index `2` and `3` above); if not specified, the primary input under test is input `0`.
21
22
22
23
Every test vector in each VM's master test file (e.g. [`bch_vmb_tests.json`](./generated/bch_vmb_tests.json)) also includes a list of labels indicating the VM configurations for which the test vector applies. This master test file is automatically broken up into a variety of smaller, single-configuration test files for easier use (e.g. [`bch_vmb_tests_2025_standard.json`](./generated/bch_vmb_tests_2025_standard.json)).
23
24
@@ -53,4 +54,4 @@ For an example of VMB test usage, see [`bch-vmb-tests.spec.ts`](./bch-vmb-tests.
53
54
54
55
### Generating VMB Tests
55
56
56
-
Libauth's VMB tests are generated by the `yarn gen:vmb-tests` package script and committed to the repo. (Libauth's continuous integration tests also ensure that VMB tests remain up to date and passing on Libauth's VM implementations.)
57
+
Libauth's VMB tests are generated by the `yarn gen:vmb_tests` package script and committed to the repo. (Libauth's continuous integration tests also ensure that VMB tests remain up to date and passing on Libauth's VM implementations.)
0 commit comments