ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.HardFork.Combinator.PartialConfig

Synopsis

Documentation

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

Partial ledger config

Minimal complete definition

Nothing

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 :: Type -> Type ) 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

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 .