forked from w3f/jamtestvectors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisputes.asn
67 lines (57 loc) · 1.56 KB
/
disputes.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
60
61
62
63
64
65
66
67
-- Disputes STF test vectors schema
DisputesModule DEFINITIONS ::= BEGIN
IMPORTS
TimeSlot, DisputesRecords, AvailabilityAssignments, ValidatorsData, DisputesExtrinsic,
OffendersMark
FROM JamTypes;
State ::= SEQUENCE {
-- [ψ] Prior disputes verdicts and offenders. Mutated to ψ'.
psi DisputesRecords,
-- [ρ] Prior availability cores assignments.
rho AvailabilityAssignments,
-- [τ] Prior timeslot.
tau TimeSlot,
-- [κ] Prior current epoch validators.
kappa ValidatorsData,
-- [λ] Prior previous epoch validators.
lambda ValidatorsData
}
Input ::= SEQUENCE {
-- [E_D] Disputes extrinsic
disputes DisputesExtrinsic
}
OutputData ::= SEQUENCE {
-- [H_o] Offenders marker
offenders-mark OffendersMark
}
-- STF execution error codes.
-- Error codes **are not specified** in the the Graypaper.
-- Feel free to ignore the actual value.
ErrorCode ::= ENUMERATED {
already-judged (0),
bad-vote-split (1),
verdicts-not-sorted-unique (2),
judgements-not-sorted-unique (3),
culprits-not-sorted-unique (4),
faults-not-sorted-unique (5),
not-enough-culprits (6),
not-enough-faults (7),
culprits-verdict-not-bad (8),
fault-verdict-wrong (9),
offender-already-reported (10),
bad-judgement-age (11),
bad-validator-index (12),
bad-signature (13)
}
Output ::= CHOICE {
ok OutputData,
err ErrorCode
}
-- Disputes STF execution dump
TestCase ::= SEQUENCE {
input Input,
pre-state State,
output Output,
post-state State
}
END