|
1 | | -# Test Vectors for the JAM Protocol |
| 1 | +# Test Vectors for the JAM Protocol (0.6.7) |
2 | 2 |
|
3 | | -## Codec |
4 | | - |
5 | | -- [Codec](./codec/README.md) |
6 | | - |
7 | | -## Erasure Coding |
| 3 | +## Classes |
8 | 4 |
|
| 5 | +- [Codec](./codec/README.md) |
9 | 6 | - [Erasure Coding](./erasure/README.md) |
| 7 | +- [State Transition Function](./stf/README.md) |
| 8 | +- [Block Import Traces](./traces/README.md) |
10 | 9 |
|
11 | | -## State Transition Functions |
12 | | - |
13 | | -We offer two types of test vectors: |
14 | | - |
15 | | -- **Tiny**: designed for quick adjustments and prototyping, with reduced |
16 | | - - validators count: 6 |
17 | | - - cores count: 2 |
18 | | - - epoch period: 12 |
19 | | - - core assignment rotation period: 4 |
20 | | - - ticket attempts: 3 |
21 | | - |
22 | | -- **Full**: vectors with production specs |
23 | | - - validators count: 1023 |
24 | | - - cores count: 341 |
25 | | - - epoch period: 600 |
26 | | - - core assignment rotation period: 10 |
27 | | - - ticket attempts: 2 |
28 | | - |
29 | | -For more information refer to the community [docs](https://docs.jamcha.in/basics/chain-spec). |
30 | | - |
31 | | -### STF Output |
32 | | - |
33 | | -Technically, the STF execution process does not inherently produce auxiliary |
34 | | -outputs beyond the success or failure result. In this context, we propose |
35 | | -an extension to include additional information that may be beneficial for |
36 | | -implementors or useful for executing other subsystems reliant on values |
37 | | -generated post-STF execution. |
38 | | - |
39 | | -When the error or success values are not pertinent to your test vector |
40 | | -processing procedures, you may disregard them as necessary. |
41 | | - |
42 | | -A mapping of error code semantics is provided within the ASN.1 schema for each |
43 | | -specific subsystem. |
44 | | - |
45 | | -### Vectors |
| 10 | +## Binary To JSON |
46 | 11 |
|
47 | | -- [Safrole](./stf/safrole/README.md) |
48 | | -- [Disputes](./stf/disputes/README.md) |
49 | | -- [History](./stf/history/README.md) |
50 | | -- [Assurances](./stf/assurances/README.md) |
51 | | -- [Reports](./stf/reports/README.md) |
52 | | -- [Statistics](./stf/statistics/README.md) |
53 | | -- [Authorizations](./stf/authorizations/README.md) |
54 | | -- [Preimages](./stf/preimages/README.md) |
55 | | -- [Accumulate](./stf/accumulate/README.md) |
| 12 | +The repository binary test vector files can be converted to their JSON |
| 13 | +equivalents for easier inspection and debugging. Use the provided conversion |
| 14 | +script to transform binary files into human-readable JSON format: |
56 | 15 |
|
57 | | -## Block Import Traces |
| 16 | +```bash |
| 17 | +./scripts/convert-all.sh |
| 18 | +``` |
58 | 19 |
|
59 | | -- [Fallback](./traces/fallback): fallback block authoring, no-safrole, no-work-reports |
60 | | -- [Safrole](./traces/safrole): safrole block authoring, no-work-reports |
61 | | -- [Work Reports L0](./traces/reports-l0): basic work reports, no-safrole |
| 20 | +This script requires the [jam-types](https://github.com/davxy/jam-types-py) |
| 21 | +Python library to be installed. |
62 | 22 |
|
63 | | -## Vectors Validation |
| 23 | +## Validation |
64 | 24 |
|
65 | 25 | Validation scripts are included to verify the JSON files against the expected |
66 | 26 | ASN.1 syntax provided with the test vectors. These scripts currently rely on my |
67 | 27 | [asn1tools](https://github.com/davxy/asn1tools) fork. |
68 | 28 |
|
69 | | -## Binary To JSON |
| 29 | +```bash |
| 30 | +./scripts/validate-all.sh.sh |
| 31 | +``` |
70 | 32 |
|
71 | | -The repository binary test vector files can be converted to their JSON |
72 | | -equivalents for easier inspection and debugging. Use the provided conversion |
73 | | -script to transform binary files into human-readable JSON format: |
| 33 | +## Chainspec Parameters |
74 | 34 |
|
75 | | -```bash |
76 | | -./scripts/convert-all.sh |
| 35 | +For more information refer to the community [docs](https://docs.jamcha.in/basics/chain-spec). |
| 36 | + |
| 37 | +### Tiny |
| 38 | + |
| 39 | +```yaml |
| 40 | +chain: tiny |
| 41 | +num_validators: 6 |
| 42 | +num_cores: 2 |
| 43 | +preimage_expunge_period: 32 |
| 44 | +slot_duration: 6 |
| 45 | +epoch_duration: 12 |
| 46 | +contest_duration: 10 |
| 47 | +tickets_per_validator: 3 |
| 48 | +max_tickets_per_extrinsic: 3 |
| 49 | +rotation_period: 4 |
| 50 | +num_ec_pieces_per_segment: 1026 |
| 51 | +max_block_gas: 20000000 |
| 52 | +max_refine_gas: 1000000000 |
77 | 53 | ``` |
78 | 54 |
|
79 | | -This conversion script requires the [jam-types](https://github.com/davxy/jam-types) |
80 | | -Python library to be installed. |
| 55 | +### Full |
| 56 | +
|
| 57 | +All parameters here must match the Gray Paper. |
| 58 | +
|
| 59 | +```yaml |
| 60 | +chain: full |
| 61 | +num_validators: 1023 |
| 62 | +num_cores: 341 |
| 63 | +preimage_expunge_period: 19200 |
| 64 | +slot_duration: 6 |
| 65 | +epoch_duration: 600 |
| 66 | +contest_duration: 500 |
| 67 | +tickets_per_validator: 2 |
| 68 | +max_tickets_per_extrinsic: 16 |
| 69 | +rotation_period: 10 |
| 70 | +num_ec_pieces_per_segment: 6 |
| 71 | +max_block_gas: 3500000000 |
| 72 | +max_refine_gas: 5000000000 |
| 73 | +``` |
0 commit comments