@@ -91,12 +91,10 @@ proposalsSpec =
91
91
92
92
initialValue <- getsNES (nesEsL . curPParamsEpochStateL . ppMinFeeAL)
93
93
94
- policy <-
95
- getsNES $
96
- nesEpochStateL . epochStateGovStateL . constitutionGovStateL . constitutionScriptL
94
+ parameterChangeAction <- mkMinFeeUpdateGovAction SNothing
97
95
govActionId <-
98
96
mkProposalWithRewardAccount
99
- ( ParameterChange SNothing (def & ppuMinFeeAL .~ SJust ( Coin 3000 )) policy)
97
+ parameterChangeAction
100
98
rewardAccount
101
99
>>= submitProposal
102
100
expectPresentGovActionId govActionId
@@ -138,15 +136,15 @@ proposalsSpec =
138
136
let ratifyState = extractDRepPulsingState (govStateFinal ^. cgsDRepPulsingStateL)
139
137
rsExpired ratifyState `shouldBe` Set. singleton govActionId
140
138
where
141
- submitParameterChangeTree = submitGovActionTree $ paramAction >=> submitGovAction
142
- paramAction p = mkParameterChangeGovAction p (def & ppuMinFeeAL .~ SJust (Coin 10 ))
139
+ submitParameterChangeTree = submitGovActionTree $ mkMinFeeUpdateGovAction >=> submitGovAction
143
140
144
141
dRepSpec ::
145
142
forall era .
146
143
ConwayEraImp era =>
147
144
SpecWith (ImpInit (LedgerSpec era ))
148
145
dRepSpec =
149
146
describe " DRep" $ do
147
+ let submitParamChangeProposal = mkMinFeeUpdateGovAction SNothing >>= submitGovAction_
150
148
it " expiry is updated based on the number of dormant epochs" $ do
151
149
modifyPParams $ ppGovActionLifetimeL .~ EpochInterval 2
152
150
(drep, _, _) <- setupSingleDRep 1_000_000
@@ -155,12 +153,10 @@ dRepSpec =
155
153
let
156
154
-- compute the epoch number that is an offset from starting epoch number
157
155
offDRepActivity = addEpochInterval startEpochNo . EpochInterval
158
- submitParamChangeProposal =
159
- submitParameterChange SNothing $ def & ppuMinFeeAL .~ SJust (Coin 3000 )
160
156
expectNumDormantEpochs 0
161
157
162
158
-- epoch 0: we submit a proposal
163
- _ <- submitParamChangeProposal
159
+ submitParamChangeProposal
164
160
passNEpochsChecking 2 $ do
165
161
expectNumDormantEpochs 0
166
162
expectDRepExpiry drep $ offDRepActivity 100
@@ -178,7 +174,7 @@ dRepSpec =
178
174
expectNumDormantEpochs 3
179
175
expectDRepExpiry drep $ offDRepActivity 100
180
176
181
- _ <- submitParamChangeProposal
177
+ submitParamChangeProposal
182
178
-- number of dormant epochs is added to the drep expiry and reset to 0
183
179
expectNumDormantEpochs 0
184
180
expectDRepExpiry drep $ offDRepActivity 103
@@ -201,12 +197,10 @@ dRepSpec =
201
197
offDRepActivity offset =
202
198
addEpochInterval startEpochNo $ EpochInterval (drepActivity + offset)
203
199
204
- let submitParamChangeProposal =
205
- submitParameterChange SNothing $ def & ppuMinFeeAL .~ SJust (Coin 3000 )
206
200
expectNumDormantEpochs 0
207
201
208
202
-- epoch 0: we submit a proposal
209
- _ <- submitParamChangeProposal
203
+ submitParamChangeProposal
210
204
passNEpochsChecking 2 $ do
211
205
expectNumDormantEpochs 0
212
206
expectDRepExpiry drep $ offDRepActivity 0
@@ -228,7 +222,7 @@ dRepSpec =
228
222
expectDRepExpiry drep $ offDRepActivity 0
229
223
expectActualDRepExpiry drep $ offDRepActivity 3
230
224
231
- _ <- submitParamChangeProposal
225
+ submitParamChangeProposal
232
226
-- number of dormant epochs is added to the drep, considering they are not actually expired,
233
227
-- and is reset to 0
234
228
expectNumDormantEpochs 0
@@ -462,7 +456,11 @@ depositMovesToTreasuryWhenStakingAddressUnregisters = do
462
456
govPolicy <- getGovPolicy
463
457
gaid <-
464
458
mkProposalWithRewardAccount
465
- (ParameterChange SNothing (emptyPParamsUpdate & ppuGovActionDepositL .~ SJust (Coin 10 )) govPolicy)
459
+ ( ParameterChange
460
+ SNothing
461
+ (emptyPParamsUpdate & ppuGovActionDepositL .~ SJust (Coin 1000000 ))
462
+ govPolicy
463
+ )
466
464
returnAddr
467
465
>>= submitProposal
468
466
expectPresentGovActionId gaid
@@ -502,7 +500,7 @@ eventsSpec = describe "Events" $ do
502
500
propDeposit <- getsNES $ nesEsL . curPParamsEpochStateL . ppGovActionDepositL
503
501
let
504
502
proposeParameterChange = do
505
- newVal <- arbitrary
503
+ newVal <- CoinPerByte . Coin <$> choose ( 3000 , 6500 )
506
504
proposal <- submitParameterChange SNothing $ def & ppuCoinsPerUTxOByteL .~ SJust newVal
507
505
pure
508
506
(proposal, getsNES (nesEsL . curPParamsEpochStateL . ppCoinsPerUTxOByteL) `shouldReturn` newVal)
@@ -511,7 +509,7 @@ eventsSpec = describe "Events" $ do
511
509
rewardAccount@ (RewardAccount _ rewardCred) <- registerRewardAccount
512
510
passEpoch -- prevent proposalC expiry and force it's deletion due to conflit.
513
511
proposalC <- impAnn " proposalC" $ do
514
- newVal <- arbitrary
512
+ newVal <- CoinPerByte . Coin <$> choose ( 3000 , 6500 )
515
513
paramChange <- mkParameterChangeGovAction SNothing $ (def & ppuCoinsPerUTxOByteL .~ SJust newVal)
516
514
mkProposalWithRewardAccount
517
515
paramChange
0 commit comments