Skip to content

Commit d8650a8

Browse files
committed
Emphasize: error codes are application specific and not defined by the GP
1 parent f030025 commit d8650a8

26 files changed

+45
-21
lines changed

safrole/README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,27 @@ Here are some key differences:
4040

4141
Most of these differences aim to provide a clear and concise protocol specification.
4242

43-
## Additional Notes
43+
## Error Output
4444

45-
- Error codes returned as output are not part of the specification. Feel free to ignore actual values.
46-
- On error, post-state must match pre-state.
45+
On STF (State Transition Function) execution error, post-state must match pre-state.
46+
47+
Possible error codes returned as output are not part of the specification,
48+
feel free to ignore actual numeric values.
49+
50+
A map for errors codes semantics used by for the test vectors is given in the ASN.1 schema.
4751

4852
## Tiny Vectors
4953

50-
- [enact-epoch-change-no-tickets-1.json](./tiny/enact-epoch-change-with-no-tickets-1.json)
54+
- [enact-epoch-change-with-no-tickets-1.json](./tiny/enact-epoch-change-with-no-tickets-1.json)
5155
- Progress by one slot.
5256
- Randomness accumulator is updated.
53-
- [enact-epoch-change-no-tickets-2.json](./tiny/enact-epoch-change-with-no-tickets-2.json)
57+
- [enact-epoch-change-with-no-tickets-2.json](./tiny/enact-epoch-change-with-no-tickets-2.json)
5458
- Progress from slot X to slot X.
5559
- Fail: Timeslot must be strictly monotonic.
56-
- [enact-epoch-change-no-tickets-3.json](./tiny/enact-epoch-change-with-no-tickets-3.json)
60+
- [enact-epoch-change-with-no-tickets-3.json](./tiny/enact-epoch-change-with-no-tickets-3.json)
5761
- Progress from a slot at the begin of the epoch to a slot in the epoch's tail.
5862
- Tickets mark is not generated (no enough tickets).
59-
- [enact-epoch-change-no-tickets-4.json](./tiny/enact-epoch-change-with-no-tickets-4.json)
63+
- [enact-epoch-change-with-no-tickets-4.json](./tiny/enact-epoch-change-with-no-tickets-4.json)
6064
- Progress from epoch's tail to next epoch.
6165
- Authorities and entropies are rotated.
6266
- Epoch mark is generated.

safrole/full/enact-epoch-change-with-no-tickets-2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25180,7 +25180,7 @@
2518025180
"gamma_z": "0x88353e19aa1de85428d12d63bac7d725834e7f6558596d9bcd41c80ea2db520d4f1d32fb145474c2ad0c7346bf5498058681da80128ba8900a1b3a244be688d2a689db3e7b5c41eedb484e2de570bc98b76f590f7c9b4122d43c40f7fdd890bf96c1b168e2dcc743f9eadda76c041db42d39f27a58418f88c0ea67656a224934e12b5dfc8f0f460a95c2d467fa41907b"
2518125181
},
2518225182
"output": {
25183-
"err": 24
25183+
"err": "bad_slot"
2518425184
},
2518525185
"post_state": {
2518625186
"tau": 1,
0 Bytes
Binary file not shown.

safrole/full/publish-tickets-no-mark-1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25193,7 +25193,7 @@
2519325193
"gamma_z": "0x88353e19aa1de85428d12d63bac7d725834e7f6558596d9bcd41c80ea2db520d4f1d32fb145474c2ad0c7346bf5498058681da80128ba8900a1b3a244be688d2a689db3e7b5c41eedb484e2de570bc98b76f590f7c9b4122d43c40f7fdd890bf96c1b168e2dcc743f9eadda76c041db42d39f27a58418f88c0ea67656a224934e12b5dfc8f0f460a95c2d467fa41907b"
2519425194
},
2519525195
"output": {
25196-
"err": 29
25196+
"err": "bad_ticket_attempt"
2519725197
},
2519825198
"post_state": {
2519925199
"tau": 0,
0 Bytes
Binary file not shown.

safrole/full/publish-tickets-no-mark-3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25210,7 +25210,7 @@
2521025210
"gamma_z": "0x88353e19aa1de85428d12d63bac7d725834e7f6558596d9bcd41c80ea2db520d4f1d32fb145474c2ad0c7346bf5498058681da80128ba8900a1b3a244be688d2a689db3e7b5c41eedb484e2de570bc98b76f590f7c9b4122d43c40f7fdd890bf96c1b168e2dcc743f9eadda76c041db42d39f27a58418f88c0ea67656a224934e12b5dfc8f0f460a95c2d467fa41907b"
2521125211
},
2521225212
"output": {
25213-
"err": 31
25213+
"err": "duplicate_ticket"
2521425214
},
2521525215
"post_state": {
2521625216
"tau": 1,
0 Bytes
Binary file not shown.

safrole/full/publish-tickets-no-mark-4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25206,7 +25206,7 @@
2520625206
"gamma_z": "0x88353e19aa1de85428d12d63bac7d725834e7f6558596d9bcd41c80ea2db520d4f1d32fb145474c2ad0c7346bf5498058681da80128ba8900a1b3a244be688d2a689db3e7b5c41eedb484e2de570bc98b76f590f7c9b4122d43c40f7fdd890bf96c1b168e2dcc743f9eadda76c041db42d39f27a58418f88c0ea67656a224934e12b5dfc8f0f460a95c2d467fa41907b"
2520725207
},
2520825208
"output": {
25209-
"err": 27
25209+
"err": "bad_ticket_order"
2521025210
},
2521125211
"post_state": {
2521225212
"tau": 1,
0 Bytes
Binary file not shown.

safrole/full/publish-tickets-no-mark-5.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25206,7 +25206,7 @@
2520625206
"gamma_z": "0x88353e19aa1de85428d12d63bac7d725834e7f6558596d9bcd41c80ea2db520d4f1d32fb145474c2ad0c7346bf5498058681da80128ba8900a1b3a244be688d2a689db3e7b5c41eedb484e2de570bc98b76f590f7c9b4122d43c40f7fdd890bf96c1b168e2dcc743f9eadda76c041db42d39f27a58418f88c0ea67656a224934e12b5dfc8f0f460a95c2d467fa41907b"
2520725207
},
2520825208
"output": {
25209-
"err": 28
25209+
"err": "bad_ticket_proof"
2521025210
},
2521125211
"post_state": {
2521225212
"tau": 1,

0 commit comments

Comments
 (0)