Skip to content

Commit 553ba30

Browse files
authored
Merge pull request #14 from davxy/improve-readme
Improve READMEs
2 parents ac013b0 + 123218c commit 553ba30

File tree

11 files changed

+47
-170
lines changed

11 files changed

+47
-170
lines changed

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,44 @@
22

33
JAM protocol version 0.6.1
44

5-
## Index
6-
5+
## Codec
6+
77
- [Codec](./codec/README.md)
8+
9+
## State Transition Functions
10+
11+
We offer two types of test vectors:
12+
13+
- **Tiny**: designed for quick adjustments and prototyping, with reduced
14+
- validators count: 6
15+
- cores count: 2
16+
- epoch period: 12
17+
- core assignment rotation period: 4
18+
- ticket attempts: 3
19+
20+
- **Full**: vectors with production specs
21+
- validators count: 1023
22+
- cores count: 341
23+
- epoch period: 600
24+
- core assignment rotation period: 10
25+
- ticket attempts: 2
26+
27+
### STF Output
28+
29+
Technically, the STF execution process does not inherently produce auxiliary
30+
outputs beyond the success or failure result. In this context, we propose
31+
an extension to include additional information that may be beneficial for
32+
implementors or useful for executing other subsystems reliant on values
33+
generated post-STF execution.
34+
35+
When the error or success values are not pertinent to your test vector
36+
processing procedures, you may disregard them as necessary.
37+
38+
A mapping of error code semantics is provided within the ASN.1 schema for each
39+
specific subsystem.
40+
41+
### Vectors
42+
843
- [Safrole](./safrole/README.md)
944
- [Disputes](./disputes/README.md)
1045
- [History](./history/README.md)

accumulate/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Both JSON and SCALE formats conform to the JAM ASN.1 [schema](../jam-types-asn/jam-types.asn)
44
and this subsystem STF specific [schema](./accumulate.asn).
55

6-
### Test Service Code
6+
## Test Service Code
77

88
Test vectors invoke the `accumulate` method of the provided [test-service](./test-service).
99

assurances/README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
11
# Availability Assurances STF Test Vectors
22

3-
We offer two types of test vectors:
4-
5-
- Tiny: These are designed for quick adjustments and prototyping, with reduced validators (6)
6-
and cores count (2).
7-
- Full: These vectors use production validators (1023) and cores count (341)
8-
93
Both JSON and SCALE formats conform to the JAM ASN.1 [schema](../jam-types-asn/jam-types.asn)
104
and this subsystem STF specific [schema](./assurances.asn).
115

12-
## STF Output
13-
14-
Technically, the STF execution process does not inherently produce auxiliary
15-
outputs beyond the success or failure result. In this context, we propose
16-
an extension to include additional information that may be beneficial for
17-
implementors or useful for executing other subsystems reliant on values
18-
generated post-STF execution.
19-
20-
When the error or success values are not pertinent to your test vector
21-
processing procedures, you may disregard them as necessary.
22-
23-
A mapping of error code semantics is provided within the ASN.1 schema for this
24-
subsystem.
25-
266
## Tiny Vectors
277

288
- [no_assurances-1](tiny/no_assurances-1.json)🟢

authorizations/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Authorizations STF Test Vectors
22

3-
We offer two types of test vectors:
4-
5-
- Tiny: These are designed for quick adjustments and prototyping, with reduced cores count (2)
6-
- Full: These vectors use production cores count (341).
7-
83
Both JSON and SCALE formats conform to the JAM ASN.1 [schema](../jam-types-asn/jam-types.asn)
94
and this subsystem STF specific [schema](./authorizations.asn).
105

codec/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,17 @@ any other future vectors focused on logic testing.
4040
## Vectors
4141

4242
- [refine_context](data/refine_context.json)
43-
4443
- [work_item](data/work_item.json)
45-
4644
- [work_package](data/work_package.json)
47-
4845
- [work_result_0](data/work_result_0.json)
49-
5046
- [work_result_1](data/work_result_1.json)
51-
5247
- [work_report](data/work_report.json)
53-
5448
- [tickets_extrinsic](data/tickets_extrinsic.json)
55-
5649
- [disputes_extrinsic](data/disputes_extrinsic.json)
57-
5850
- [preimages_extrinsic](data/preimages_extrinsic.json)
59-
6051
- [assurance_extrinsic](data/assurances_extrinsic.json)
61-
6252
- [guarantees_extrinsic](data/guarantees_extrinsic.json)
63-
6453
- [header_0](data/header_0.json)
65-
6654
- [header_1](data/header_1.json)
67-
6855
- [extrinsic](data/extrinsic.json)
69-
7056
- [block](data/block.json)

disputes/README.md

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
11
# Disputes STF Test Vectors
22

3-
We offer two types of test vectors:
4-
5-
- Tiny: These are designed for quick adjustments and prototyping, with reduced validators (6)
6-
and a shorter epoch duration (12).
7-
- Full: These vectors use production validators count (1023) and epoch duration (600).
8-
93
Both JSON and SCALE formats conform to the JAM ASN.1 [schema](../jam-types-asn/jam-types.asn)
104
and this subsystem STF specific [schema](./disputes.asn).
115

12-
## STF Output
13-
14-
Technically, the STF execution process does not inherently produce auxiliary
15-
outputs beyond the success or failure result. In this context, we propose
16-
an extension to include additional information that may be beneficial for
17-
implementors or useful for executing other subsystems reliant on values
18-
generated post-STF execution.
19-
20-
When the error or success values are not pertinent to your test vector
21-
processing procedures, you may disregard them as necessary.
22-
23-
A mapping of error code semantics is provided within the ASN.1 schema for this
24-
subsystem.
25-
266
## Availability Assignments
277

288
Most tests use *null* entries for state availability assignments (*rho*).
@@ -33,79 +13,54 @@ tests that verify the invalidation of assignments following a verdict.
3313

3414
- [progress_with_no_verdicts-1](tiny/progress_with_no_verdicts.json) 🟢
3515
- No verdicts, nothing special happens
36-
3716
- [progress_with_verdicts-1](tiny/progress_with_verdicts-1.json) 🔴
3817
- Not sorted work reports within a verdict
39-
4018
- [progress_with_verdicts-2](tiny/progress_with_verdicts-2.json) 🔴
4119
- Not unique votes within a verdict
42-
4320
- [progress_with_verdicts-3](tiny/progress_with_verdicts-3.json) 🔴
4421
- Not sorted, valid verdicts
45-
4622
- [progress_with_verdicts-4](tiny/progress_with_verdicts-4.json) 🟢
4723
- Sorted, valid verdicts
48-
4924
- [progress_with_verdicts-5](tiny/progress_with_verdicts-5.json) 🔴
5025
- Not homogeneous judgements, but positive votes count is not correct
51-
5226
- [progress_with_verdicts-6](tiny/progress_with_verdicts-6.json) 🟢
5327
- Not homogeneous judgements, results in wonky verdict
54-
5528
- [progress_with_culprits-1](tiny/progress_with_culprits-1.json) 🔴
5629
- Missing culprits for bad verdict
57-
5830
- [progress_with_culprits-2](tiny/progress_with_culprits-2.json) 🔴
5931
- Single culprit for bad verdict
60-
6132
- [progress_with_culprits-3](tiny/progress_with_culprits-3.json) 🔴
6233
- Two culprits for bad verdict, not sorted
63-
6434
- [progress_with_culprits-4](tiny/progress_with_culprits-4.json) 🟢
6535
- Two culprits for bad verdict, sorted
66-
6736
- [progress_with_culprits-5](tiny/progress_with_culprits-5.json) 🔴
6837
- Report an already recorded verdict, with culprits
69-
7038
- [progress_with_culprits-6](tiny/progress_with_culprits-6.json) 🔴
7139
- Culprit offender already in the offenders list
72-
7340
- [progress_with_culprits-7](tiny/progress_with_culprits-7.json) 🔴
7441
- Offender relative to a not present verdict
75-
7642
- [progress_with_faults-1](tiny/progress_with_faults-1.json) 🔴
7743
- Missing faults for good verdict
78-
7944
- [progress_with_faults-2](tiny/progress_with_faults-2.json) 🟢
8045
- One fault offender for good verdict
81-
8246
- [progress_with_faults-3](tiny/progress_with_faults-3.json) 🔴
8347
- Two fault offenders for a good verdict, not sorted
84-
8548
- [progress_with_faults-4](tiny/progress_with_faults-4.json) 🟢
8649
- Two fault offenders for a good verdict, sorted
87-
8850
- [progress_with_faults-5](tiny/progress_with_faults-5.json) 🔴
8951
- Report an already recorded verdict, with faults
90-
9152
- [progress_with_faults-6](tiny/progress_with_faults-6.json) 🔴
9253
- Fault offender already in the offenders list
93-
9454
- [progress_with_faults-7](tiny/progress_with_faults-7.json) 🔴
9555
- Auditor marked as offender, but vote matches the verdict.
96-
9756
- [progress_invalidates_avail_assignments-1](tiny/progress_invalidates_avail_assignments-1.json) 🟢
9857
- Invalidation of availability assignments
99-
10058
- [progress_with_bad_signatures-1](tiny/progress_with_bad_signatures-1.json) 🔴
10159
- Bad signature within the verdict judgements
102-
10360
- [progress_with_bad_signatures-2](tiny/progress_with_bad_signatures-2.json) 🔴
10461
- Bad signature within the culprits sequence
105-
10662
- [progress_with_verdict_signatures_from_previous_set-1](tiny/progress_with_verdict_signatures_from_previous_set-1.json) 🟢
10763
- Use previous epoch validators set for verdict signatures verification
108-
10964
- [progress_with_verdict_signatures_from_previous_set-2](tiny/progress_with_verdict_signatures_from_previous_set-2.json) 🔴
11065
- Age too old for verdicts judgements
11166

history/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Blocks History STF Test Vectors
22

3-
Both JSON and SCALE formats conform to the specified ASN.1 schema provided [here](./history.asn).
4-
53
Both JSON and SCALE formats conform to the JAM ASN.1 [schema](../jam-types-asn/jam-types.asn)
64
and this subsystem STF specific [schema](./history.asn).
75

@@ -26,12 +24,9 @@ the input `accumulate_root`.
2624

2725
- [progress_blocks_history-1](data/progress_blocks_history-1.json) 🟢
2826
- Empty history queue.
29-
3027
- [progress_blocks_history-2](data/progress_blocks_history-2.json) 🟢
3128
- Not empty nor full history queue.
32-
3329
- [progress_blocks_history-3](data/progress_blocks_history-3.json) 🟢
3430
- Fill the history queue.
35-
3631
- [progress_blocks_history-4](data/progress_blocks_history-4.json) 🟢
3732
- Shift the history queue.

preimages/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
Both JSON and SCALE formats conform to the JAM ASN.1 [schema](../jam-types-asn/jam-types.asn)
44
and this subsystem STF specific [schema](./preimages.asn).
55

6-
## Services Accounts
7-
8-
TODO
9-
106
## Vectors
117

12-
TODO
8+
- [preimage_needed-1.json](./data/preimage_needed-1.json) 🟢
9+
- Nothing is provided.
10+
- [preimage_needed-2.json](./data/preimage_needed-2.json) 🟢
11+
- Provide one solicited blob.
12+
- [preimage_not_needed-1.json](./data/preimage_not_needed-1.json) 🔴
13+
- Provide two blobs, but one of them has not been solicited.
14+
- [preimage_not_needed-2.json](./data/preimage_not_needed-2.json) 🔴
15+
- Provide two blobs, but one of them has already been provided.

reports/README.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
11
# Work Reports STF Test Vectors
22

3-
We offer two types of test vectors:
4-
5-
- Tiny: These are designed for quick adjustments and prototyping, with reduced validators (6)
6-
cores count (2) and report core assignment rotation period (4).
7-
- Full: These vectors use production validators (1023), cores count (341) and report core
8-
assignment rotation period (10).
9-
103
Both JSON and SCALE formats conform to the JAM ASN.1 [schema](../jam-types-asn/jam-types.asn)
114
and this subsystem STF specific [schema](./reports.asn).
125

13-
## STF Output
14-
15-
Technically, the STF execution process does not inherently produce auxiliary
16-
outputs beyond the success or failure result. In this context, we propose
17-
an extension to include additional information that may be beneficial for
18-
implementors or useful for executing other subsystems reliant on values
19-
generated post-STF execution.
20-
21-
When the error or success values are not pertinent to your test vector
22-
processing procedures, you may disregard them as necessary.
23-
24-
A mapping of error code semantics is provided within the ASN.1 schema for this
25-
subsystem.
26-
276
## Tiny Vectors
287

298
- [report_curr_rotation](./tiny/report_curr_rotation-1.json) 🟢

0 commit comments

Comments
 (0)