ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Ledger.SupportsPeras

Synopsis

Documentation

class LedgerStateSupportsPeras (ledgerState ∷ (TypeTypeType) → Type) where Source #

Extract Peras information stored in the ledger state.

Minimal complete definition

Nothing

Methods

getPoolDistr ∷ ledgerState EmptyMKPoolDistr Source #

Extract the stake distribution from the given ledger state.

PRECONDITION: this function will only return a meaningful result if the ledger state is from a block that supports Peras.

default getPoolDistr ∷ ledgerState EmptyMKPoolDistr Source #

getPerasParams ∷ proxy blk → ledgerState EmptyMKPerasParams blk Source #

Extract the Peras parameters from the given ledger state.

TODO: when Peras params go on chain, update this.

default getPerasParams ∷ proxy blk → ledgerState EmptyMKPerasParams blk Source #

Instances

Instances details
CanHardFork xs ⇒ LedgerStateSupportsPeras (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

LedgerStateSupportsPeras (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs ⇒ LedgerStateSupportsPeras (Ticked LedgerState (HardForkBlock xs)) Source #

LedgerStateSupportsPeras for the ticked hard fork ledger state, mirroring the instance for the unticked ledger state in Ouroboros.Consensus.HardFork.Combinator.Basics.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

LedgerStateSupportsPeras (Ticked LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual