Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class (EraPParams era, Eq (GovState era), Show (GovState era), NoThunks (GovState era), NFData (GovState era), EncCBOR (GovState era), DecCBOR (GovState era), DecShareCBOR (GovState era), ToCBOR (GovState era), FromCBOR (GovState era), Default (GovState era), ToJSON (GovState era)) ⇒ EraGov era where
- type GovState era = (r ∷ Type) | r → era
- emptyGovState ∷ GovState era
- getProposedPPUpdates ∷ GovState era → Maybe (ProposedPPUpdates era)
- curPParamsGovStateL ∷ Lens' (GovState era) (PParams era)
- prevPParamsGovStateL ∷ Lens' (GovState era) (PParams era)
- futurePParamsGovStateL ∷ Lens' (GovState era) (FuturePParams era)
- obligationGovState ∷ GovState era → Obligations
- data EnactState era = EnactState {
- ensCommittee ∷ !(StrictMaybe (Committee era))
- ensConstitution ∷ !(Constitution era)
- ensCurPParams ∷ !(PParams era)
- ensPrevPParams ∷ !(PParams era)
- ensTreasury ∷ !Coin
- ensWithdrawals ∷ !(Map (Credential 'Staking) Coin)
- ensPrevGovActionIds ∷ !(GovRelation StrictMaybe era)
- data RatifyState era = RatifyState {
- rsEnactState ∷ !(EnactState era)
- rsEnacted ∷ !(Seq (GovActionState era))
- rsExpired ∷ !(Set GovActionId)
- rsDelayed ∷ !Bool
- data RatifyEnv era = RatifyEnv {
- reStakeDistr ∷ !(Map (Credential 'Staking) (CompactForm Coin))
- reStakePoolDistr ∷ !PoolDistr
- reDRepDistr ∷ !(Map DRep (CompactForm Coin))
- reDRepState ∷ !(Map (Credential 'DRepRole) DRepState)
- reCurrentEpoch ∷ !EpochNo
- reCommitteeState ∷ !(CommitteeState era)
- reDelegatees ∷ !(Map (Credential 'Staking) DRep)
- rePoolParams ∷ !(Map (KeyHash 'StakePool) PoolParams)
- newtype RatifySignal era = RatifySignal {
- unRatifySignal ∷ StrictSeq (GovActionState era)
- data ConwayGovState era = ConwayGovState {
- cgsProposals ∷ !(Proposals era)
- cgsCommittee ∷ !(StrictMaybe (Committee era))
- cgsConstitution ∷ !(Constitution era)
- cgsCurPParams ∷ !(PParams era)
- cgsPrevPParams ∷ !(PParams era)
- cgsFuturePParams ∷ !(FuturePParams era)
- cgsDRepPulsingState ∷ !(DRepPulsingState era)
- predictFuturePParams ∷ ConwayGovState era → ConwayGovState era
- data Committee era = Committee {}
- committeeMembersL ∷ Lens' (Committee era) (Map (Credential 'ColdCommitteeRole) EpochNo)
- committeeThresholdL ∷ Lens' (Committee era) UnitInterval
- data GovAction era
- = ParameterChange !(StrictMaybe (GovPurposeId 'PParamUpdatePurpose era)) !(PParamsUpdate era) !(StrictMaybe ScriptHash)
- | HardForkInitiation !(StrictMaybe (GovPurposeId 'HardForkPurpose era)) !ProtVer
- | TreasuryWithdrawals !(Map RewardAccount Coin) !(StrictMaybe ScriptHash)
- | NoConfidence !(StrictMaybe (GovPurposeId 'CommitteePurpose era))
- | UpdateCommittee !(StrictMaybe (GovPurposeId 'CommitteePurpose era)) !(Set (Credential 'ColdCommitteeRole)) !(Map (Credential 'ColdCommitteeRole) EpochNo) !UnitInterval
- | NewConstitution !(StrictMaybe (GovPurposeId 'ConstitutionPurpose era)) !(Constitution era)
- | InfoAction
- data GovActionState era = GovActionState {
- gasId ∷ !GovActionId
- gasCommitteeVotes ∷ !(Map (Credential 'HotCommitteeRole) Vote)
- gasDRepVotes ∷ !(Map (Credential 'DRepRole) Vote)
- gasStakePoolVotes ∷ !(Map (KeyHash 'StakePool) Vote)
- gasProposalProcedure ∷ !(ProposalProcedure era)
- gasProposedIn ∷ !EpochNo
- gasExpiresAfter ∷ !EpochNo
- newtype GovActionIx = GovActionIx {}
- data GovActionId = GovActionId {}
- data GovActionPurpose
- class ToGovActionPurpose (p ∷ GovActionPurpose)
- isGovActionWithPurpose ∷ ∀ p era. ToGovActionPurpose p ⇒ GovAction era → Bool
- data DRepPulsingState era
- = DRPulsing !(DRepPulser era Identity (RatifyState era))
- | DRComplete !(PulsingSnapshot era) !(RatifyState era)
- data DRepPulser era (m ∷ Type → Type) ans where
- DRepPulser ∷ ∀ era ans m. (ans ~ RatifyState era, m ~ Identity, RunConwayRatify era) ⇒ {..} → DRepPulser era m ans
- govActionIdToText ∷ GovActionId → Text
- data Voter
- data Vote
- data VotingProcedure era = VotingProcedure {
- vProcVote ∷ !Vote
- vProcAnchor ∷ !(StrictMaybe Anchor)
- newtype VotingProcedures era = VotingProcedures {
- unVotingProcedures ∷ Map Voter (Map GovActionId (VotingProcedure era))
- foldlVotingProcedures ∷ (c → Voter → GovActionId → VotingProcedure era → c) → c → VotingProcedures era → c
- foldrVotingProcedures ∷ (Voter → GovActionId → VotingProcedure era → c → c) → c → VotingProcedures era → c
- data ProposalProcedure era = ProposalProcedure {
- pProcDeposit ∷ !Coin
- pProcReturnAddr ∷ !RewardAccount
- pProcGovAction ∷ !(GovAction era)
- pProcAnchor ∷ !Anchor
- data Anchor = Anchor {
- anchorUrl ∷ !Url
- anchorDataHash ∷ !(SafeHash AnchorData)
- newtype AnchorData = AnchorData ByteString
- indexedGovProps ∷ Seq (ProposalProcedure era) → Seq (GovActionIx, ProposalProcedure era)
- data Constitution era = Constitution {}
- class EraGov era ⇒ ConwayEraGov era where
- constitutionGovStateL ∷ Lens' (GovState era) (Constitution era)
- proposalsGovStateL ∷ Lens' (GovState era) (Proposals era)
- drepPulsingStateGovStateL ∷ Lens' (GovState era) (DRepPulsingState era)
- committeeGovStateL ∷ Lens' (GovState era) (StrictMaybe (Committee era))
- votingStakePoolThreshold ∷ ConwayEraPParams era ⇒ RatifyState era → GovAction era → StrictMaybe UnitInterval
- votingDRepThreshold ∷ ConwayEraPParams era ⇒ RatifyState era → GovAction era → StrictMaybe UnitInterval
- votingCommitteeThreshold ∷ ConwayEraPParams era ⇒ EpochNo → RatifyState era → CommitteeState era → GovAction era → StrictMaybe UnitInterval
- isStakePoolVotingAllowed ∷ ConwayEraPParams era ⇒ GovAction era → Bool
- isDRepVotingAllowed ∷ ConwayEraPParams era ⇒ GovAction era → Bool
- isCommitteeVotingAllowed ∷ ConwayEraPParams era ⇒ EpochNo → CommitteeState era → GovAction era → Bool
- reorderActions ∷ StrictSeq (GovActionState era) → StrictSeq (GovActionState era)
- actionPriority ∷ GovAction era → Int
- data Proposals era
- mkProposals ∷ (EraPParams era, MonadFail m) ⇒ GovRelation StrictMaybe era → OMap GovActionId (GovActionState era) → m (Proposals era)
- unsafeMkProposals ∷ (HasCallStack, EraPParams era) ⇒ GovRelation StrictMaybe era → OMap GovActionId (GovActionState era) → Proposals era
- newtype GovPurposeId (p ∷ GovActionPurpose) era = GovPurposeId {}
- data PRoot a = PRoot {
- prRoot ∷ !(StrictMaybe a)
- prChildren ∷ !(Set a)
- data PEdges a = PEdges {
- peParent ∷ !(StrictMaybe a)
- peChildren ∷ !(Set a)
- newtype PGraph a = PGraph {}
- pRootsL ∷ Lens' (Proposals era) (GovRelation PRoot era)
- pPropsL ∷ Lens' (Proposals era) (OMap GovActionId (GovActionState era))
- prRootL ∷ Lens' (PRoot a) (StrictMaybe a)
- prChildrenL ∷ Lens' (PRoot a) (Set a)
- peChildrenL ∷ Lens' (PEdges a) (Set a)
- pGraphL ∷ Lens' (Proposals era) (GovRelation PGraph era)
- pGraphNodesL ∷ Lens' (PGraph a) (Map a (PEdges a))
- data GovRelation (f ∷ Type → Type) era = GovRelation {
- grPParamUpdate ∷ !(f (GovPurposeId 'PParamUpdatePurpose era))
- grHardFork ∷ !(f (GovPurposeId 'HardForkPurpose era))
- grCommittee ∷ !(f (GovPurposeId 'CommitteePurpose era))
- grConstitution ∷ !(f (GovPurposeId 'ConstitutionPurpose era))
- hoistGovRelation ∷ (∀ a. f a → g a) → GovRelation f era → GovRelation g era
- withGovActionParent ∷ GovActionState era → a → (∀ p. (∀ f. Lens' (GovRelation f era) (f (GovPurposeId p era))) → StrictMaybe (GovPurposeId p era) → GovPurposeId p era → a) → a
- toPrevGovActionIds ∷ GovRelation PRoot era → GovRelation StrictMaybe era
- fromPrevGovActionIds ∷ GovRelation StrictMaybe era → GovRelation PRoot era
- grPParamUpdateL ∷ Lens' (GovRelation f era) (f (GovPurposeId 'PParamUpdatePurpose era))
- grHardForkL ∷ Lens' (GovRelation f era) (f (GovPurposeId 'HardForkPurpose era))
- grCommitteeL ∷ Lens' (GovRelation f era) (f (GovPurposeId 'CommitteePurpose era))
- grConstitutionL ∷ Lens' (GovRelation f era) (f (GovPurposeId 'ConstitutionPurpose era))
- proposalsActions ∷ Proposals era → StrictSeq (GovActionState era)
- proposalsDeposits ∷ Proposals era → Map (Credential 'Staking) (CompactForm Coin)
- proposalsAddAction ∷ ∀ era. (EraPParams era, HasCallStack) ⇒ GovActionState era → Proposals era → Maybe (Proposals era)
- proposalsRemoveWithDescendants ∷ EraPParams era ⇒ Set GovActionId → Proposals era → (Proposals era, Map GovActionId (GovActionState era))
- proposalsAddVote ∷ Voter → Vote → GovActionId → Proposals era → Proposals era
- proposalsIds ∷ Proposals era → StrictSeq GovActionId
- proposalsApplyEnactment ∷ ∀ era. EraPParams era ⇒ Seq (GovActionState era) → Set GovActionId → Proposals era → (Proposals era, Map GovActionId (GovActionState era), Map GovActionId (GovActionState era), Map GovActionId (GovActionState era))
- proposalsSize ∷ Proposals era → Int
- proposalsLookupId ∷ GovActionId → Proposals era → Maybe (GovActionState era)
- proposalsActionsMap ∷ Proposals era → Map GovActionId (GovActionState era)
- proposalsWithPurpose ∷ ∀ p era. ToGovActionPurpose p ⇒ (∀ f. Lens' (GovRelation f era) (f (GovPurposeId p era))) → Proposals era → Map (GovPurposeId p era) (GovActionState era)
- cgsProposalsL ∷ Lens' (ConwayGovState era) (Proposals era)
- cgsDRepPulsingStateL ∷ Lens' (ConwayGovState era) (DRepPulsingState era)
- cgsCurPParamsL ∷ Lens' (ConwayGovState era) (PParams era)
- cgsPrevPParamsL ∷ Lens' (ConwayGovState era) (PParams era)
- cgsFuturePParamsL ∷ Lens' (ConwayGovState era) (FuturePParams era)
- cgsCommitteeL ∷ Lens' (ConwayGovState era) (StrictMaybe (Committee era))
- cgsConstitutionL ∷ Lens' (ConwayGovState era) (Constitution era)
- ensCommitteeL ∷ Lens' (EnactState era) (StrictMaybe (Committee era))
- ensConstitutionL ∷ Lens' (EnactState era) (Constitution era)
- ensCurPParamsL ∷ Lens' (EnactState era) (PParams era)
- ensPrevPParamsL ∷ Lens' (EnactState era) (PParams era)
- ensWithdrawalsL ∷ Lens' (EnactState era) (Map (Credential 'Staking) Coin)
- ensTreasuryL ∷ Lens' (EnactState era) Coin
- ensPrevGovActionIdsL ∷ Lens' (EnactState era) (GovRelation StrictMaybe era)
- ensPrevPParamUpdateL ∷ Lens' (EnactState era) (StrictMaybe (GovPurposeId 'PParamUpdatePurpose era))
- ensPrevHardForkL ∷ Lens' (EnactState era) (StrictMaybe (GovPurposeId 'HardForkPurpose era))
- ensPrevCommitteeL ∷ Lens' (EnactState era) (StrictMaybe (GovPurposeId 'CommitteePurpose era))
- ensPrevConstitutionL ∷ Lens' (EnactState era) (StrictMaybe (GovPurposeId 'ConstitutionPurpose era))
- ensProtVerL ∷ EraPParams era ⇒ Lens' (EnactState era) ProtVer
- rsEnactStateL ∷ Lens' (RatifyState era) (EnactState era)
- rsExpiredL ∷ Lens' (RatifyState era) (Set GovActionId)
- rsEnactedL ∷ Lens' (RatifyState era) (Seq (GovActionState era))
- rsDelayedL ∷ Lens' (RatifyState era) Bool
- constitutionScriptL ∷ Lens' (Constitution era) (StrictMaybe ScriptHash)
- constitutionAnchorL ∷ Lens' (Constitution era) Anchor
- gasIdL ∷ Lens' (GovActionState era) GovActionId
- gasDepositL ∷ Lens' (GovActionState era) Coin
- gasCommitteeVotesL ∷ Lens' (GovActionState era) (Map (Credential 'HotCommitteeRole) Vote)
- gasDRepVotesL ∷ Lens' (GovActionState era) (Map (Credential 'DRepRole) Vote)
- gasStakePoolVotesL ∷ Lens' (GovActionState era) (Map (KeyHash 'StakePool) Vote)
- gasExpiresAfterL ∷ Lens' (GovActionState era) EpochNo
- gasActionL ∷ Lens' (GovActionState era) (GovAction era)
- gasReturnAddrL ∷ Lens' (GovActionState era) RewardAccount
- gasProposedInL ∷ Lens' (GovActionState era) EpochNo
- gasProposalProcedureL ∷ Lens' (GovActionState era) (ProposalProcedure era)
- gasDeposit ∷ GovActionState era → Coin
- gasAction ∷ GovActionState era → GovAction era
- gasReturnAddr ∷ GovActionState era → RewardAccount
- pProcDepositL ∷ Lens' (ProposalProcedure era) Coin
- pProcGovActionL ∷ Lens' (ProposalProcedure era) (GovAction era)
- pProcReturnAddrL ∷ Lens' (ProposalProcedure era) RewardAccount
- pProcAnchorL ∷ Lens' (ProposalProcedure era) Anchor
- newEpochStateDRepPulsingStateL ∷ ConwayEraGov era ⇒ Lens' (NewEpochState era) (DRepPulsingState era)
- epochStateDRepPulsingStateL ∷ ConwayEraGov era ⇒ Lens' (EpochState era) (DRepPulsingState era)
- epochStateStakeDistrL ∷ Lens' (EpochState era) (VMap VB VP (Credential 'Staking) (CompactForm Coin))
- epochStateIncrStakeDistrL ∷ Lens' (EpochState era) (Map (Credential 'Staking) (CompactForm Coin))
- epochStateRegDrepL ∷ Lens' (EpochState era) (Map (Credential 'DRepRole) DRepState)
- epochStateUMapL ∷ Lens' (EpochState era) UMap
- pulseDRepPulsingState ∷ DRepPulsingState era → DRepPulsingState era
- completeDRepPulsingState ∷ DRepPulsingState era → DRepPulsingState era
- extractDRepPulsingState ∷ DRepPulsingState era → RatifyState era
- forceDRepPulsingState ∷ ConwayEraGov era ⇒ NewEpochState era → NewEpochState era
- finishDRepPulser ∷ ∀ era. DRepPulsingState era → (PulsingSnapshot era, RatifyState era)
- computeDRepDistr ∷ Map (Credential 'Staking) (CompactForm Coin) → Map (Credential 'DRepRole) DRepState → Map (Credential 'Staking) (CompactForm Coin) → PoolDistr → Map DRep (CompactForm Coin) → Map (Credential 'Staking) UMElem → (Map DRep (CompactForm Coin), PoolDistr)
- getRatifyState ∷ ConwayGovState era → RatifyState era
- conwayGovStateDRepDistrG ∷ SimpleGetter (ConwayGovState era) (Map DRep (CompactForm Coin))
- psDRepDistrG ∷ SimpleGetter (DRepPulsingState era) (Map DRep (CompactForm Coin))
- data PulsingSnapshot era = PulsingSnapshot {
- psProposals ∷ !(StrictSeq (GovActionState era))
- psDRepDistr ∷ !(Map DRep (CompactForm Coin))
- psDRepState ∷ !(Map (Credential 'DRepRole) DRepState)
- psPoolDistr ∷ Map (KeyHash 'StakePool) (CompactForm Coin)
- setCompleteDRepPulsingState ∷ GovState era ~ ConwayGovState era ⇒ PulsingSnapshot era → RatifyState era → EpochState era → EpochState era
- setFreshDRepPulsingState ∷ (GovState era ~ ConwayGovState era, Monad m, RunConwayRatify era, ConwayEraGov era) ⇒ EpochNo → PoolDistr → EpochState era → ReaderT Globals m (EpochState era)
- psProposalsL ∷ Lens' (PulsingSnapshot era) (StrictSeq (GovActionState era))
- psDRepDistrL ∷ Lens' (PulsingSnapshot era) (Map DRep (CompactForm Coin))
- psDRepStateL ∷ Lens' (PulsingSnapshot era) (Map (Credential 'DRepRole) DRepState)
- psPoolDistrL ∷ Lens' (PulsingSnapshot era) (Map (KeyHash 'StakePool) (CompactForm Coin))
- class (STS (ConwayRATIFY era), Signal (ConwayRATIFY era) ~ RatifySignal era, BaseM (ConwayRATIFY era) ~ Reader Globals, Environment (ConwayRATIFY era) ~ RatifyEnv era, State (ConwayRATIFY era) ~ RatifyState era, PredicateFailure (ConwayRATIFY era) ~ Void) ⇒ RunConwayRatify era where
- runConwayRatify ∷ Globals → RatifyEnv era → RatifyState era → RatifySignal era → RatifyState era
- govStatePrevGovActionIds ∷ ConwayEraGov era ⇒ GovState era → GovRelation StrictMaybe era
- mkEnactState ∷ ConwayEraGov era ⇒ GovState era → EnactState era
- ratifySignalL ∷ Lens' (RatifySignal era) (StrictSeq (GovActionState era))
- reStakeDistrL ∷ Lens' (RatifyEnv era) (Map (Credential 'Staking) (CompactForm Coin))
- reStakePoolDistrL ∷ Lens' (RatifyEnv era) PoolDistr
- reDRepDistrL ∷ Lens' (RatifyEnv era) (Map DRep (CompactForm Coin))
- reDRepStateL ∷ Lens' (RatifyEnv era) (Map (Credential 'DRepRole) DRepState)
- reCurrentEpochL ∷ Lens' (RatifyEnv era) EpochNo
- reCommitteeStateL ∷ Lens' (RatifyEnv era) (CommitteeState era)
- data DefaultVote
- defaultStakePoolVote ∷ KeyHash 'StakePool → Map (KeyHash 'StakePool) PoolParams → Map (Credential 'Staking) DRep → DefaultVote
- pparamsUpdateThreshold ∷ ∀ era. ConwayEraPParams era ⇒ DRepVotingThresholds → PParamsUpdate era → UnitInterval
- data TreeMaybe a = TreeMaybe {
- unTreeMaybe ∷ Tree (StrictMaybe a)
- toGovRelationTree ∷ (Era era, HasCallStack) ⇒ Proposals era → GovRelation TreeMaybe era
- toGovRelationTreeEither ∷ Era era ⇒ Proposals era → Either String (GovRelation TreeMaybe era)
- showGovActionType ∷ GovAction era → String
Documentation
class (EraPParams era, Eq (GovState era), Show (GovState era), NoThunks (GovState era), NFData (GovState era), EncCBOR (GovState era), DecCBOR (GovState era), DecShareCBOR (GovState era), ToCBOR (GovState era), FromCBOR (GovState era), Default (GovState era), ToJSON (GovState era)) ⇒ EraGov era where Source #
emptyGovState ∷ GovState era Source #
Construct empty governance state
getProposedPPUpdates ∷ GovState era → Maybe (ProposedPPUpdates era) Source #
Returns Nothing
for all eras starting with Conway, otherwise returns proposed
pparams updates
curPParamsGovStateL ∷ Lens' (GovState era) (PParams era) Source #
Lens for accessing current protocol parameters
prevPParamsGovStateL ∷ Lens' (GovState era) (PParams era) Source #
Lens for accessing the previous protocol parameters
futurePParamsGovStateL ∷ Lens' (GovState era) (FuturePParams era) Source #
Lens for accessing the future protocol parameters.
This lens will produce DefinitePParamsUpdate
whenever we are absolutely sure that
the new PParams will be updated. Which means there will be no chance of a
DefinitePParamsUpdate
value until we are past the point of no return, which is 2
stability windows before the end of the epoch. This lens is mostly intended for
ledger usage and nextEpochUpdatedPParams
should be used instead whenever definite
results are desired.
obligationGovState ∷ GovState era → Obligations Source #
Instances
data EnactState era Source #
EnactState | |
|
Instances
data RatifyState era Source #
RatifyState
stores information about what will happen to the active
governance actions at the next epoch boundary.
RatifyState | |
|
Instances
RatifyEnv | |
|
Instances
newtype RatifySignal era Source #
Instances
data ConwayGovState era Source #
Conway governance state
ConwayGovState | |
|
Instances
predictFuturePParams ∷ ConwayGovState era → ConwayGovState era Source #
This function updates the thunk, which will contain new PParams once evaluated or Nothing when there was no update. At the same time if we already know the future of PParams, then it will act as an identity function.
Committee | |
|
Instances
committeeMembersL ∷ Lens' (Committee era) (Map (Credential 'ColdCommitteeRole) EpochNo) Source #
committeeThresholdL ∷ Lens' (Committee era) UnitInterval Source #
Note that the previous governance action id is only optional for the very first governance action of the same purpose.
Instances
data GovActionState era Source #
GovActionState | |
|
Instances
newtype GovActionIx Source #
Instances
data GovActionId Source #
Instances
data GovActionPurpose Source #
Instances
Generic GovActionPurpose Source # | |
Defined in Cardano.Ledger.Conway.Governance.Procedures | |
Show GovActionPurpose Source # | |
Defined in Cardano.Ledger.Conway.Governance.Procedures | |
Eq GovActionPurpose Source # | |
type Rep GovActionPurpose Source # | |
Defined in Cardano.Ledger.Conway.Governance.Procedures type Rep GovActionPurpose = D1 ('MetaData "GovActionPurpose" "Cardano.Ledger.Conway.Governance.Procedures" "cardano-ledger-conway-1.19.0.0-inplace" 'False) ((C1 ('MetaCons "PParamUpdatePurpose" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "HardForkPurpose" 'PrefixI 'False) (U1 ∷ Type → Type)) :+: (C1 ('MetaCons "CommitteePurpose" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "ConstitutionPurpose" 'PrefixI 'False) (U1 ∷ Type → Type))) |
class ToGovActionPurpose (p ∷ GovActionPurpose) Source #
toGovActionPurpose
isGovActionWithPurpose ∷ ∀ p era. ToGovActionPurpose p ⇒ GovAction era → Bool Source #
data DRepPulsingState era Source #
DRPulsing !(DRepPulser era Identity (RatifyState era)) | |
DRComplete !(PulsingSnapshot era) !(RatifyState era) |
Instances
data DRepPulser era (m ∷ Type → Type) ans where Source #
The type of a Pulser which uses computeDRepDistr
as its underlying
function. Note that we use two type equality (~) constraints to fix both
the monad m
and the ans
type, to the context where we will use the
type as a Pulser. The type DRepPulser must have m
and ans
as its last
two parameters so we can make a Pulsable instance. We will always use this
instantiation (DRepPulser era Identity (RatifyState era))
DRepPulser | |
|
Instances
CommitteeVoter !(Credential 'HotCommitteeRole) | |
DRepVoter !(Credential 'DRepRole) | |
StakePoolVoter !(KeyHash 'StakePool) |
Instances
Instances
ToJSON Vote Source # | |
Bounded Vote Source # | |
Enum Vote Source # | |
Defined in Cardano.Ledger.Conway.Governance.Procedures | |
Generic Vote Source # | |
Show Vote Source # | |
DecCBOR Vote Source # | |
EncCBOR Vote Source # | |
NFData Vote Source # | |
Defined in Cardano.Ledger.Conway.Governance.Procedures | |
Eq Vote Source # | |
Ord Vote Source # | |
NoThunks Vote Source # | |
type Rep Vote Source # | |
Defined in Cardano.Ledger.Conway.Governance.Procedures type Rep Vote = D1 ('MetaData "Vote" "Cardano.Ledger.Conway.Governance.Procedures" "cardano-ledger-conway-1.19.0.0-inplace" 'False) (C1 ('MetaCons "VoteNo" 'PrefixI 'False) (U1 ∷ Type → Type) :+: (C1 ('MetaCons "VoteYes" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "Abstain" 'PrefixI 'False) (U1 ∷ Type → Type))) |
data VotingProcedure era Source #
Instances
newtype VotingProcedures era Source #
Instances
foldlVotingProcedures Source #
∷ (c → Voter → GovActionId → VotingProcedure era → c) | Accumulating function |
→ c | Initial accumulator |
→ VotingProcedures era | Procedures to fold over |
→ c |
foldrVotingProcedures Source #
∷ (Voter → GovActionId → VotingProcedure era → c → c) | Accumulating function |
→ c | Initial accumulator |
→ VotingProcedures era | Procedures to fold over |
→ c |
data ProposalProcedure era Source #
ProposalProcedure | |
|
Instances
Anchor | |
|
Instances
FromJSON Anchor | |
ToJSON Anchor | |
Generic Anchor | |
Show Anchor | |
DecCBOR Anchor | |
EncCBOR Anchor | |
Default Anchor | |
Defined in Cardano.Ledger.BaseTypes | |
NFData Anchor | |
Defined in Cardano.Ledger.BaseTypes | |
Eq Anchor | |
Ord Anchor | |
Defined in Cardano.Ledger.BaseTypes | |
NoThunks Anchor | |
type Rep Anchor | |
Defined in Cardano.Ledger.BaseTypes type Rep Anchor = D1 ('MetaData "Anchor" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Anchor" 'PrefixI 'True) (S1 ('MetaSel ('Just "anchorUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Url) :*: S1 ('MetaSel ('Just "anchorDataHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SafeHash AnchorData)))) |
newtype AnchorData Source #
Instances
SafeToHash AnchorData | |
Defined in Cardano.Ledger.BaseTypes | |
Eq AnchorData | |
Defined in Cardano.Ledger.BaseTypes (==) ∷ AnchorData → AnchorData → Bool Source # (/=) ∷ AnchorData → AnchorData → Bool Source # | |
HashAnnotated AnchorData AnchorData | |
Defined in Cardano.Ledger.BaseTypes |
indexedGovProps ∷ Seq (ProposalProcedure era) → Seq (GovActionIx, ProposalProcedure era) Source #
Attaches indices to a sequence of proposal procedures. The indices grow from left to right.
data Constitution era Source #
Instances
class EraGov era ⇒ ConwayEraGov era where Source #
constitutionGovStateL ∷ Lens' (GovState era) (Constitution era) Source #
proposalsGovStateL ∷ Lens' (GovState era) (Proposals era) Source #
drepPulsingStateGovStateL ∷ Lens' (GovState era) (DRepPulsingState era) Source #
committeeGovStateL ∷ Lens' (GovState era) (StrictMaybe (Committee era)) Source #
Instances
votingStakePoolThreshold ∷ ConwayEraPParams era ⇒ RatifyState era → GovAction era → StrictMaybe UnitInterval Source #
votingDRepThreshold ∷ ConwayEraPParams era ⇒ RatifyState era → GovAction era → StrictMaybe UnitInterval Source #
votingCommitteeThreshold ∷ ConwayEraPParams era ⇒ EpochNo → RatifyState era → CommitteeState era → GovAction era → StrictMaybe UnitInterval Source #
isStakePoolVotingAllowed ∷ ConwayEraPParams era ⇒ GovAction era → Bool Source #
isDRepVotingAllowed ∷ ConwayEraPParams era ⇒ GovAction era → Bool Source #
isCommitteeVotingAllowed ∷ ConwayEraPParams era ⇒ EpochNo → CommitteeState era → GovAction era → Bool Source #
reorderActions ∷ StrictSeq (GovActionState era) → StrictSeq (GovActionState era) Source #
actionPriority ∷ GovAction era → Int Source #
Self-contained representation of all 4 proposals trees. This forest
is made up of only action-ids for nodes - full GovActionState
s are
stored only once in the OMap
. All functions in this module prefixed
with the string proposals-
operate on this data-type keeping it
consistent.
NOTE: The correct way to think about this data-structure is similar
to 4 of the following, one for each GovActionPurpose
data Tree a = Node (StrictMaybe a) [Tree a]
but because this does not allow us to look-up a node's edges in
predictable time, we use a map from nodes to their edges (parent and
children) to capture the graph (
). We also need to always
know the roots of the 4 trees, and those we store in the PGraph
PRoot
NOTE: At the end of an epoch boundary, we expect
to be the same
as the pRoots
from the PrevGovActionIds
EnactState
Instances
mkProposals ∷ (EraPParams era, MonadFail m) ⇒ GovRelation StrictMaybe era → OMap GovActionId (GovActionState era) → m (Proposals era) Source #
Reconstruct the
forest from an Proposals
of
OMap
s and the 4 roots (GovActionState
)PrevGovActionIds
unsafeMkProposals ∷ (HasCallStack, EraPParams era) ⇒ GovRelation StrictMaybe era → OMap GovActionId (GovActionState era) → Proposals era Source #
Reconstruct the
forest from an Proposals
of
OMap
s and the 4 roots (GovActionState
).
This function can fail and may return a malformed PrevGovActionIds
Proposals
if not given correct inputs.
WARNING: Should only be used for testing!
newtype GovPurposeId (p ∷ GovActionPurpose) era Source #
Instances
The root of a single Proposals
tree. prRoot
is always expected
to be equal to the respective PrevGovActionId
at the end of every
epoch boundary
PRoot | |
|
Instances
Generic (PRoot a) Source # | |
Show a ⇒ Show (PRoot a) Source # | |
Default (PRoot a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
NFData a ⇒ NFData (PRoot a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
Eq a ⇒ Eq (PRoot a) Source # | |
Ord a ⇒ Ord (PRoot a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
NoThunks a ⇒ NoThunks (PRoot a) Source # | |
type Rep (PRoot a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals type Rep (PRoot a) = D1 ('MetaData "PRoot" "Cardano.Ledger.Conway.Governance.Proposals" "cardano-ledger-conway-1.19.0.0-inplace" 'False) (C1 ('MetaCons "PRoot" 'PrefixI 'True) (S1 ('MetaSel ('Just "prRoot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe a)) :*: S1 ('MetaSel ('Just "prChildren") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set a)))) |
A non-root edges in a Proposals
tree. peParent
is expected to be
a SNothing
only at the begining when no governance actions has been
enacted yet.
PEdges | |
|
Instances
Generic (PEdges a) Source # | |
Show a ⇒ Show (PEdges a) Source # | |
Default (PEdges a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
NFData a ⇒ NFData (PEdges a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
Eq a ⇒ Eq (PEdges a) Source # | |
Ord a ⇒ Ord (PEdges a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
NoThunks a ⇒ NoThunks (PEdges a) Source # | |
type Rep (PEdges a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals type Rep (PEdges a) = D1 ('MetaData "PEdges" "Cardano.Ledger.Conway.Governance.Proposals" "cardano-ledger-conway-1.19.0.0-inplace" 'False) (C1 ('MetaCons "PEdges" 'PrefixI 'True) (S1 ('MetaSel ('Just "peParent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe a)) :*: S1 ('MetaSel ('Just "peChildren") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set a)))) |
A single proposal-tree. This map represents all the action-ids that form a tree.
Instances
Generic (PGraph a) Source # | |
Show a ⇒ Show (PGraph a) Source # | |
Default (PGraph a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
NFData a ⇒ NFData (PGraph a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
Eq a ⇒ Eq (PGraph a) Source # | |
Ord a ⇒ Ord (PGraph a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals | |
NoThunks a ⇒ NoThunks (PGraph a) Source # | |
type Rep (PGraph a) Source # | |
Defined in Cardano.Ledger.Conway.Governance.Proposals |
pPropsL ∷ Lens' (Proposals era) (OMap GovActionId (GovActionState era)) Source #
data GovRelation (f ∷ Type → Type) era Source #
Abstract data type for representing relationship of governance action with the same purpose
GovRelation | |
|
Instances
hoistGovRelation ∷ (∀ a. f a → g a) → GovRelation f era → GovRelation g era Source #
∷ GovActionState era | |
→ a | The result to be used for governance actions that can't have a parent |
→ (∀ p. (∀ f. Lens' (GovRelation f era) (f (GovPurposeId p era))) → StrictMaybe (GovPurposeId p era) → GovPurposeId p era → a) | Function that will be applied to a lens and a parent |
→ a |
Apply a function to a GovAction that can have a parent.
toPrevGovActionIds ∷ GovRelation PRoot era → GovRelation StrictMaybe era Source #
fromPrevGovActionIds ∷ GovRelation StrictMaybe era → GovRelation PRoot era Source #
grPParamUpdateL ∷ Lens' (GovRelation f era) (f (GovPurposeId 'PParamUpdatePurpose era)) Source #
grHardForkL ∷ Lens' (GovRelation f era) (f (GovPurposeId 'HardForkPurpose era)) Source #
grCommitteeL ∷ Lens' (GovRelation f era) (f (GovPurposeId 'CommitteePurpose era)) Source #
grConstitutionL ∷ Lens' (GovRelation f era) (f (GovPurposeId 'ConstitutionPurpose era)) Source #
proposalsActions ∷ Proposals era → StrictSeq (GovActionState era) Source #
Get the sequence of GovActionState
s
proposalsDeposits ∷ Proposals era → Map (Credential 'Staking) (CompactForm Coin) Source #
Get a mapping from the reward-account staking credentials to deposits of all proposals.
proposalsAddAction ∷ ∀ era. (EraPParams era, HasCallStack) ⇒ GovActionState era → Proposals era → Maybe (Proposals era) Source #
Add a single
to the GovActionState
forest.
The tree to which it is added is picked according to its
Proposals
. Returns GovActionPurpose
Nothing
when the operation cannot
succeed.
proposalsRemoveWithDescendants ∷ EraPParams era ⇒ Set GovActionId → Proposals era → (Proposals era, Map GovActionId (GovActionState era)) Source #
Remove the set of given action-ids with their descendants from the
forest. Cannot be used for removing enacted GovActionIds (i.e. roots)Proposals
proposalsAddVote ∷ Voter → Vote → GovActionId → Proposals era → Proposals era Source #
Add a vote to an existing GovActionState
. This is a no-op if the
provided GovActionId
does not already exist
proposalsIds ∷ Proposals era → StrictSeq GovActionId Source #
Get the sequence of GovActionId
s
proposalsApplyEnactment ∷ ∀ era. EraPParams era ⇒ Seq (GovActionState era) → Set GovActionId → Proposals era → (Proposals era, Map GovActionId (GovActionState era), Map GovActionId (GovActionState era), Map GovActionId (GovActionState era)) Source #
For use in the
rule. Apply the result of
EPOCH
to the extractDRepPulsingState
forest, so that:
i. all the expired action-ids and their descendants are removed,
and
ii. the sequence of enacted action-ids is promoted to the root,
removing competing/sibling action-ids and their descendants at each
stepProposals
proposalsSize ∷ Proposals era → Int Source #
proposalsLookupId ∷ GovActionId → Proposals era → Maybe (GovActionState era) Source #
proposalsActionsMap ∷ Proposals era → Map GovActionId (GovActionState era) Source #
Get the unordered map of GovActionId
s and GovActionState
s
proposalsWithPurpose ∷ ∀ p era. ToGovActionPurpose p ⇒ (∀ f. Lens' (GovRelation f era) (f (GovPurposeId p era))) → Proposals era → Map (GovPurposeId p era) (GovActionState era) Source #
cgsProposalsL ∷ Lens' (ConwayGovState era) (Proposals era) Source #
cgsDRepPulsingStateL ∷ Lens' (ConwayGovState era) (DRepPulsingState era) Source #
cgsCurPParamsL ∷ Lens' (ConwayGovState era) (PParams era) Source #
cgsPrevPParamsL ∷ Lens' (ConwayGovState era) (PParams era) Source #
cgsFuturePParamsL ∷ Lens' (ConwayGovState era) (FuturePParams era) Source #
cgsCommitteeL ∷ Lens' (ConwayGovState era) (StrictMaybe (Committee era)) Source #
cgsConstitutionL ∷ Lens' (ConwayGovState era) (Constitution era) Source #
ensCommitteeL ∷ Lens' (EnactState era) (StrictMaybe (Committee era)) Source #
ensConstitutionL ∷ Lens' (EnactState era) (Constitution era) Source #
ensCurPParamsL ∷ Lens' (EnactState era) (PParams era) Source #
ensPrevPParamsL ∷ Lens' (EnactState era) (PParams era) Source #
ensWithdrawalsL ∷ Lens' (EnactState era) (Map (Credential 'Staking) Coin) Source #
ensTreasuryL ∷ Lens' (EnactState era) Coin Source #
ensPrevGovActionIdsL ∷ Lens' (EnactState era) (GovRelation StrictMaybe era) Source #
ensPrevPParamUpdateL ∷ Lens' (EnactState era) (StrictMaybe (GovPurposeId 'PParamUpdatePurpose era)) Source #
ensPrevHardForkL ∷ Lens' (EnactState era) (StrictMaybe (GovPurposeId 'HardForkPurpose era)) Source #
ensPrevCommitteeL ∷ Lens' (EnactState era) (StrictMaybe (GovPurposeId 'CommitteePurpose era)) Source #
ensPrevConstitutionL ∷ Lens' (EnactState era) (StrictMaybe (GovPurposeId 'ConstitutionPurpose era)) Source #
ensProtVerL ∷ EraPParams era ⇒ Lens' (EnactState era) ProtVer Source #
rsEnactStateL ∷ Lens' (RatifyState era) (EnactState era) Source #
rsExpiredL ∷ Lens' (RatifyState era) (Set GovActionId) Source #
rsEnactedL ∷ Lens' (RatifyState era) (Seq (GovActionState era)) Source #
rsDelayedL ∷ Lens' (RatifyState era) Bool Source #
constitutionScriptL ∷ Lens' (Constitution era) (StrictMaybe ScriptHash) Source #
constitutionAnchorL ∷ Lens' (Constitution era) Anchor Source #
gasIdL ∷ Lens' (GovActionState era) GovActionId Source #
gasDepositL ∷ Lens' (GovActionState era) Coin Source #
gasCommitteeVotesL ∷ Lens' (GovActionState era) (Map (Credential 'HotCommitteeRole) Vote) Source #
gasDRepVotesL ∷ Lens' (GovActionState era) (Map (Credential 'DRepRole) Vote) Source #
gasStakePoolVotesL ∷ Lens' (GovActionState era) (Map (KeyHash 'StakePool) Vote) Source #
gasExpiresAfterL ∷ Lens' (GovActionState era) EpochNo Source #
gasActionL ∷ Lens' (GovActionState era) (GovAction era) Source #
gasProposedInL ∷ Lens' (GovActionState era) EpochNo Source #
gasProposalProcedureL ∷ Lens' (GovActionState era) (ProposalProcedure era) Source #
gasDeposit ∷ GovActionState era → Coin Source #
gasAction ∷ GovActionState era → GovAction era Source #
gasReturnAddr ∷ GovActionState era → RewardAccount Source #
pProcDepositL ∷ Lens' (ProposalProcedure era) Coin Source #
pProcGovActionL ∷ Lens' (ProposalProcedure era) (GovAction era) Source #
pProcAnchorL ∷ Lens' (ProposalProcedure era) Anchor Source #
newEpochStateDRepPulsingStateL ∷ ConwayEraGov era ⇒ Lens' (NewEpochState era) (DRepPulsingState era) Source #
epochStateDRepPulsingStateL ∷ ConwayEraGov era ⇒ Lens' (EpochState era) (DRepPulsingState era) Source #
epochStateStakeDistrL ∷ Lens' (EpochState era) (VMap VB VP (Credential 'Staking) (CompactForm Coin)) Source #
epochStateIncrStakeDistrL ∷ Lens' (EpochState era) (Map (Credential 'Staking) (CompactForm Coin)) Source #
epochStateRegDrepL ∷ Lens' (EpochState era) (Map (Credential 'DRepRole) DRepState) Source #
epochStateUMapL ∷ Lens' (EpochState era) UMap Source #
pulseDRepPulsingState ∷ DRepPulsingState era → DRepPulsingState era Source #
completeDRepPulsingState ∷ DRepPulsingState era → DRepPulsingState era Source #
extractDRepPulsingState ∷ DRepPulsingState era → RatifyState era Source #
forceDRepPulsingState ∷ ConwayEraGov era ⇒ NewEpochState era → NewEpochState era Source #
Force computation of DRep stake distribution and figure out the next enact state. This operation is useful in cases when access to new EnactState or DRep stake distribution is needed more than once. It is safe to call this function at any point. Whenever pulser is already in computed state this will be a noop.
finishDRepPulser ∷ ∀ era. DRepPulsingState era → (PulsingSnapshot era, RatifyState era) Source #
computeDRepDistr ∷ Map (Credential 'Staking) (CompactForm Coin) → Map (Credential 'DRepRole) DRepState → Map (Credential 'Staking) (CompactForm Coin) → PoolDistr → Map DRep (CompactForm Coin) → Map (Credential 'Staking) UMElem → (Map DRep (CompactForm Coin), PoolDistr) Source #
We iterate over a pulse-sized chunk of the UMap.
For each staking credential in the chunk that has delegated to a DRep, add the stake distribution, rewards, and proposal deposits for that credential to the DRep distribution, if the DRep is a DRepCredential (also, AlwaysAbstain or AlwaysNoConfidence) and a member of the registered DReps. If the DRepCredential is not a member of the registered DReps, ignore and skip that DRep.
For each staking credential in the chunk that has delegated to an SPO, add only the proposal deposits for that credential to the stake pool distribution, since the rewards and stake are already added to it by the SNAP rule.
Give or take, this operation has roughly
O (a * (log(b) + log(c) + log(d) + log(e) + log(f)))
complexity, where,
(a) is the size of the chunk of the UMap, which is the pulse-size, iterate over
(b) is the size of the StakeDistr, lookup
(c) is the size of the DRepDistr, insertWith
(d) is the size of the dpProposalDeposits, lookup
(e) is the size of the registered DReps, lookup
(f) is the size of the PoolDistr, insert
getRatifyState ∷ ConwayGovState era → RatifyState era Source #
conwayGovStateDRepDistrG ∷ SimpleGetter (ConwayGovState era) (Map DRep (CompactForm Coin)) Source #
psDRepDistrG ∷ SimpleGetter (DRepPulsingState era) (Map DRep (CompactForm Coin)) Source #
This is potentially an expensive getter. Make sure not to use it in the first 80% of the epoch.
data PulsingSnapshot era Source #
A snapshot of information from the previous epoch stored inside the Pulser.
After the pulser completes, but before the epoch turns, this information
is store in the DRComplete
constructor of the DRepPulsingState
These are the values at the start of the current epoch. This allows the API
To access these "previous" values, both during and after pulsing.
PulsingSnapshot | |
|
Instances
setCompleteDRepPulsingState ∷ GovState era ~ ConwayGovState era ⇒ PulsingSnapshot era → RatifyState era → EpochState era → EpochState era Source #
setFreshDRepPulsingState ∷ (GovState era ~ ConwayGovState era, Monad m, RunConwayRatify era, ConwayEraGov era) ⇒ EpochNo → PoolDistr → EpochState era → ReaderT Globals m (EpochState era) Source #
Refresh the pulser in the EpochState using all the new data that is needed to compute the RatifyState when pulsing completes.
psProposalsL ∷ Lens' (PulsingSnapshot era) (StrictSeq (GovActionState era)) Source #
psDRepDistrL ∷ Lens' (PulsingSnapshot era) (Map DRep (CompactForm Coin)) Source #
psDRepStateL ∷ Lens' (PulsingSnapshot era) (Map (Credential 'DRepRole) DRepState) Source #
psPoolDistrL ∷ Lens' (PulsingSnapshot era) (Map (KeyHash 'StakePool) (CompactForm Coin)) Source #
class (STS (ConwayRATIFY era), Signal (ConwayRATIFY era) ~ RatifySignal era, BaseM (ConwayRATIFY era) ~ Reader Globals, Environment (ConwayRATIFY era) ~ RatifyEnv era, State (ConwayRATIFY era) ~ RatifyState era, PredicateFailure (ConwayRATIFY era) ~ Void) ⇒ RunConwayRatify era where Source #
Nothing
runConwayRatify ∷ Globals → RatifyEnv era → RatifyState era → RatifySignal era → RatifyState era Source #
Instances
govStatePrevGovActionIds ∷ ConwayEraGov era ⇒ GovState era → GovRelation StrictMaybe era Source #
mkEnactState ∷ ConwayEraGov era ⇒ GovState era → EnactState era Source #
ratifySignalL ∷ Lens' (RatifySignal era) (StrictSeq (GovActionState era)) Source #
reStakeDistrL ∷ Lens' (RatifyEnv era) (Map (Credential 'Staking) (CompactForm Coin)) Source #
reDRepDistrL ∷ Lens' (RatifyEnv era) (Map DRep (CompactForm Coin)) Source #
reDRepStateL ∷ Lens' (RatifyEnv era) (Map (Credential 'DRepRole) DRepState) Source #
reCommitteeStateL ∷ Lens' (RatifyEnv era) (CommitteeState era) Source #
data DefaultVote Source #
Default vote that will be used for Stake Pool.
DefaultNo | Reward account is delegated to a |
DefaultAbstain | Reward account is delegated to |
DefaultNoConfidence | Reward account is delegated to |
Instances
Show DefaultVote Source # | |
Defined in Cardano.Ledger.Conway.Governance | |
Eq DefaultVote Source # | |
Defined in Cardano.Ledger.Conway.Governance (==) ∷ DefaultVote → DefaultVote → Bool Source # (/=) ∷ DefaultVote → DefaultVote → Bool Source # |
∷ KeyHash 'StakePool | Specify the key hash of the pool whose default vote should be returned. |
→ Map (KeyHash 'StakePool) PoolParams | Registered Stake Pools |
→ Map (Credential 'Staking) DRep | Delegations of staking credneitals to a DRep |
→ DefaultVote |
Exported for testing
pparamsUpdateThreshold ∷ ∀ era. ConwayEraPParams era ⇒ DRepVotingThresholds → PParamsUpdate era → UnitInterval Source #
Wraper type, which serves as a composition of Tree
. StrictMaybe
Also its Show instance will print a nice tree structure.
TreeMaybe | |
|
toGovRelationTree ∷ (Era era, HasCallStack) ⇒ Proposals era → GovRelation TreeMaybe era Source #
Partial version of toGovRelationTreeEither
toGovRelationTreeEither ∷ Era era ⇒ Proposals era → Either String (GovRelation TreeMaybe era) Source #
showGovActionType ∷ GovAction era → String Source #