Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.PartialConfig
Synopsis
- class (ConsensusProtocol p, NoThunks (PartialConsensusConfig p)) ⇒ HasPartialConsensusConfig p where
- type PartialConsensusConfig p ∷ Type
- completeConsensusConfig ∷ proxy p → EpochInfo (Except PastHorizonException) → PartialConsensusConfig p → ConsensusConfig p
- toPartialConsensusConfig ∷ proxy p → ConsensusConfig p → PartialConsensusConfig p
- class (UpdateLedger blk, NoThunks (PartialLedgerConfig blk)) ⇒ HasPartialLedgerConfig blk where
- type PartialLedgerConfig blk ∷ Type
- completeLedgerConfig ∷ proxy blk → EpochInfo (Except PastHorizonException) → PartialLedgerConfig blk → LedgerConfig blk
- newtype WrapPartialConsensusConfig blk = WrapPartialConsensusConfig {}
- newtype WrapPartialLedgerConfig blk = WrapPartialLedgerConfig {}
- data EpochInfo (m ∷ Type → Type) = EpochInfo {}
- type Except e = ExceptT e Identity
- data PastHorizonException
Documentation
class (ConsensusProtocol p, NoThunks (PartialConsensusConfig p)) ⇒ HasPartialConsensusConfig p where Source #
Partial consensus config
Minimal complete definition
Nothing
Associated Types
type PartialConsensusConfig p ∷ Type Source #
type PartialConsensusConfig p = ConsensusConfig p
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
.
default completeConsensusConfig ∷ PartialConsensusConfig p ~ ConsensusConfig p ⇒ proxy p → EpochInfo (Except PastHorizonException) → PartialConsensusConfig p → ConsensusConfig p Source #
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.
default toPartialConsensusConfig ∷ PartialConsensusConfig p ~ ConsensusConfig p ⇒ proxy p → ConsensusConfig p → PartialConsensusConfig p Source #
class (UpdateLedger blk, NoThunks (PartialLedgerConfig blk)) ⇒ HasPartialLedgerConfig blk where Source #
Partial ledger config
Minimal complete definition
Nothing
Associated Types
type PartialLedgerConfig blk ∷ Type Source #
type PartialLedgerConfig blk = LedgerConfig blk
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.
default completeLedgerConfig ∷ PartialLedgerConfig blk ~ LedgerConfig blk ⇒ proxy blk → EpochInfo (Except PastHorizonException) → PartialLedgerConfig blk → LedgerConfig blk Source #
Newtype wrappers
newtype WrapPartialConsensusConfig blk Source #
Constructors
WrapPartialConsensusConfig | |
Fields |
Instances
NoThunks (PartialConsensusConfig (BlockProtocol blk)) ⇒ NoThunks (WrapPartialConsensusConfig blk) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.PartialConfig Methods noThunks ∷ Context → WrapPartialConsensusConfig blk → IO (Maybe ThunkInfo) # wNoThunks ∷ Context → WrapPartialConsensusConfig blk → IO (Maybe ThunkInfo) # showTypeOf ∷ Proxy (WrapPartialConsensusConfig blk) → String # |
newtype WrapPartialLedgerConfig blk Source #
Constructors
WrapPartialLedgerConfig | |
Fields |
Instances
NoThunks (PartialLedgerConfig blk) ⇒ NoThunks (WrapPartialLedgerConfig blk) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.PartialConfig Methods noThunks ∷ Context → WrapPartialLedgerConfig blk → IO (Maybe ThunkInfo) # wNoThunks ∷ Context → WrapPartialLedgerConfig blk → IO (Maybe ThunkInfo) # showTypeOf ∷ Proxy (WrapPartialLedgerConfig blk) → String # |
Convenience re-exports
data EpochInfo (m ∷ Type → Type) #
Constructors
EpochInfo | |
Fields
|
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.