ouroboros-consensus-0.3.1.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.HardFork.Combinator.PartialConfig

Synopsis

Documentation

class (ConsensusProtocol p, NoThunks (PartialConsensusConfig p)) ⇒ HasPartialConsensusConfig p where Source #

Partial consensus config

Minimal complete definition

Nothing

Methods

completeConsensusConfig ∷ proxy p → EpochInfo (Except PastHorizonException) → PartialConsensusConfig p → ConsensusConfig p Source #

Construct ConsensusConfig from PartialConsensusConfig

See comments for completeLedgerConfig for some details about the EpochInfo.

toPartialConsensusConfig ∷ proxy p → ConsensusConfig p → PartialConsensusConfig p Source #

Construct partial consensus config from full consensus config

NOTE: This is basically just losing EpochInfo, but that is constant anyway when we are dealing with a single era.

class (UpdateLedger blk, NoThunks (PartialLedgerConfig blk)) ⇒ HasPartialLedgerConfig blk where Source #

Partial ledger config

Minimal complete definition

Nothing

Associated Types

type PartialLedgerConfig blk ∷ Type Source #

Methods

completeLedgerConfig ∷ proxy blk → EpochInfo (Except PastHorizonException) → PartialLedgerConfig blk → LedgerConfig blk Source #

Construct LedgerConfig from PartialLedgerCfg

NOTE: The EpochInfo provided will have limited range, any attempt to look past its horizon will result in a pure PastHorizonException. The horizon is determined by the tip of the ledger state (not view) from which the EpochInfo is derived.

Newtype wrappers

newtype WrapPartialLedgerConfig blk Source #

Instances

Instances details
NoThunks (PartialLedgerConfig blk) ⇒ NoThunks (WrapPartialLedgerConfig blk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.PartialConfig

Methods

noThunks ∷ Context → WrapPartialLedgerConfig blk → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → WrapPartialLedgerConfig blk → IO (Maybe ThunkInfo) #

showTypeOfProxy (WrapPartialLedgerConfig blk) → String #

Convenience re-exports

data EpochInfo (m ∷ TypeType) #

Instances

Instances details
Show (EpochInfo f) 
Instance details

Defined in Cardano.Slotting.EpochInfo.API

NoThunks (EpochInfo m) 
Instance details

Defined in Cardano.Slotting.EpochInfo.API

Methods

noThunks ∷ Context → EpochInfo m → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → EpochInfo m → IO (Maybe ThunkInfo) #

showTypeOfProxy (EpochInfo m) → String #

type Except e = ExceptT e Identity Source #

The parameterizable exception monad.

Computations are either exceptions or normal values.

The return function returns a normal value, while >>= exits on the first exception. For a variant that continues after an error and collects all the errors, see Errors.

data PastHorizonException Source #

We tried to convert something that is past the horizon

That is, we tried to convert something that is past the point in time beyond which we lack information due to uncertainty about the next hard fork.