Skip to content

Commit ecbcc1b

Browse files
committed
Update Conway test plan file
1 parent e8552b7 commit ecbcc1b

File tree

1 file changed

+360
-0
lines changed

1 file changed

+360
-0
lines changed
Lines changed: 360 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,360 @@
1+
Governance testing in Conway
2+
============================
3+
4+
5+
Committee
6+
---------
7+
8+
``Register a potential CC Member``
9+
10+
* Verify that is possible to register anyone with a CC key authorization record
11+
* Verify that the member is marked on-chain as an authorized member
12+
* Verify that expired members should not be elected
13+
14+
``Willingly resign a member early``
15+
16+
* Verify that the member is marked on-chain as an expired member
17+
* Verify that the expired member can no longer vote
18+
* Verify that after resignation, the existing votes no longer counts for actions that were not ratified yet
19+
20+
``Create/update Committee``
21+
22+
* Verify that the data needed for creating the action includes:
23+
24+
* The set of verification key hash digests for members to be removed
25+
* A map of verification key hash digests to epoch numbers for new members - and their term limit in epochs.
26+
* A quorum of the committee necessary for a successful vote
27+
* An anchor pointing to the proposal URL
28+
* A governance action ID for the most recently enacted Committee action
29+
* A deposit
30+
31+
* Confirm that approval from both DReps and SPOs is needed - threshold for ratification might be different depending on if the governance is in a state of confidence or a state of no confidence
32+
* Confirm that if the committee disapproves the action, the action is enacted anyway, as committee approval is not needed
33+
34+
``Create an empty Committee``
35+
36+
* Check that the `committeeMinSize` pparam is set to 0
37+
* Check that there are none CC members
38+
* Check that is possible to update de Constitution without needing CC members votes
39+
40+
``Create state of no-confidence``
41+
42+
* Verify that the data needed for creating the action includes:
43+
44+
* An anchor pointing to the proposal URL
45+
* A governance action ID for the most recently enacted Committee action
46+
* A deposit
47+
48+
* Confirm that approval from both DReps and SPOs is required
49+
* Confirm that the current committee can no longer participate in governance actions
50+
* Verify that no actions can be ratified before the committee is replaced
51+
52+
``Update size of the Constitutional Committee``
53+
54+
* Check that the CC size `committeeMinSize` could be any non-negative number.
55+
* Check that the system will automatically enter a state of no-confidence when the number of active CC members < committeeMinSize
56+
* Check that only update-committee actions can be ratified when the number of active CC members < committeeMinSize
57+
58+
``Update Committee threshold - quorum``
59+
60+
* Confirm that is possible to change the fraction of committee required to ratify a government action
61+
* After the action is enacted, verify that the new threshold is enforced:
62+
63+
* Approve action: If "Yes" votes are above the new threshold the action is approved
64+
* Disapprove action: If "No" votes exceeds the committee threshold, the action is disapproved
65+
* Check that members who abstained are not considered as "No" votes
66+
67+
68+
DReps
69+
-----
70+
71+
``Register a DRep and delegate stake to it``
72+
73+
* Verify that DRep registration certificates include:
74+
75+
* A DRep ID
76+
* A deposit
77+
78+
* Confirm that an anchor is optional for a DRep registration certificate
79+
* Confirm that DRep registration is correctly recorded in the ledger state
80+
* Verify that Vote delegation certificates include:
81+
82+
* The DRep ID for stake delegation
83+
* The stake credential for the delegator
84+
85+
``Delegate a stake credential to an "Abstain" DRep``
86+
87+
* Ensure that the stake is clearly marked as inactive in governance participation
88+
* Verify that votes proportional to the delegated Lovelace to the "Abstain" DRep are not included in the "active voting stake."
89+
* Confirm that the stake is registered for incentive purposes
90+
91+
``Delegate a stake credential to a "No Confidence" DRep``
92+
93+
* Confirm that the stake is counted as a "Yes" vote on every "No Confidence" action
94+
* Verify that the stake is counted as a "No" vote on actions other than "No Confidence"
95+
96+
``Miss votes for `drepActivity` during many epochs``
97+
98+
* Verify that DReps become inactive when they miss votes during many epochs
99+
* Verify that DReps do not become inactive when there are no actions to vote for
100+
* Confirm that DReps' inactivity is postponed for every epoch where there are no actions to vote for
101+
* Ensure that inactive DReps no longer contribute to the active voting stake
102+
* Verify that inactive DReps can become active again for `drepActivity`-many epochs by voting on any governance actions
103+
104+
``Retire a DRep``
105+
106+
* Verify that the DRep retirement certificates include a DRep ID
107+
* Confirm that a DRep is retired immediately upon the chain accepting a retirement certificate
108+
* Ensure that the deposit is returned as part of the transaction that submits the retirement certificate
109+
110+
``Verify that an Ada holder can switch between DReps by re-delegating their associated stake credential``
111+
112+
* Example Scenario:
113+
114+
* Create an "Update to the Constitution" action
115+
* Approve the action by the committee
116+
* Vote "Yes" by DReps that collectively have enough delegated stake for their votes to approve the action
117+
* Vote "No" by DReps that don't have enough combined delegated stake for their votes to disapprove the action
118+
* Before the end of the current epoch, re-delegate stake to one of the DReps that voted "No," where the stake amount is sufficient to reverse the voting ratio to "No" votes
119+
* Confirm that the action was not ratified
120+
121+
122+
Constitution
123+
------------
124+
125+
``Propose an Update to the Constitution and vote in a way that ensures the action is ratified``
126+
127+
* Verify that the necessary data for creating the action includes:
128+
129+
* An anchor pointing to the updated Constitution URL
130+
* An anchor pointing to the proposal URL
131+
* A governance action ID for the most recently enacted "Update to the Constitution" action
132+
* A deposit
133+
134+
* Confirm that the new constitution replaces the old one at the next epoch boundary (action is enacted)
135+
* Confirm that a minimum of CommitteeThreshold members must approve the Governance action
136+
* Confirm that DRep votes have to be >= than DrepVotingThreshold for UpdateToConstitution as a percentage of active voting stake.
137+
* Verify that approval from SPOs is not necessary
138+
139+
``Propose an Update to the Constitution and vote in a way that ensures the action expires``
140+
141+
* Confirm that the proposed constitution is discarded, and the old constitution remains valid at the end of the current epoch
142+
143+
``Attempt to create an "Update to the Constitution" action with a deposit amount below the minimum required``
144+
145+
* Verify that the attempt fails due to an insufficient deposit amount
146+
147+
``Create an "Update to the Constitution" action where the deposit amount is spread across multiple TxIns``
148+
149+
* Verify that no errors occur
150+
151+
``Create an "Update to the Constitution" action where the deposit TxIn also contains non-Ada value``
152+
153+
* Verify that no errors occur
154+
155+
``Create multiple "Update to the Constitution" actions in a single epoch, and vote in a way that all actions are approved``
156+
157+
* Confirm that the action submitted first is ratified and enacted
158+
* Verify that the remaining actions are dropped
159+
160+
161+
Protocol Parameter
162+
------------------
163+
164+
``Propose an action to change the Protocol Parameters, and vote in a way that ensures the action is ratified``
165+
166+
* Verify that the necessary data for creating the action includes:
167+
168+
* An anchor pointing to the proposal URL
169+
* A governance action ID for the most recently enacted "Protocol Parameters Update" action
170+
* A deposit
171+
* The changed parameter
172+
173+
* Check that is possible to change multiple Protocol Parameters belonging to multiple Protocol Parameter groups in the same action
174+
* Confirm that the thresholds of all the involved groups applies to any such governance action
175+
* Confirm that approval from the Committee and DReps is required
176+
* Check that SPOs cannot vote on a "protocol parameters update"
177+
178+
179+
``Propose an action to change a Protocol Parameter, and vote in a way that ensures the action expires``
180+
181+
* Confirm that the proposed Protocol Parameter is discarded, and the old one remains valid
182+
183+
184+
Treasury Withdrawals
185+
--------------------
186+
187+
``Vote on Treasury Withdrawals to ensure the action is ratified``
188+
189+
* Verify that the necessary data for creating the action includes:
190+
191+
* An anchor pointing to the proposal URL
192+
* A deposit
193+
* A map from stake credentials to a positive number of Lovelace
194+
195+
* Confirm that a minimum of CommitteeThreshold members must approve the Governance action
196+
* Confirm that DRep votes have to be >= than DrepVotingThreshold for TreasuryWithdrawal as a percentage of active voting stake.
197+
* Verify that approval from SPOs is not necessary
198+
* Confirm that the exact amount is withdrawn to credential's rewards account after the action is enacted
199+
* Confirm that multiple Treasury Withdrawals actions can be enacted in the same epoch
200+
* Confirm that multiple Treasury Withdrawals to same credential yields the combined sum of the individual withdrawal amounts
201+
202+
``Vote on Treasury Withdrawals in a way that ensures the action expires``
203+
204+
* Verify that no funds are withdrawn
205+
206+
``Try to withdraw funds from the treasury using MIR certificates``
207+
208+
* Verify that the attempt fails, the only way to withdraw funds from the treasury is through a ratified Treasury Withdrawal governance action
209+
210+
211+
Info
212+
---------
213+
214+
``Vote on Info in a way that ensures the action expires``
215+
216+
* Verify that the necessary data for creating the action includes:
217+
218+
* An anchor pointing to the proposal URL
219+
* A deposit
220+
221+
``Vote on Info in a way that ensures the action is ratified``
222+
223+
* Confirm that approval from the committee is needed, as well as 100% approval from both DReps and SPOs to ratify the action
224+
225+
226+
Votes
227+
-----
228+
229+
``As DRep``
230+
231+
* Confirm that the number of votes is proportional to the delegated Lovelace to the DRep
232+
* Ensure that correctly submitted votes take precedence over any older votes for the same credential
233+
* Vote "Yes", "No", "Abstain"
234+
* Confirm that a missed vote is treated like a "No" vote
235+
236+
``As SPO``
237+
238+
* Confirm that the number of votes is proportional to the delegated Lovelace to the DRep
239+
* Ensure that correctly submitted votes take precedence over any older votes for the same credential
240+
* Vote "Yes", "No", "Abstain"
241+
* Verify that a block-producing node does not need to be online or actively creating blocks - having stake delegated to the pool is sufficient for the votes to count
242+
243+
``As Commitee``
244+
245+
* Verify that each current member has a single vote
246+
* Ensure that votes from retired/expired committee members do not count
247+
* Ensure that correctly submitted votes take precedence over any older votes for the same credential
248+
249+
``Vote on a ratified action``
250+
251+
* Confirm that it is possible to vote on an ratified action but the votes will not count
252+
253+
``Vote on an enacted action``
254+
255+
* Confirm that it is not possible to vote on an action that has already been enacted, the action was already removed
256+
257+
``Test that changes to stake distribution affect past votes``
258+
259+
* Have DReps vote in a way that the "Yes" votes don't meet the threshold for ratification in the current epoch
260+
* In the next epoch, delegate more stake to the DReps that voted "Yes" so the threshold for ratification is met and the action gets ratified in the current epoch without any changes to votes
261+
262+
263+
Ratification
264+
------------
265+
266+
``Delay ratification``
267+
268+
* Check that a successful motion of no-confidence delays the ratification of all other governance actions until the first epoch after enactment of the action
269+
* Check that the election of a new constitutional committee delays the ratification of all other governance actions until the first epoch after enactment of the action
270+
* Check that a constitutional change delays the ratification of all other governance actions until the first epoch after enactment of the action
271+
272+
273+
``Check that governance action is not ratified when it includes a governance action ID that doesn't match the most recently enacted action of its given type``
274+
275+
* Scenario 1:
276+
277+
* Create an action that includes a governance action ID of an enacted action of different type
278+
279+
* Scenario 2:
280+
281+
* Create an action that includes a governance action ID of an enacted action of the same type, but that is not the most recently enacted action
282+
283+
* Scenario 3:
284+
285+
* Create an action that includes a governance action ID that doesn't exist on chain
286+
287+
288+
Enactment
289+
---------
290+
291+
``Check that two actions of the same type can be enacted simultaneously``
292+
293+
* Scenario 1:
294+
295+
* Create a first "Update to Protocol Parameter" action
296+
* Create a second "Update to Protocol Parameter" action that includes the governance action ID of the first action as the most recently enacted action
297+
* Approve the first action by the committee
298+
* Approve the first action by DReps
299+
* Approve the second action by the committee
300+
* Approve the second action by DReps
301+
* Confirm that both actions are enacted at the end of next epoch
302+
303+
* Scenario 2:
304+
305+
* Create a first "Update to Protocol Parameter" action
306+
* Create a second "Update to Protocol Parameter" action that includes the governance action ID of the first action as the most recently enacted action
307+
* Approve the first action by the committee
308+
* Disapprove the first action by DReps
309+
* Approve the second action by the committee
310+
* Approve the second action by DReps
311+
* Confirm that neither action is ratified
312+
313+
314+
``Check that governance actions of the same type are enacted in the order of acceptance to the chain``
315+
316+
* Create a first "Update to Protocol Parameter" action
317+
* Create a second "Update to Protocol Parameter" action
318+
* Approve the first action by the committee
319+
* Approve the first action by DReps
320+
* Approve the second action by the committee
321+
* Approve the second action by DReps
322+
* Confirm that the first action is enacted and the second action expires
323+
324+
325+
``Governance action enactment prioritization``
326+
327+
* Check that the actions that have been ratified in the current epoch are prioritized for enactment in the following order:
328+
329+
* Motion of no-confidence
330+
* New committee/threshold
331+
* Update to the Constitution or proposal policy
332+
* Hard Fork initiation
333+
* Protocol parameter changes
334+
* Treasury withdrawals
335+
* Info
336+
337+
338+
Transactions
339+
------------
340+
341+
``Use both `cardano-cli conway transaction build` and `cardano-cli conway transaction build-raw` commands to build transactions that``
342+
343+
* create a governance action
344+
* vote for a governance action
345+
* register DRep
346+
* deregister (retire) DRep
347+
348+
``Use both `cardano-cli transaction submit` and the Submit API service to submit transactions that``
349+
350+
* create a governance action
351+
* vote for a governance action
352+
* register DRep
353+
* deregister (retire) DRep
354+
355+
356+
Bootstrapping phase
357+
-------------------
358+
``Verify that an Ada holder is earning rewards (incentives) for delegating to a DRep``
359+
360+
* Confirm that during a short bootstrapping phase, rewards earned for stake delegation, etc., may be withdrawn at any time. After this phase, although rewards will continue to be earned for block delegation, etc., reward accounts will be blocked from withdrawing any rewards unless their associated stake credential is also delegated to a DRep. (Question: how long is the bootstrapping phase?)

0 commit comments

Comments
 (0)