Skip to content

Commit fbb53f6

Browse files
committed
WIP
1 parent 19923f2 commit fbb53f6

File tree

2 files changed

+38
-1
lines changed
  • eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp
  • libs/cardano-ledger-conformance/test/Test/Cardano/Ledger/Conformance

2 files changed

+38
-1
lines changed

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,43 @@ spoAndCCVotingSpec = do
198198
else do
199199
getLastEnactedParameterChange `shouldReturn` SNothing
200200
newRefScriptBaseFee `shouldBe` initialRefScriptBaseFee
201+
it "Constitution cannot be changed if active committee size is below min size" . whenPostBootstrap $ do
202+
modifyPParams $ \pp ->
203+
pp
204+
& ppDRepVotingThresholdsL . dvtUpdateToConstitutionL .~ (0 %! 1)
205+
& ppCommitteeMinSizeL .~ 2
206+
& ppCommitteeMaxTermLengthL .~ EpochInterval 50
207+
coldCommitteeActive <- KeyHashObj <$> freshKeyHash
208+
coldCommitteeInactive <- KeyHashObj <$> freshKeyHash
209+
startingEpoch <- getsNES nesELL
210+
maxTermLength <- getsPParams ppCommitteeMaxTermLengthL
211+
(dRep, _, _) <- setupSingleDRep 1_000_000_000
212+
(spo, _, _) <- setupPoolWithStake $ Coin 1_000_000_000
213+
let
214+
committeeMap =
215+
[ (coldCommitteeActive, addEpochInterval startingEpoch maxTermLength)
216+
, (coldCommitteeInactive, addEpochInterval startingEpoch $ EpochInterval 5)
217+
]
218+
initialCommittee <- getCommitteeMembers
219+
committeeActionId <-
220+
impAnn "Submit committee update"
221+
. submitGovAction
222+
$ UpdateCommittee
223+
SNothing
224+
initialCommittee
225+
committeeMap
226+
(0 %! 1)
227+
submitYesVote_ (DRepVoter dRep) committeeActionId
228+
submitYesVote_ (StakePoolVoter spo) committeeActionId
229+
passNEpochs 2
230+
getCommitteeMembers `shouldReturn` Map.keysSet committeeMap
231+
passNEpochs 3
232+
newConstitution <- arbitrary
233+
constitutionActionId <- submitGovAction $ NewConstitution SNothing newConstitution
234+
logRatificationChecks constitutionActionId
235+
passNEpochs 2
236+
getConstitution `shouldNotReturn` newConstitution
237+
True `shouldBe` False
201238

202239
committeeExpiryResignationDiscountSpec ::
203240
forall era.

libs/cardano-ledger-conformance/test/Test/Cardano/Ledger/Conformance/Imp.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,6 @@ spec =
156156
-- LEDGER tests pending on the dRep delegations cleanup in the spec:
157157
-- https://github.com/IntersectMBO/formal-ledger-specifications/issues/635
158158
xdescribe "LEDGER" Ledger.spec
159-
xdescribe "RATIFY" Ratify.spec
159+
describe "RATIFY" Ratify.spec
160160
xdescribe "UTXO" Utxo.spec
161161
xdescribe "UTXOS" Utxos.spec

0 commit comments

Comments
 (0)