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

Ouroboros.Consensus.HardFork.Combinator.State.Infra

Synopsis

Initialization

initHardForkState :: f x -> HardForkState f (x ': xs) Source #

Lifting Telescope operations

tip :: SListI xs => HardForkState f xs -> NS f xs Source #

match :: SListI xs => NS h xs -> HardForkState f xs -> Either (Mismatch h (Current f) xs) (HardForkState (Product h f) xs) Source #

sequence :: forall f m xs. (SListI xs, Functor m) => HardForkState (m :.: f) xs -> m (HardForkState f xs) Source #

fromTZ :: HardForkState f '[blk] -> f blk Source #

Situated

data Situated h f xs where Source #

A h situated in time

Constructors

SituatedCurrent :: Current f x -> h x -> Situated h f (x ': xs) 
SituatedNext :: Current f x -> h y -> Situated h f (x ': (y ': xs)) 
SituatedFuture :: Current f x -> NS h xs -> Situated h f (x ': (y ': xs)) 
SituatedPast :: K Past x -> h x -> Situated h f (x ': xs) 
SituatedShift :: Situated h f xs -> Situated h f (x ': xs) 

situate :: NS h xs -> HardForkState f xs -> Situated h f xs Source #

Aligning

align Source #

Arguments

:: forall xs f f' f''. All SingleEraBlock xs 
=> InPairs (Translate f) xs 
-> NP (f' -.-> (f -.-> f'')) xs 
-> HardForkState f' xs

State we are aligning with

-> HardForkState f xs

State we are aligning

-> HardForkState f'' xs 

EpochInfo/Summary

reconstructSummary Source #

Arguments

:: Shape xs 
-> TransitionInfo

At the tip

-> HardForkState f xs 
-> Summary xs