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

Ouroboros.Consensus.Ledger.Extended

Synopsis

Extended ledger state

data ExtLedgerState blk Source #

Extended ledger state

This is the combination of the header state and the ledger state proper.

Constructors

ExtLedgerState 

Fields

Instances

Instances details
Isomorphic ExtLedgerState Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

(LedgerSupportsProtocol blk, Eq (ChainDepState (BlockProtocol blk))) => Eq (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

LedgerSupportsProtocol blk => Show (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Generic (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Associated Types

type Rep (ExtLedgerState blk) :: Type -> Type #

Methods

from :: ExtLedgerState blk -> Rep (ExtLedgerState blk) x #

to :: Rep (ExtLedgerState blk) x -> ExtLedgerState blk #

LedgerSupportsProtocol blk => NoThunks (ExtLedgerState blk) Source #

We override showTypeOf to show the type of the block

This makes debugging a bit easier, as the block gets used to resolve all kinds of type families.

Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

(IsLedger (LedgerState blk), LedgerSupportsProtocol blk) => IsLedger (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Associated Types

type LedgerErr (ExtLedgerState blk) Source #

IsLedger (LedgerState blk) => GetTip (Ticked (ExtLedgerState blk)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

IsLedger (LedgerState blk) => GetTip (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

LedgerSupportsProtocol blk => ApplyBlock (ExtLedgerState blk) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type Rep (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type Rep (ExtLedgerState blk) = D1 ('MetaData "ExtLedgerState" "Ouroboros.Consensus.Ledger.Extended" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "ExtLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "ledgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerState blk)) :*: S1 ('MetaSel ('Just "headerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HeaderState blk))))
type HeaderHash (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

data Ticked (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type LedgerErr (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type LedgerCfg (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

data ExtValidationError blk Source #

Instances

Instances details
LedgerSupportsProtocol blk => Eq (ExtValidationError blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

LedgerSupportsProtocol blk => Show (ExtValidationError blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Generic (ExtValidationError blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Associated Types

type Rep (ExtValidationError blk) :: Type -> Type #

LedgerSupportsProtocol blk => NoThunks (ExtValidationError blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type Rep (ExtValidationError blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type Rep (ExtValidationError blk) = D1 ('MetaData "ExtValidationError" "Ouroboros.Consensus.Ledger.Extended" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "ExtValidationErrorLedger" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerError blk))) :+: C1 ('MetaCons "ExtValidationErrorHeader" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HeaderError blk))))

newtype ExtLedgerCfg blk Source #

" Ledger " configuration for the extended ledger

Since the extended ledger also does the consensus protocol validation, we also need the consensus config.

Constructors

ExtLedgerCfg 

Instances

Instances details
Generic (ExtLedgerCfg blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Associated Types

type Rep (ExtLedgerCfg blk) :: Type -> Type #

Methods

from :: ExtLedgerCfg blk -> Rep (ExtLedgerCfg blk) x #

to :: Rep (ExtLedgerCfg blk) x -> ExtLedgerCfg blk #

(ConsensusProtocol (BlockProtocol blk), NoThunks (BlockConfig blk), NoThunks (CodecConfig blk), NoThunks (LedgerConfig blk), NoThunks (StorageConfig blk)) => NoThunks (ExtLedgerCfg blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type Rep (ExtLedgerCfg blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type Rep (ExtLedgerCfg blk) = D1 ('MetaData "ExtLedgerCfg" "Ouroboros.Consensus.Ledger.Extended" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'True) (C1 ('MetaCons "ExtLedgerCfg" 'PrefixI 'True) (S1 ('MetaSel ('Just "getExtLedgerCfg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TopLevelConfig blk))))

Serialisation

decodeExtLedgerState :: (forall s. Decoder s (LedgerState blk)) -> (forall s. Decoder s (ChainDepState (BlockProtocol blk))) -> (forall s. Decoder s (AnnTip blk)) -> forall s. Decoder s (ExtLedgerState blk) Source #

Casts

Type family instances

data family Ticked st :: Type Source #

" Ticked " piece of state (LedgerState, LedgerView, ChainIndepState)

Ticking refers to the passage of time (the ticking of the clock). When a piece of state is marked as ticked, it means that time-related changes have been applied to the state (or forecast).

Some examples of time related changes:

  • Scheduled delegations might have been applied in Byron
  • New leader schedule computed for Shelley
  • Transition from Byron to Shelley activated in the hard fork combinator.
  • Nonces switched out at the start of a new epoch.

Instances

Instances details
Show (Ticked ()) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec :: Int -> Ticked () -> ShowS #

show :: Ticked () -> String #

showList :: [Ticked ()] -> ShowS #

Show (Ticked a) => Show (Ticked (K a x)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec :: Int -> Ticked (K a x) -> ShowS #

show :: Ticked (K a x) -> String #

showList :: [Ticked (K a x)] -> ShowS #

(SListI xs, Show (Ticked a)) => Show (Ticked (HardForkLedgerView_ (K a :: Type -> Type) xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol.LedgerView

Generic (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Associated Types

type Rep (Ticked (LedgerState (HardForkBlock xs))) :: Type -> Type #

NoThunks (Ticked (LedgerState (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Bridge m a => GetTip (Ticked (LedgerState (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => GetTip (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

IsLedger l => GetTip (Ticked (LedgerDB l r)) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

Methods

getTip :: Ticked (LedgerDB l r) -> Point (Ticked (LedgerDB l r)) Source #

IsLedger (LedgerState blk) => GetTip (Ticked (ExtLedgerState blk)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Isomorphic (Ticked :.: LedgerState) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

Show (Ticked (f a)) => Show ((Ticked :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec :: Int -> (Ticked :.: f) a -> ShowS #

show :: (Ticked :.: f) a -> String #

showList :: [(Ticked :.: f) a] -> ShowS #

NoThunks (Ticked (f a)) => NoThunks ((Ticked :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

data Ticked () Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

type Rep (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep (Ticked (LedgerState (HardForkBlock xs))) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "TickedHardForkLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedHardForkLedgerStateTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransitionInfo) :*: S1 ('MetaSel ('Just "tickedHardForkLedgerStatePerEra") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HardForkState (Ticked :.: LedgerState) xs))))
type HeaderHash (Ticked l) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

data Ticked (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Ticked (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked (HeaderState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

data Ticked (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

newtype Ticked (WrapLedgerView blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype Ticked (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

data Ticked (HardForkChainDepState xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

data Ticked (PBftState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data Ticked (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data Ticked (LedgerDB l r) Source #

Ticking the ledger DB just ticks the current state

We don't push the new state into the DB until we apply a block.

Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

data Ticked (HardForkLedgerView_ f xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol.LedgerView

newtype Ticked (K a x) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

newtype Ticked (K a x) = TickedK {}