cardano-ledger
cardano-ledger copied to clipboard
write goverance unit tests and examples for conway features
Here is a non-comprehensive list of unit tests we might wish for conway:
- [x] if you submit a governance action, it is add to the governance state as the latest action
- [x] you can add a governance action and vote on the action at the same time. or vote on a different existing action.
- [x] if a CC/DRep/SPO votes on a governance action, their vote appears in the governance state
- [x] if a stake credential delegates to a DRep, the delegation relation is updated as expected
- [x] CC members ~cannot vote~ votes do not count after their term expires
- [x] ~The CC enters a state of no confidence~ CC votes are counted as No if too many members retire
- [ ] If a stake credential delegates to a pre-defined DRep (abstain or no confidence), their stake is accounted for in ratification
- [x] a governance action with enough votes is staged for enactment on the epoch boundary (we probably want a test for each action type)
- [x] governance actions that never get enough votes are eventually expired
- [ ] ~governance actions are dropped when a motion of no confidence is enacted~
I think at this point we just need to confirm that we already have implemented all these scenarios.
From a quick glance I think this is the case, but it would be nice for someone to lookup those individual tests and confirm this for sure
CC members cannot vote votes do not count after their term expires
A test for this exists in RatifySpec , so ticking it off the list.