-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathassurances.asn
59 lines (46 loc) · 1.31 KB
/
assurances.asn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
-- Work reports assurances STF test vectors schema
ReportsModule DEFINITIONS ::= BEGIN
IMPORTS
TimeSlot, ValidatorsData, HeaderHash, WorkReport,
AvailabilityAssignments, AssurancesExtrinsic
FROM JamTypes;
State ::= SEQUENCE {
-- [ρ†] Intermediate pending reports after that any work report judged as
-- uncertain or invalid has been removed from it. Mutated to ϱ‡.
avail-assignments AvailabilityAssignments,
-- [κ'] Posterior active validators.
curr-validators ValidatorsData
}
Input ::= SEQUENCE {
-- [E_A] Assurances extrinsic.
assurances AssurancesExtrinsic,
-- [H_t] Block's timeslot.
slot TimeSlot,
-- [H_p] Parent hash.
parent HeaderHash
}
-- State transition function execution error.
-- Error codes **are not specified** in the the Graypaper.
-- Feel free to ignore the actual value.
ErrorCode ::= ENUMERATED {
bad-attestation-parent (0),
bad-validator-index (1),
core-not-engaged (2),
bad-signature (3),
not-sorted-or-unique-assurers (4)
}
OutputData ::= SEQUENCE {
-- Items removed from ρ† to get ρ'
reported SEQUENCE OF WorkReport
}
Output ::= CHOICE {
ok OutputData,
err ErrorCode
}
TestCase ::= SEQUENCE {
input Input,
pre-state State,
output Output,
post-state State
}
END