diff --git a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs index 679ea826221..7ca32dbfe86 100644 --- a/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs +++ b/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs @@ -198,6 +198,43 @@ spoAndCCVotingSpec = do else do getLastEnactedParameterChange `shouldReturn` SNothing newRefScriptBaseFee `shouldBe` initialRefScriptBaseFee + it "Constitution cannot be changed if active committee size is below min size" . whenPostBootstrap $ do + modifyPParams $ \pp -> + pp + & ppDRepVotingThresholdsL . dvtUpdateToConstitutionL .~ (0 %! 1) + & ppCommitteeMinSizeL .~ 2 + & ppCommitteeMaxTermLengthL .~ EpochInterval 50 + coldCommitteeActive <- KeyHashObj <$> freshKeyHash + coldCommitteeInactive <- KeyHashObj <$> freshKeyHash + startingEpoch <- getsNES nesELL + maxTermLength <- getsPParams ppCommitteeMaxTermLengthL + (dRep, _, _) <- setupSingleDRep 1_000_000_000 + (spo, _, _) <- setupPoolWithStake $ Coin 1_000_000_000 + let + committeeMap = + [ (coldCommitteeActive, addEpochInterval startingEpoch maxTermLength) + , (coldCommitteeInactive, addEpochInterval startingEpoch $ EpochInterval 5) + ] + initialCommittee <- getCommitteeMembers + committeeActionId <- + impAnn "Submit committee update" + . submitGovAction + $ UpdateCommittee + SNothing + initialCommittee + committeeMap + (0 %! 1) + submitYesVote_ (DRepVoter dRep) committeeActionId + submitYesVote_ (StakePoolVoter spo) committeeActionId + passNEpochs 2 + getCommitteeMembers `shouldReturn` Map.keysSet committeeMap + passNEpochs 3 + newConstitution <- arbitrary + constitutionActionId <- submitGovAction $ NewConstitution SNothing newConstitution + logRatificationChecks constitutionActionId + passNEpochs 2 + getConstitution `shouldNotReturn` newConstitution + True `shouldBe` False committeeExpiryResignationDiscountSpec :: forall era. diff --git a/libs/cardano-ledger-conformance/test/Test/Cardano/Ledger/Conformance/Imp.hs b/libs/cardano-ledger-conformance/test/Test/Cardano/Ledger/Conformance/Imp.hs index 768e50b9ac0..05931a7ac8b 100644 --- a/libs/cardano-ledger-conformance/test/Test/Cardano/Ledger/Conformance/Imp.hs +++ b/libs/cardano-ledger-conformance/test/Test/Cardano/Ledger/Conformance/Imp.hs @@ -156,6 +156,6 @@ spec = -- LEDGER tests pending on the dRep delegations cleanup in the spec: -- https://github.com/IntersectMBO/formal-ledger-specifications/issues/635 xdescribe "LEDGER" Ledger.spec - xdescribe "RATIFY" Ratify.spec + describe "RATIFY" Ratify.spec xdescribe "UTXO" Utxo.spec xdescribe "UTXOS" Utxos.spec