@@ -91,12 +91,10 @@ proposalsSpec =
9191
9292 initialValue <- getsNES (nesEsL . curPParamsEpochStateL . ppMinFeeAL)
9393
94- policy <-
95- getsNES $
96- nesEpochStateL . epochStateGovStateL . constitutionGovStateL . constitutionScriptL
94+ parameterChangeAction <- mkMinFeeUpdateGovAction SNothing
9795 govActionId <-
9896 mkProposalWithRewardAccount
99- ( ParameterChange SNothing (def & ppuMinFeeAL .~ SJust ( Coin 3000 )) policy)
97+ parameterChangeAction
10098 rewardAccount
10199 >>= submitProposal
102100 expectPresentGovActionId govActionId
@@ -138,15 +136,15 @@ proposalsSpec =
138136 let ratifyState = extractDRepPulsingState (govStateFinal ^. cgsDRepPulsingStateL)
139137 rsExpired ratifyState `shouldBe` Set. singleton govActionId
140138 where
141- submitParameterChangeTree = submitGovActionTree $ paramAction >=> submitGovAction
142- paramAction p = mkParameterChangeGovAction p (def & ppuMinFeeAL .~ SJust (Coin 10 ))
139+ submitParameterChangeTree = submitGovActionTree $ mkMinFeeUpdateGovAction >=> submitGovAction
143140
144141dRepSpec ::
145142 forall era .
146143 ConwayEraImp era =>
147144 SpecWith (ImpInit (LedgerSpec era ))
148145dRepSpec =
149146 describe " DRep" $ do
147+ let submitParamChangeProposal = mkMinFeeUpdateGovAction SNothing >>= submitGovAction_
150148 it " expiry is updated based on the number of dormant epochs" $ do
151149 modifyPParams $ ppGovActionLifetimeL .~ EpochInterval 2
152150 (drep, _, _) <- setupSingleDRep 1_000_000
@@ -155,12 +153,10 @@ dRepSpec =
155153 let
156154 -- compute the epoch number that is an offset from starting epoch number
157155 offDRepActivity = addEpochInterval startEpochNo . EpochInterval
158- submitParamChangeProposal =
159- submitParameterChange SNothing $ def & ppuMinFeeAL .~ SJust (Coin 3000 )
160156 expectNumDormantEpochs 0
161157
162158 -- epoch 0: we submit a proposal
163- _ <- submitParamChangeProposal
159+ submitParamChangeProposal
164160 passNEpochsChecking 2 $ do
165161 expectNumDormantEpochs 0
166162 expectDRepExpiry drep $ offDRepActivity 100
@@ -178,7 +174,7 @@ dRepSpec =
178174 expectNumDormantEpochs 3
179175 expectDRepExpiry drep $ offDRepActivity 100
180176
181- _ <- submitParamChangeProposal
177+ submitParamChangeProposal
182178 -- number of dormant epochs is added to the drep expiry and reset to 0
183179 expectNumDormantEpochs 0
184180 expectDRepExpiry drep $ offDRepActivity 103
@@ -201,12 +197,10 @@ dRepSpec =
201197 offDRepActivity offset =
202198 addEpochInterval startEpochNo $ EpochInterval (drepActivity + offset)
203199
204- let submitParamChangeProposal =
205- submitParameterChange SNothing $ def & ppuMinFeeAL .~ SJust (Coin 3000 )
206200 expectNumDormantEpochs 0
207201
208202 -- epoch 0: we submit a proposal
209- _ <- submitParamChangeProposal
203+ submitParamChangeProposal
210204 passNEpochsChecking 2 $ do
211205 expectNumDormantEpochs 0
212206 expectDRepExpiry drep $ offDRepActivity 0
@@ -228,7 +222,7 @@ dRepSpec =
228222 expectDRepExpiry drep $ offDRepActivity 0
229223 expectActualDRepExpiry drep $ offDRepActivity 3
230224
231- _ <- submitParamChangeProposal
225+ submitParamChangeProposal
232226 -- number of dormant epochs is added to the drep, considering they are not actually expired,
233227 -- and is reset to 0
234228 expectNumDormantEpochs 0
@@ -462,7 +456,11 @@ depositMovesToTreasuryWhenStakingAddressUnregisters = do
462456 govPolicy <- getGovPolicy
463457 gaid <-
464458 mkProposalWithRewardAccount
465- (ParameterChange SNothing (emptyPParamsUpdate & ppuGovActionDepositL .~ SJust (Coin 10 )) govPolicy)
459+ ( ParameterChange
460+ SNothing
461+ (emptyPParamsUpdate & ppuGovActionDepositL .~ SJust (Coin 1000000 ))
462+ govPolicy
463+ )
466464 returnAddr
467465 >>= submitProposal
468466 expectPresentGovActionId gaid
@@ -502,7 +500,7 @@ eventsSpec = describe "Events" $ do
502500 propDeposit <- getsNES $ nesEsL . curPParamsEpochStateL . ppGovActionDepositL
503501 let
504502 proposeParameterChange = do
505- newVal <- arbitrary
503+ newVal <- CoinPerByte . Coin <$> choose ( 3000 , 6500 )
506504 proposal <- submitParameterChange SNothing $ def & ppuCoinsPerUTxOByteL .~ SJust newVal
507505 pure
508506 (proposal, getsNES (nesEsL . curPParamsEpochStateL . ppCoinsPerUTxOByteL) `shouldReturn` newVal)
@@ -511,7 +509,7 @@ eventsSpec = describe "Events" $ do
511509 rewardAccount@ (RewardAccount _ rewardCred) <- registerRewardAccount
512510 passEpoch -- prevent proposalC expiry and force it's deletion due to conflit.
513511 proposalC <- impAnn " proposalC" $ do
514- newVal <- arbitrary
512+ newVal <- CoinPerByte . Coin <$> choose ( 3000 , 6500 )
515513 paramChange <- mkParameterChangeGovAction SNothing $ (def & ppuCoinsPerUTxOByteL .~ SJust newVal)
516514 mkProposalWithRewardAccount
517515 paramChange
0 commit comments