diff --git a/bip-0379.md b/bip-0379.md index de48af2ccc..a895928711 100644 --- a/bip-0379.md +++ b/bip-0379.md @@ -393,7 +393,75 @@ paths hit any of the limits. ## Test Vectors -TBD +### Conventions + +One vector per line, no comments. `*.txt` is space separated, `*.tsv` tab +separated. Expressions contain no whitespace. A key argument is a letter +`A`..`Z` standing for the public key of the secret key `0x00…01` … `0x00…1a`, +serialized compressed in P2WSH and x-only in Tapscript. Hash arguments are +literal hex. A type string is the basic type (`B`/`V`/`K`/`W`) plus its +properties (`zondumsfe`) in arbitrary order, so compare sorted. Files with a +`_tap` suffix are Tapscript (`multi_a`, x-only, Schnorr), the others P2WSH. + +### Files + +| File | Lines | Line format | Asserts | +|------|-------|-------------|---------| +| `valid_from_alloy.txt` | 5,896 | ` ` | parses, is a valid top level, has that type | +| `valid_8f1e8_from_alloy.txt` | 3,492 | same | same, corpus of an earlier upstream revision | +| `malleable_from_alloy.txt` | 7,024 | same | parses, but has no `m` property, i.e. is not sane | +| `conflict_from_alloy.txt` | 1,773 | same | parses, but mixes timelock kinds on one path | +| `edge_cases.txt` | 42 | `` | the only hand-written file: `thresh` at `k=1`/`k=n`, `multi` with 1 and 20 keys, all four hash fragments, the timelock boundaries (`499999999`/`500000000`, `4194304`/`4194305`), and the sugar forms | +| `invalid.txt` | 5,574 | `` | must be rejected (mostly type-check failures) | +| `opcodes.txt` | 18,184 | ` ` | as above, plus the max ops of a satisfaction, i.e. the quantity the 201-op limit bounds | +| `props_from_rust[_tap].tsv` | 8,198 + header | `expr script_size op_count sat_witness_elements exec_stack mixed_timelocks non_malleable requires_sig sat_size` | the whole static analysis: type system, timelock mixing, all four resource limits. A two-field row ending in `PARSE_ERR` must be rejected (1,470 of them in the Tapscript file, from the `multi`→`multi_a` substitution) | +| `scripts_from_rust[_tap].tsv` | 8,198 | `\t