ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.TypeFamilyWrappers

Description

Newtypes around type families so that they can be partially applied

Synopsis

Block based

newtype WrapApplyTxErr blk Source #

Constructors

WrapApplyTxErr 

Instances

Instances details
Inject WrapApplyTxErr Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → WrapApplyTxErr x → WrapApplyTxErr (HardForkBlock xs) Source #

Isomorphic WrapApplyTxErr Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

SerialiseNodeToClient blk (ApplyTxErr blk) ⇒ SerialiseNodeToClient blk (WrapApplyTxErr blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Node.Serialisation

Show (ApplyTxErr blk) ⇒ Show (WrapApplyTxErr blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

showsPrecIntWrapApplyTxErr blk → ShowS #

showWrapApplyTxErr blk → String #

showList ∷ [WrapApplyTxErr blk] → ShowS #

Eq (ApplyTxErr blk) ⇒ Eq (WrapApplyTxErr blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

(==)WrapApplyTxErr blk → WrapApplyTxErr blk → Bool #

(/=)WrapApplyTxErr blk → WrapApplyTxErr blk → Bool #

newtype WrapGenTxId blk Source #

Constructors

WrapGenTxId 

Fields

Instances

Instances details
Inject WrapGenTxId Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → WrapGenTxId x → WrapGenTxId (HardForkBlock xs) Source #

Isomorphic WrapGenTxId Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

SerialiseNodeToClient blk (GenTxId blk) ⇒ SerialiseNodeToClient blk (WrapGenTxId blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Node.Serialisation

SerialiseNodeToNode blk (GenTxId blk) ⇒ SerialiseNodeToNode blk (WrapGenTxId blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Node.Serialisation

Show (GenTxId blk) ⇒ Show (WrapGenTxId blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

showsPrecIntWrapGenTxId blk → ShowS #

showWrapGenTxId blk → String #

showList ∷ [WrapGenTxId blk] → ShowS #

Eq (GenTxId blk) ⇒ Eq (WrapGenTxId blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

(==)WrapGenTxId blk → WrapGenTxId blk → Bool #

(/=)WrapGenTxId blk → WrapGenTxId blk → Bool #

Ord (GenTxId blk) ⇒ Ord (WrapGenTxId blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

compareWrapGenTxId blk → WrapGenTxId blk → Ordering #

(<)WrapGenTxId blk → WrapGenTxId blk → Bool #

(<=)WrapGenTxId blk → WrapGenTxId blk → Bool #

(>)WrapGenTxId blk → WrapGenTxId blk → Bool #

(>=)WrapGenTxId blk → WrapGenTxId blk → Bool #

maxWrapGenTxId blk → WrapGenTxId blk → WrapGenTxId blk #

minWrapGenTxId blk → WrapGenTxId blk → WrapGenTxId blk #

NoThunks (GenTxId blk) ⇒ NoThunks (WrapGenTxId blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Condense (GenTxId blk) ⇒ Condense (WrapGenTxId blk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Condense

Methods

condenseWrapGenTxId blk → String Source #

Serialise (GenTxId blk) ⇒ Serialise (WrapGenTxId blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype WrapLedgerUpdate blk Source #

Constructors

WrapLedgerUpdate 

Instances

Instances details
Show (LedgerUpdate blk) ⇒ Show (WrapLedgerUpdate blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Eq (LedgerUpdate blk) ⇒ Eq (WrapLedgerUpdate blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

(==)WrapLedgerUpdate blk → WrapLedgerUpdate blk → Bool #

(/=)WrapLedgerUpdate blk → WrapLedgerUpdate blk → Bool #

newtype WrapLedgerWarning blk Source #

Instances

Instances details
Show (LedgerWarning blk) ⇒ Show (WrapLedgerWarning blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Eq (LedgerWarning blk) ⇒ Eq (WrapLedgerWarning blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype WrapTentativeHeaderState blk Source #

Instances

Instances details
Show (TentativeHeaderState blk) ⇒ Show (WrapTentativeHeaderState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Eq (TentativeHeaderState blk) ⇒ Eq (WrapTentativeHeaderState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Ord (TentativeHeaderState blk) ⇒ Ord (WrapTentativeHeaderState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks (TentativeHeaderState blk) ⇒ NoThunks (WrapTentativeHeaderState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype WrapTipInfo blk Source #

Constructors

WrapTipInfo 

Fields

Instances

Instances details
Isomorphic WrapTipInfo Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Show (TipInfo blk) ⇒ Show (WrapTipInfo blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

showsPrecIntWrapTipInfo blk → ShowS #

showWrapTipInfo blk → String #

showList ∷ [WrapTipInfo blk] → ShowS #

Eq (TipInfo blk) ⇒ Eq (WrapTipInfo blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

(==)WrapTipInfo blk → WrapTipInfo blk → Bool #

(/=)WrapTipInfo blk → WrapTipInfo blk → Bool #

NoThunks (TipInfo blk) ⇒ NoThunks (WrapTipInfo blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Serialise (TipInfo blk) ⇒ Serialise (WrapTipInfo blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype WrapTxMeasure blk Source #

Constructors

WrapTxMeasure 

Fields

newtype WrapValidatedGenTx blk Source #

A data family wrapper for Validated . GenTx

Validated is is data family, so this is an outlier in this module full of type family wrappers. However, the standard functor composition operator f :.: g incurs some type classes instances that are inappropriate when the outer type constructor f is a family and hence non-parametric (eg Eq (f :.: g) requires @Eq1 f)). The bespoke composition WrapValidatedGenTx therefore serves much the same purpose as the other wrappers in this module.

Protocol based

newtype WrapChainDepState blk Source #

Instances

Instances details
Inject WrapChainDepState Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → WrapChainDepState x → WrapChainDepState (HardForkBlock xs) Source #

Isomorphic WrapChainDepState Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

DecodeDisk blk (ChainDepState (BlockProtocol blk)) ⇒ DecodeDisk blk (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

Methods

decodeDiskCodecConfig blk → ∀ s. Decoder s (WrapChainDepState blk) Source #

EncodeDisk blk (ChainDepState (BlockProtocol blk)) ⇒ EncodeDisk blk (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

Show (ChainDepState (BlockProtocol blk)) ⇒ Show (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Eq (ChainDepState (BlockProtocol blk)) ⇒ Eq (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks (ChainDepState (BlockProtocol blk)) ⇒ NoThunks (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Serialise (ChainDepState (BlockProtocol blk)) ⇒ Serialise (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

SerialiseHFC xs ⇒ DecodeDisk (HardForkBlock xs) (HardForkChainDepState xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

SerialiseHFC xs ⇒ EncodeDisk (HardForkBlock xs) (HardForkChainDepState xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

data Ticked (HardForkChainDepState xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

newtype Ticked (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype WrapIsLeader blk Source #

Constructors

WrapIsLeader 

Instances

Instances details
Isomorphic WrapIsLeader Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

newtype WrapSelectView blk Source #

Instances

Instances details
Show (SelectView (BlockProtocol blk)) ⇒ Show (WrapSelectView blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

showsPrecIntWrapSelectView blk → ShowS #

showWrapSelectView blk → String #

showList ∷ [WrapSelectView blk] → ShowS #

Eq (SelectView (BlockProtocol blk)) ⇒ Eq (WrapSelectView blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Methods

(==)WrapSelectView blk → WrapSelectView blk → Bool #

(/=)WrapSelectView blk → WrapSelectView blk → Bool #

Ord (SelectView (BlockProtocol blk)) ⇒ Ord (WrapSelectView blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks (SelectView (BlockProtocol blk)) ⇒ NoThunks (WrapSelectView blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

ChainOrder (SelectView (BlockProtocol blk)) ⇒ ChainOrder (WrapSelectView blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Associated Types

type ChainOrderConfig (WrapSelectView blk) Source #

type ChainOrderConfig (WrapSelectView blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

Versioning

Type family instances

data family Ticked st ∷ Type Source #

" Ticked " piece of state, either LedgerState or ChainDepState

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. There are exactly two methods in the interface that do that: tickChainDepState and applyChainTickLedgerResult.

Also note that a successful forecast forecastFor (ledgerViewForecastAt cfg st) slot must equal protocolLedgerView cfg (applyChainTick cfg slot st). Thus a LedgerView can only be projected from a Ticked state, but cannot itself be ticked.

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
Generic (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Associated Types

type Rep (Ticked (LedgerState (HardForkBlock xs))) ∷ TypeType #

Show (Ticked ()) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecIntTicked () → ShowS #

showTicked () → String #

showList ∷ [Ticked ()] → ShowS #

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

NoThunks (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

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

Defined in Ouroboros.Consensus.Ledger.Dual

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.Embed.Unary

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

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecInt → (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 HeaderHash (Ticked l ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l ∷ Type) = HeaderHash l
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.21.0.0-inplace" '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))))
data Ticked (HardForkChainDepState xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

data Ticked (HeaderState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

data Ticked (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

data Ticked (PBftState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype Ticked (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers