ouroboros-consensus-cardano-0.20.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Cardano.CanHardFork

Synopsis

Documentation

data ByronPartialLedgerConfig Source #

When Byron is part of the hard-fork combinator, we use the partial ledger config. Standalone Byron uses the regular ledger config. This means that the partial ledger config is the perfect place to store the trigger condition for the hard fork to Shelley, as we don't have to modify the ledger config for standalone Byron.

Instances

Instances details
Generic ByronPartialLedgerConfig Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.CanHardFork

Associated Types

type Rep ByronPartialLedgerConfigTypeType #

NoThunks ByronPartialLedgerConfig Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.CanHardFork

type Rep ByronPartialLedgerConfig Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.CanHardFork

type Rep ByronPartialLedgerConfig = D1 ('MetaData "ByronPartialLedgerConfig" "Ouroboros.Consensus.Cardano.CanHardFork" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "ByronPartialLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronLedgerConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerConfig ByronBlock)) :*: S1 ('MetaSel ('Just "byronTriggerHardFork") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TriggerHardFork)))

data TriggerHardFork Source #

The trigger condition that will cause the hard fork transition.

This type is only intended for use as part of a LedgerCfg, which means it is "static": it cannot change during an execution of the node process.

Constructors

TriggerHardForkAtVersion !Word16

Trigger the transition when the on-chain protocol major version (from the ledger state) reaches this number.

Note: The HFC logic does not require the trigger version for one era to be the successor of the trigger version for the previous era.

TriggerHardForkAtEpoch !EpochNo

For testing only, trigger the transition at a specific hard-coded epoch, irrespective of the ledger state.

TriggerHardForkNotDuringThisExecution

Ledger states in this era cannot determine when the hard fork transition will happen.

It's crucial to note that this option does not imply that "the era will never end". Instead, the era cannot end within this node process before it restarts with different software and/or configuration for this era.

Instances

Instances details
Generic TriggerHardFork 
Instance details

Defined in Ouroboros.Consensus.HardFork.Simple

Associated Types

type Rep TriggerHardForkTypeType #

Show TriggerHardFork 
Instance details

Defined in Ouroboros.Consensus.HardFork.Simple

NoThunks TriggerHardFork 
Instance details

Defined in Ouroboros.Consensus.HardFork.Simple

type Rep TriggerHardFork 
Instance details

Defined in Ouroboros.Consensus.HardFork.Simple

type Rep TriggerHardFork = D1 ('MetaData "TriggerHardFork" "Ouroboros.Consensus.HardFork.Simple" "ouroboros-consensus-0.21.0.0-inplace" 'False) (C1 ('MetaCons "TriggerHardForkAtVersion" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)) :+: (C1 ('MetaCons "TriggerHardForkAtEpoch" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo)) :+: C1 ('MetaCons "TriggerHardForkNotDuringThisExecution" 'PrefixI 'False) (U1TypeType)))

Re-exports of Shelley code

data ShelleyPartialLedgerConfig era Source #

Constructors

ShelleyPartialLedgerConfig 

Fields

Instances

Instances details
Generic (ShelleyPartialLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

Associated Types

type Rep (ShelleyPartialLedgerConfig era) ∷ TypeType #

(NoThunks (TranslationContext era), Era era) ⇒ NoThunks (ShelleyPartialLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

type Rep (ShelleyPartialLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

type Rep (ShelleyPartialLedgerConfig era) = D1 ('MetaData "ShelleyPartialLedgerConfig" "Ouroboros.Consensus.Shelley.ShelleyHFC" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyPartialLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyLedgerConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ShelleyLedgerConfig era)) :*: S1 ('MetaSel ('Just "shelleyTriggerHardFork") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TriggerHardFork)))

crossEraForecastAcrossShelley ∷ ∀ eraFrom eraTo protoFrom protoTo. (TranslateProto protoFrom protoTo, LedgerSupportsProtocol (ShelleyBlock protoFrom eraFrom)) ⇒ RequiringBoth WrapLedgerConfig (CrossEraForecaster LedgerState WrapLedgerView) (ShelleyBlock protoFrom eraFrom) (ShelleyBlock protoTo eraTo) Source #

translateChainDepStateAcrossShelley ∷ ∀ eraFrom eraTo protoFrom protoTo. TranslateProto protoFrom protoTo ⇒ RequiringBoth WrapConsensusConfig (Translate WrapChainDepState) (ShelleyBlock protoFrom eraFrom) (ShelleyBlock protoTo eraTo) Source #

Orphan instances

SingleEraBlock ByronBlock Source # 
Instance details

HasPartialLedgerConfig ByronBlock Source # 
Instance details

Associated Types

type PartialLedgerConfig ByronBlock Source #

CardanoHardForkConstraints c ⇒ CanHardFork (CardanoEras c) Source # 
Instance details

Associated Types

type HardForkTxMeasure (CardanoEras c) Source #

PBftCrypto bc ⇒ HasPartialConsensusConfig (PBft bc) Source # 
Instance details

Associated Types

type PartialConsensusConfig (PBft bc) Source #