Skip to content

Commit e7ba425

Browse files
aniketdlehins
authored andcommitted
Enable imp conformance for ENACT.
1 parent 3c58ced commit e7ba425

File tree

2 files changed

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

2 files changed

+71
-64
lines changed

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

Lines changed: 70 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -466,72 +466,79 @@ actionPrioritySpec =
466466
<$> uniformRM (30, 330)
467467
<*> uniformRM (330, 660)
468468
<*> uniformRM (660, 1000)
469-
it "proposals of same priority are enacted in order of submission" $ do
470-
modifyPParams $ ppPoolVotingThresholdsL . pvtPPSecurityGroupL .~ 1 %! 1
471-
whenPostBootstrap (modifyPParams $ ppDRepVotingThresholdsL . dvtPPEconomicGroupL .~ def)
472-
(val1, val2, val3) <- genMinFeeVals
473469

474-
committeeCs <- registerInitialCommittee
475-
(spoC, _, _) <- setupPoolWithStake $ Coin 42_000_000
476-
pGai0 <-
477-
submitParameterChange
478-
SNothing
479-
$ def & ppuMinFeeAL .~ SJust val1
480-
pGai1 <-
481-
submitParameterChange
482-
(SJust pGai0)
483-
$ def & ppuMinFeeAL .~ SJust val2
484-
pGai2 <-
485-
submitParameterChange
486-
(SJust pGai1)
487-
$ def & ppuMinFeeAL .~ SJust val3
488-
traverse_ @[]
489-
( \gaid -> do
490-
submitYesVote_ (StakePoolVoter spoC) gaid
491-
submitYesVoteCCs_ committeeCs gaid
492-
)
493-
[pGai0, pGai1, pGai2]
494-
passNEpochs 2
495-
getLastEnactedParameterChange
496-
`shouldReturn` SJust (GovPurposeId pGai2)
497-
expectNoCurrentProposals
498-
getsNES (nesEsL . curPParamsEpochStateL . ppMinFeeAL)
499-
`shouldReturn` val3
470+
disableImpInitExpectLedgerRuleConformance $
471+
-- https://github.com/IntersectMBO/formal-ledger-specifications/issues/642
472+
-- TODO: Remove this override once the issue is fixed
473+
it "proposals of same priority are enacted in order of submission" $ do
474+
modifyPParams $ ppPoolVotingThresholdsL . pvtPPSecurityGroupL .~ 1 %! 1
475+
whenPostBootstrap (modifyPParams $ ppDRepVotingThresholdsL . dvtPPEconomicGroupL .~ def)
476+
(val1, val2, val3) <- genMinFeeVals
500477

501-
it "only the first action of a transaction gets enacted" $ do
502-
modifyPParams $ ppPoolVotingThresholdsL . pvtPPSecurityGroupL .~ 1 %! 1
503-
whenPostBootstrap (modifyPParams $ ppDRepVotingThresholdsL . dvtPPEconomicGroupL .~ def)
504-
(val1, val2, val3) <- genMinFeeVals
478+
committeeCs <- registerInitialCommittee
479+
(spoC, _, _) <- setupPoolWithStake $ Coin 42_000_000
480+
pGai0 <-
481+
submitParameterChange
482+
SNothing
483+
$ def & ppuMinFeeAL .~ SJust val1
484+
pGai1 <-
485+
submitParameterChange
486+
(SJust pGai0)
487+
$ def & ppuMinFeeAL .~ SJust val2
488+
pGai2 <-
489+
submitParameterChange
490+
(SJust pGai1)
491+
$ def & ppuMinFeeAL .~ SJust val3
492+
traverse_ @[]
493+
( \gaid -> do
494+
submitYesVote_ (StakePoolVoter spoC) gaid
495+
submitYesVoteCCs_ committeeCs gaid
496+
)
497+
[pGai0, pGai1, pGai2]
498+
passNEpochs 2
499+
getLastEnactedParameterChange
500+
`shouldReturn` SJust (GovPurposeId pGai2)
501+
expectNoCurrentProposals
502+
getsNES (nesEsL . curPParamsEpochStateL . ppMinFeeAL)
503+
`shouldReturn` val3
505504

506-
committeeCs <- registerInitialCommittee
507-
(spoC, _, _) <- setupPoolWithStake $ Coin 42_000_000
508-
policy <- getGovPolicy
509-
gaids <-
510-
submitGovActions $
511-
NE.fromList
512-
[ ParameterChange
513-
SNothing
514-
(def & ppuMinFeeAL .~ SJust val1)
515-
policy
516-
, ParameterChange
517-
SNothing
518-
(def & ppuMinFeeAL .~ SJust val2)
519-
policy
520-
, ParameterChange
521-
SNothing
522-
(def & ppuMinFeeAL .~ SJust val3)
523-
policy
524-
]
525-
traverse_
526-
( \gaid -> do
527-
submitYesVote_ (StakePoolVoter spoC) gaid
528-
submitYesVoteCCs_ committeeCs gaid
529-
)
530-
gaids
531-
passNEpochs 2
532-
getsNES (nesEsL . curPParamsEpochStateL . ppMinFeeAL)
533-
`shouldReturn` val1
534-
expectNoCurrentProposals
505+
disableImpInitExpectLedgerRuleConformance $
506+
-- https://github.com/IntersectMBO/formal-ledger-specifications/issues/642
507+
-- TODO: Remove this override once the issue is fixed
508+
it "only the first action of a transaction gets enacted" $ do
509+
modifyPParams $ ppPoolVotingThresholdsL . pvtPPSecurityGroupL .~ 1 %! 1
510+
whenPostBootstrap (modifyPParams $ ppDRepVotingThresholdsL . dvtPPEconomicGroupL .~ def)
511+
(val1, val2, val3) <- genMinFeeVals
512+
513+
committeeCs <- registerInitialCommittee
514+
(spoC, _, _) <- setupPoolWithStake $ Coin 42_000_000
515+
policy <- getGovPolicy
516+
gaids <-
517+
submitGovActions $
518+
NE.fromList
519+
[ ParameterChange
520+
SNothing
521+
(def & ppuMinFeeAL .~ SJust val1)
522+
policy
523+
, ParameterChange
524+
SNothing
525+
(def & ppuMinFeeAL .~ SJust val2)
526+
policy
527+
, ParameterChange
528+
SNothing
529+
(def & ppuMinFeeAL .~ SJust val3)
530+
policy
531+
]
532+
traverse_
533+
( \gaid -> do
534+
submitYesVote_ (StakePoolVoter spoC) gaid
535+
submitYesVoteCCs_ committeeCs gaid
536+
)
537+
gaids
538+
passNEpochs 2
539+
getsNES (nesEsL . curPParamsEpochStateL . ppMinFeeAL)
540+
`shouldReturn` val1
541+
expectNoCurrentProposals
535542

536543
expectHardForkEvents ::
537544
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
@@ -154,7 +154,7 @@ spec =
154154
describe "BBODY" Bbody.spec
155155
describe "CERTS" Certs.spec
156156
describe "DELEG" Deleg.spec
157-
xdescribe "ENACT" Enact.spec
157+
describe "ENACT" Enact.spec
158158
xdescribe "EPOCH" Epoch.spec
159159
xdescribe "GOV" Gov.spec
160160
describe "GOVCERT" GovCert.spec

0 commit comments

Comments
 (0)