55{-# LANGUAGE TypeApplications #-}
66{-# LANGUAGE NoImplicitPrelude #-}
77{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
8+
89{-# HLINT ignore "Use camelCase" #-}
910
1011module Cardano.SCLS.Namespace.GovPParams where
@@ -18,13 +19,44 @@ import Prelude (Integer, ($))
1819record_entry :: Rule
1920record_entry =
2021 comment
21- [str | The key for the entry is one of the following:
22- | prev / curr / fut1 / fut0
23- | fut0 stands for possible future
24- | fut1 stands for definite future
25- |
26- | fut0 + no pparams is not represented, key should be omitted in that case
27- |]
22+ [str | Specification for parameters
23+ |
24+ | ```
25+ | meta:
26+ | endian: be
27+ |
28+ | seq:
29+ | - id: key
30+ | type: gov_pparams
31+ |
32+ | types:
33+ | gov_pparams:
34+ | seq:
35+ | - id: value
36+ | type: strz
37+ | size: 4
38+ | encoding: ASCII
39+ | - id: valiant
40+ | size: 0
41+ | type:
42+ | switch-on: value
43+ | cases:
44+ | '"prev"': kprev
45+ | '"curr"': kcurr
46+ | '"fut0"': kfut0
47+ | '"fut1"': kfut1
48+ | kprev:
49+ | doc: previous values
50+ | kcurr:
51+ | doc: current values
52+ | kfut0:
53+ | doc: possible future
54+ | kfut1:
55+ | doc: definitive future
56+ | ```
57+ |
58+ | fut0 with missig parameters should be omitted.
59+ |]
2860 $ " record_entry" =:= gov_pparams_out
2961
3062gov_pparams_out :: Rule
@@ -125,27 +157,48 @@ ex_units = "ex_units" =:= arr ["mem" ==> VUInt, "steps" ==> VUInt]
125157
126158pool_voting_thresholds :: Rule
127159pool_voting_thresholds =
128- " pool_voting_thresholds"
129- =:= arr
130- [ a unit_interval -- motion no confidence
131- , a unit_interval -- committee normal
132- , a unit_interval -- committee no confidence
133- , a unit_interval -- hard fork initiation
134- , a unit_interval -- security relevant parameter voting threshold
135- ]
160+ comment
161+ [str |
162+ | 0 - motion no confidence
163+ | 1 - committee normal
164+ | 2 - committee no confidence
165+ | 3 - hard fork initiation
166+ | 4 - security relevant parameter voting threshold
167+ |]
168+ $ " pool_voting_thresholds"
169+ =:= arr
170+ [ a unit_interval -- motion no confidence
171+ , a unit_interval -- committee normal
172+ , a unit_interval -- committee no confidence
173+ , a unit_interval -- hard fork initiation
174+ , a unit_interval -- security relevant parameter voting threshold
175+ ]
136176
137177drep_voting_thresholds :: Rule
138178drep_voting_thresholds =
139- " drep_voting_thresholds"
140- =:= arr
141- [ a unit_interval -- motion no confidence
142- , a unit_interval -- committee normal
143- , a unit_interval -- committee no confidence
144- , a unit_interval -- update constitution
145- , a unit_interval -- hard fork initiation
146- , a unit_interval -- PP network group
147- , a unit_interval -- PP economic group
148- , a unit_interval -- PP technical group
149- , a unit_interval -- PP governance group
150- , a unit_interval -- treasury withdrawal
151- ]
179+ comment
180+ [str |
181+ | 0 - motion no confidence
182+ | 1 - committee normal
183+ | 2 - committee no confidence
184+ | 3 - update constitution
185+ | 4 - hard fork initiation
186+ | 5 - PP network group
187+ | 6 - PP economic group
188+ | 7 - PP technical group
189+ | 8 - PP governance group
190+ | 9 - treasury withdrawal
191+ |]
192+ $ " drep_voting_thresholds"
193+ =:= arr
194+ [ a unit_interval -- motion no confidence
195+ , a unit_interval -- committee normal
196+ , a unit_interval -- committee no confidence
197+ , a unit_interval -- update constitution
198+ , a unit_interval -- hard fork initiation
199+ , a unit_interval -- PP network group
200+ , a unit_interval -- PP economic group
201+ , a unit_interval -- PP technical group
202+ , a unit_interval -- PP governance group
203+ , a unit_interval -- treasury withdrawal
204+ ]
0 commit comments