Skip to content

Commit c9ef3e9

Browse files
committed
Initialize ImpTest state with constitutional voting thresholds
1 parent 657652d commit c9ef3e9

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,9 @@ votingSpec =
619619
isDRepAccepted addCCGaid `shouldReturn` False
620620
getLastEnactedCommittee `shouldReturn` SNothing
621621
-- Bump up the UTxO delegated
622-
-- to barely make the threshold (51 %! 100)
622+
-- to barely make the threshold (65 %! 100)
623623
stakingKP1 <- lookupKeyPair stakingKH1
624-
_ <- sendCoinTo (mkAddr (paymentKP1, stakingKP1)) (inject $ Coin 200_000_000)
624+
_ <- sendCoinTo (mkAddr (paymentKP1, stakingKP1)) (inject $ Coin 858_000_000)
625625
passNEpochs 2
626626
-- The same vote should now successfully ratify the proposal
627627
getLastEnactedCommittee `shouldReturn` SJust (GovPurposeId addCCGaid)
@@ -642,11 +642,11 @@ votingSpec =
642642
isDRepAccepted addCCGaid `shouldReturn` False
643643
getLastEnactedCommittee `shouldReturn` SNothing
644644
-- Add to the rewards of the delegator to this DRep
645-
-- to barely make the threshold (51 %! 100)
645+
-- to barely make the threshold (61 %! 100)
646646
modifyNES $
647647
nesEsL . epochStateUMapL
648648
%~ UM.adjust
649-
(\(UM.RDPair r d) -> UM.RDPair (r <> UM.CompactCoin 200_000_000) d)
649+
(\(UM.RDPair r d) -> UM.RDPair (r <> UM.CompactCoin 858_000_000) d)
650650
staking1
651651
. UM.RewDepUView
652652
passNEpochs 2
@@ -655,7 +655,7 @@ votingSpec =
655655
it "Rewards contribute to active voting stake even in the absence of StakeDistr" $ whenPostBootstrap $ do
656656
let govActionLifetime = 5
657657
govActionDeposit = Coin 1_000_000
658-
poolDeposit = Coin 200_000
658+
poolDeposit = Coin 858_000
659659
-- Only modify the applicable thresholds
660660
modifyPParams $ \pp ->
661661
pp
@@ -687,7 +687,7 @@ votingSpec =
687687
isDRepAccepted addCCGaid `shouldReturn` False
688688
getLastEnactedCommittee `shouldReturn` SNothing
689689
-- Increase the rewards of the delegator to this DRep
690-
-- to barely make the threshold (51 %! 100)
690+
-- to barely make the threshold (65 %! 100)
691691
registerAndRetirePoolToMakeReward $ KeyHashObj stakingKH1
692692
lookupReward (KeyHashObj stakingKH1) `shouldReturn` poolDeposit <> govActionDeposit
693693
isDRepAccepted addCCGaid `shouldReturn` True
@@ -697,7 +697,7 @@ votingSpec =
697697
describe "Proposal deposits contribute to active voting stake" $ do
698698
it "Directly" $ whenPostBootstrap $ do
699699
-- Only modify the applicable thresholds
700-
modifyPParams $ ppGovActionDepositL .~ Coin 600_000
700+
modifyPParams $ ppGovActionDepositL .~ Coin 1_000_000
701701
-- Setup DRep delegation without stake #1
702702
(drepKH1, stakingKH1) <- setupDRepWithoutStake
703703
-- Setup DRep delegation #2

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/ImpTest.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,22 +292,22 @@ instance
292292
{ ucppPoolVotingThresholds =
293293
PoolVotingThresholds
294294
{ pvtMotionNoConfidence = 51 %! 100
295-
, pvtCommitteeNormal = 51 %! 100
296-
, pvtCommitteeNoConfidence = 51 %! 100
295+
, pvtCommitteeNormal = 65 %! 100
296+
, pvtCommitteeNoConfidence = 65 %! 100
297297
, pvtHardForkInitiation = 51 %! 100
298298
, pvtPPSecurityGroup = 51 %! 100
299299
}
300300
, ucppDRepVotingThresholds =
301301
DRepVotingThresholds
302302
{ dvtMotionNoConfidence = 51 %! 100
303-
, dvtCommitteeNormal = 51 %! 100
304-
, dvtCommitteeNoConfidence = 51 %! 100
305-
, dvtUpdateToConstitution = 51 %! 100
303+
, dvtCommitteeNormal = 65 %! 100
304+
, dvtCommitteeNoConfidence = 65 %! 100
305+
, dvtUpdateToConstitution = 65 %! 100
306306
, dvtHardForkInitiation = 51 %! 100
307307
, dvtPPNetworkGroup = 51 %! 100
308308
, dvtPPEconomicGroup = 51 %! 100
309309
, dvtPPTechnicalGroup = 51 %! 100
310-
, dvtPPGovGroup = 51 %! 100
310+
, dvtPPGovGroup = 75 %! 100
311311
, dvtTreasuryWithdrawal = 51 %! 100
312312
}
313313
, ucppCommitteeMinSize = 1

0 commit comments

Comments
 (0)