Skip to content

SPO ratification takes less epochs than expected #5420

@carlostome

Description

@carlostome

The last part of test StakePool/Rewards contribute to active voting stake even in the absence of StakeDistr reads as follows:

            -- The same vote should now successfully ratify the proposal
            -- NOTE: It takes 2 epochs for SPO votes as opposed to 1 epoch
            -- for DRep votes to ratify a proposal.
            passNEpochs 2
            getLastEnactedCommittee `shouldReturn` SJust (GovPurposeId addCCGaid)

Transforming the note into testable conditions:

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 40de5fb30..9dd7c5981 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
@@ -1069,7 +1069,11 @@ votingSpec =
             -- The same vote should now successfully ratify the proposal
             -- NOTE: It takes 2 epochs for SPO votes as opposed to 1 epoch
             -- for DRep votes to ratify a proposal.
-            passNEpochs 2
+            passNEpochs 1
+            isSpoAccepted addCCGaid `shouldReturn` False
+            getLastEnactedCommittee `shouldReturn` SNothing
+            passNEpochs 1
+            isSpoAccepted addCCGaid `shouldReturn` True
             getLastEnactedCommittee `shouldReturn` SJust (GovPurposeId addCCGaid)
         describe "Proposal deposits contribute to active voting stake" $ do
           it "Directly" $ whenPostBootstrap $ do

makes the test fail for protocol versions 10 and 11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions