ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.HardFork.Combinator.Protocol

Synopsis

Documentation

newtype HardForkTiebreakerView (xs ∷ [Type]) Source #

Instances

Instances details
CanHardFork xs ⇒ Eq (HardForkTiebreakerView xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

CanHardFork xs ⇒ Ord (HardForkTiebreakerView xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

CanHardFork xs ⇒ Show (HardForkTiebreakerView xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

CanHardFork xs ⇒ NoThunks (HardForkTiebreakerView xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

CanHardFork xs ⇒ ChainOrder (HardForkTiebreakerView xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

type ChainOrderConfig (HardForkTiebreakerView xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

type ReasonForSwitch (HardForkTiebreakerView xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

Re-exports to keep State an internal module

type HardForkCanBeLeader (xs ∷ [Type]) = SomeErasCanBeLeader xs Source #

We have one or more BlockForgings, and thus CanBeLeader proofs, for each era in which we can forge blocks.

type HardForkIsLeader (xs ∷ [Type]) = OneEraIsLeader xs Source #

We are a leader if we have a proof from one of the eras

data HardForkValidationErr (xs ∷ [Type]) Source #

Constructors

HardForkValidationErrFromEra (OneEraValidationErr xs)

Validation error from one of the eras

HardForkValidationErrWrongEra (MismatchEraInfo xs)

We tried to apply a block from the wrong era

Instances

Instances details
CanHardFork xs ⇒ Eq (HardForkValidationErr xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

Generic (HardForkValidationErr xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

Associated Types

type Rep (HardForkValidationErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

type Rep (HardForkValidationErr xs) = D1 ('MetaData "HardForkValidationErr" "Ouroboros.Consensus.HardFork.Combinator.Protocol" "ouroboros-consensus-5.0.0.0-inplace" 'False) (C1 ('MetaCons "HardForkValidationErrFromEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidationErr xs))) :+: C1 ('MetaCons "HardForkValidationErrWrongEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MismatchEraInfo xs))))
CanHardFork xs ⇒ Show (HardForkValidationErr xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

CanHardFork xs ⇒ NoThunks (HardForkValidationErr xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

type Rep (HardForkValidationErr xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

type Rep (HardForkValidationErr xs) = D1 ('MetaData "HardForkValidationErr" "Ouroboros.Consensus.HardFork.Combinator.Protocol" "ouroboros-consensus-5.0.0.0-inplace" 'False) (C1 ('MetaCons "HardForkValidationErrFromEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidationErr xs))) :+: C1 ('MetaCons "HardForkValidationErrWrongEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MismatchEraInfo xs))))

Re-exports to keep LedgerView an internal module

data HardForkLedgerView_ (f ∷ Type → Type) (xs ∷ [Type]) Source #

Constructors

HardForkLedgerView 

Fields

Leios

class (SingleEraBlock blk, LeiosProtocol (BlockProtocol blk)) ⇒ SingleEraBlockAndLeiosProtocol blk Source #

Just the conjunction of SingleEraBlock and LeiosProtocol of the block's protocol, as one class, so that All and the SOP combinators can require both.

Type family instances

data family Ticked (st ∷ k) ∷ k 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.

Ticked is used mainly in two ways:

  • Ticked (Ext)LedgerState where its kind gets concretized to StateKind -> StateKind
  • Ticked (HeaderState blk) where its kind gets concretized to Type -> Type

Instances

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

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec ∷ Int → Ticked () → ShowS #

show ∷ Ticked () → String #

showList ∷ [Ticked ()] → ShowS #

CanHardFork xs ⇒ ChainDepStateSupportsPeras (Ticked (HardForkChainDepState xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

ChainDepStateSupportsPeras (Ticked (ChainDepState (BlockProtocol blk))) ⇒ ChainDepStateSupportsPeras (Ticked (HeaderState blk)) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

ChainDepStateSupportsPeras (Ticked (PBftState c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

ChainDepStateSupportsPeras (Ticked ()) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Abstract

Methods

getEpochNonce ∷ Ticked () → Nonce Source #

(NoThunks (TxIn blk), NoThunks (TxOut blk), HasLedgerTables (Ticked LedgerState) blk) ⇒ HasLedgerTables (Ticked ExtLedgerState) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked ExtLedgerState blk mk → LedgerTables blk mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked ExtLedgerState blk any → LedgerTables blk mk → Ticked ExtLedgerState blk mk Source #

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ HasLedgerTables (Ticked LedgerState) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → Ticked LedgerState (DualBlock m a) mk Source #

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

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (DualBlock m a) mk → Point (Ticked LedgerState (DualBlock m a)) Source #

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

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked ExtLedgerState blk mk → Point (Ticked ExtLedgerState blk) Source #

CanHardFork xs ⇒ LedgerStateSupportsPeras (Ticked LedgerState (HardForkBlock xs)) Source #

LedgerStateSupportsPeras for the ticked hard fork ledger state, mirroring the instance for the unticked ledger state in Ouroboros.Consensus.HardFork.Combinator.Basics.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec ∷ Int → ((Ticked ∷ Type → Type) :.: f) a → ShowS #

show ∷ ((Ticked ∷ Type → Type) :.: f) a → String #

showList ∷ [((Ticked ∷ Type → Type) :.: f) a] → ShowS #

NoThunks (Ticked (f a)) ⇒ NoThunks (((Ticked ∷ Type → Type) :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

noThunks ∷ Context → ((Ticked ∷ Type → Type) :.: f) a → IO (Maybe ThunkInfo) Source #

wNoThunks ∷ Context → ((Ticked ∷ Type → Type) :.: f) a → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy (((Ticked ∷ Type → Type) :.: f) a) → String Source #

data Ticked () Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

data Ticked (HardForkChainDepState xs ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

data Ticked (HeaderState blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

data Ticked (PBftState c ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype Ticked (WrapChainDepState blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

type HeaderHash (Ticked l blk ∷ k2) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l blk ∷ k2) = HeaderHash (l blk)
data Ticked ExtLedgerState (blk ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

data Ticked LedgerState (HardForkBlock xs ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked LedgerState (DualBlock m a ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Orphan instances

CanHardFork xs ⇒ BlockSupportsProtocol (HardForkBlock xs) Source # 
Instance details

(CanHardFork xs, All SingleEraBlockAndLeiosProtocol xs) ⇒ LeiosProtocol (HardForkProtocol xs) Source # 
Instance details

CanHardFork xs ⇒ ChainDepStateSupportsPeras (HardForkChainDepState xs) Source # 
Instance details

CanHardFork xs ⇒ ConsensusProtocol (HardForkProtocol xs) Source # 
Instance details

CanHardFork xs ⇒ ChainDepStateSupportsPeras (Ticked (HardForkChainDepState xs)) Source # 
Instance details