-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathaccumulate.asn
57 lines (46 loc) · 1.18 KB
/
accumulate.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
-- Accumulate STF test vectors schema
AccumulateModule DEFINITIONS ::= BEGIN
IMPORTS
TimeSlot, ServiceId, ServiceInfo, WorkReport, OpaqueHash, ByteSequence,
Entropy, ReadyQueue, AccumulatedQueue, Privileges, AccumulateRoot
FROM JamTypes;
PreimagesMapEntry ::= SEQUENCE {
hash OpaqueHash,
blob ByteSequence
}
-- Service account information relevant for this STF.
Account ::= SEQUENCE {
-- [a_c, a_b, a_g, a_m, a_o, a_i] Service metadata.
service ServiceInfo,
--[a_p] Preimages blobs.
preimages SEQUENCE OF PreimagesMapEntry
}
AccountsMapEntry ::= SEQUENCE {
id ServiceId,
data Account
}
State ::= SEQUENCE {
slot TimeSlot,
entropy Entropy,
ready-queue ReadyQueue,
accumulated AccumulatedQueue,
privileges Privileges,
-- [δ] Relevant services account data. Refer to T(σ) in GP Appendix D.
accounts SEQUENCE OF AccountsMapEntry
}
Input ::= SEQUENCE {
-- [H_t] Block's timeslot.
slot TimeSlot,
reports SEQUENCE OF WorkReport
}
Output ::= CHOICE {
ok AccumulateRoot,
err NULL
}
TestCase ::= SEQUENCE {
input Input,
pre-state State,
output Output,
post-state State
}
END