ouroboros-consensus-0.18.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
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

Convenience re-exports

data EpochInfo (m ∷ TypeType) Source #

Information about epochs

Different epochs may have different sizes and different slot lengths. This information is encapsulated by EpochInfo. It is parameterized over a monad m because the information about how long each epoch is may depend on information derived from the blockchain itself. It ultimately requires acess to state, and so either uses the monad for that or uses the monad to reify failure due to cached state information being too stale for the current query.

Constructors

EpochInfo 

Fields

Instances

Instances details
Show (EpochInfo f)

Unhelpful instance, but this type occurs in records (eg Shelley.Globals) that we want to be able to show

Instance details

Defined in Cardano.Slotting.EpochInfo.API

Methods

showsPrecIntEpochInfo f → ShowS #

showEpochInfo f → String #

showList ∷ [EpochInfo f] → ShowS #

NoThunks (EpochInfo m) 
Instance details

Defined in Cardano.Slotting.EpochInfo.API

type Except e = ExceptT e Identity #

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.