|
| 1 | +# JAM Codec Test Vectors |
| 2 | + |
| 3 | +The test vectors are provided with a corresponding JSON file that describes |
| 4 | +their content. |
| 5 | + |
| 6 | +## Comparison with SCALE |
| 7 | + |
| 8 | +The JAM Codec closely resembles the SCALE encoding format, with the primary |
| 9 | +difference being in the encoding of *"compact"* integers. Currently, this |
| 10 | +difference only applies to the encoding of the length of variable-length |
| 11 | +sequences. |
| 12 | + |
| 13 | +For detailed information, please refer to Appendix C of the GP. |
| 14 | + |
| 15 | +## ⚠️ Correctness |
| 16 | + |
| 17 | +These test vectors are designed to be syntactically correct only. |
| 18 | + |
| 19 | +The content within the vectors is largely populated with random data, and the |
| 20 | +constraints specified by the GP are intentionally not adhered to. As a result, |
| 21 | +some vectors may contain entries that conflict with the protocol rules. |
| 22 | + |
| 23 | +This is by design and is not relevant for the purpose of testing the codec's |
| 24 | +handling of the data structures required by the protocol. |
| 25 | + |
| 26 | +Protocol logic constraints are validated through dedicated STF test vectors and |
| 27 | +any other future vectors focused on logic testing. |
| 28 | + |
| 29 | +## Vectors |
| 30 | + |
| 31 | +- [refine_context](data/refine_context.json) |
| 32 | + |
| 33 | +- [work_item](data/work_item.json) |
| 34 | + |
| 35 | +- [work_package](data/work_package.json) |
| 36 | + |
| 37 | +- [work_result_0](data/work_result_0.json) |
| 38 | + |
| 39 | +- [work_result_1](data/work_result_1.json) |
| 40 | + |
| 41 | +- [work_report](data/work_report.json) |
| 42 | + |
| 43 | +- [tickets_extrinsic](data/tickets_extrinsic.json) |
| 44 | + |
| 45 | +- [disputes_extrinsic](data/disputes_extrinsic.json) |
| 46 | + |
| 47 | +- [preimages_extrinsic](data/preimages_extrinsic.json) |
| 48 | + |
| 49 | +- [assurance_extrinsic](data/assurances_extrinsic.json) |
| 50 | + |
| 51 | +- [guarantees_extrinsic](data/guarantees_extrinsic.json) |
| 52 | + |
| 53 | +- [header_0](data/header_0.json) |
| 54 | + |
| 55 | +- [header_1](data/header_1.json) |
| 56 | + |
| 57 | +- [extrinsic](data/extrinsic.json) |
| 58 | + |
| 59 | +- [block](data/block.json) |
0 commit comments