Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Cardano.CanHardFork
Synopsis
- type CardanoHardForkConstraints c = (PraosCrypto c, PraosCrypto c, TranslateProto (TPraos c) (Praos c), ShelleyCompatible (TPraos c) ShelleyEra, LedgerSupportsProtocol (ShelleyBlock (TPraos c) ShelleyEra), ShelleyCompatible (TPraos c) AllegraEra, LedgerSupportsProtocol (ShelleyBlock (TPraos c) AllegraEra), ShelleyCompatible (TPraos c) MaryEra, LedgerSupportsProtocol (ShelleyBlock (TPraos c) MaryEra), ShelleyCompatible (TPraos c) AlonzoEra, LedgerSupportsProtocol (ShelleyBlock (TPraos c) AlonzoEra), ShelleyCompatible (Praos c) BabbageEra, LedgerSupportsProtocol (ShelleyBlock (Praos c) BabbageEra), ShelleyCompatible (Praos c) ConwayEra, LedgerSupportsProtocol (ShelleyBlock (Praos c) ConwayEra))
- data TriggerHardFork
- data ShelleyPartialLedgerConfig era = ShelleyPartialLedgerConfig {}
- crossEraForecastAcrossShelley ∷ ∀ eraFrom eraTo protoFrom protoTo. (TranslateProto protoFrom protoTo, LedgerSupportsProtocol (ShelleyBlock protoFrom eraFrom)) ⇒ RequiringBoth WrapLedgerConfig (CrossEraForecaster LedgerState WrapLedgerView) (ShelleyBlock protoFrom eraFrom) (ShelleyBlock protoTo eraTo)
- translateChainDepStateAcrossShelley ∷ ∀ eraFrom eraTo protoFrom protoTo. TranslateProto protoFrom protoTo ⇒ RequiringBoth WrapConsensusConfig (Translate WrapChainDepState) (ShelleyBlock protoFrom eraFrom) (ShelleyBlock protoTo eraTo)
- getConwayTranslationContext ∷ WrapLedgerConfig (ShelleyBlock (Praos c) ConwayEra) → TranslationContext ConwayEra
Documentation
type CardanoHardForkConstraints c = (PraosCrypto c, PraosCrypto c, TranslateProto (TPraos c) (Praos c), ShelleyCompatible (TPraos c) ShelleyEra, LedgerSupportsProtocol (ShelleyBlock (TPraos c) ShelleyEra), ShelleyCompatible (TPraos c) AllegraEra, LedgerSupportsProtocol (ShelleyBlock (TPraos c) AllegraEra), ShelleyCompatible (TPraos c) MaryEra, LedgerSupportsProtocol (ShelleyBlock (TPraos c) MaryEra), ShelleyCompatible (TPraos c) AlonzoEra, LedgerSupportsProtocol (ShelleyBlock (TPraos c) AlonzoEra), ShelleyCompatible (Praos c) BabbageEra, LedgerSupportsProtocol (ShelleyBlock (Praos c) BabbageEra), ShelleyCompatible (Praos c) ConwayEra, LedgerSupportsProtocol (ShelleyBlock (Praos c) ConwayEra)) Source #
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
Re-exports of Shelley code
data ShelleyPartialLedgerConfig era Source #
Constructors
ShelleyPartialLedgerConfig | |
Fields
|
Instances
Generic (ShelleyPartialLedgerConfig era) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Associated Types
Methods from ∷ ShelleyPartialLedgerConfig era → Rep (ShelleyPartialLedgerConfig era) x # to ∷ Rep (ShelleyPartialLedgerConfig era) x → ShelleyPartialLedgerConfig era # | |||||
(NoThunks (TranslationContext era), Era era) ⇒ NoThunks (ShelleyPartialLedgerConfig era) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger | |||||
ShelleyBasedEra era ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (ShelleyPartialLedgerConfig era) Source # | This instance uses the invariant that the | ||||
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ShelleyPartialLedgerConfig era → Encoding Source # decodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ∀ s. Decoder s (ShelleyPartialLedgerConfig era) Source # | |||||
type Rep (ShelleyPartialLedgerConfig era) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger type Rep (ShelleyPartialLedgerConfig era) = D1 ('MetaData "ShelleyPartialLedgerConfig" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.0.1-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 #
Exposed for testing
getConwayTranslationContext ∷ WrapLedgerConfig (ShelleyBlock (Praos c) ConwayEra) → TranslationContext ConwayEra Source #
Orphan instances
CardanoHardForkConstraints c ⇒ CanHardFork (CardanoEras c) Source # | When performing era translations, two eras have special behaviours on the ledger tables:
| ||||
Associated Types
Methods hardForkEraTranslation ∷ EraTranslation (CardanoEras c) Source # hardForkChainSel ∷ Tails AcrossEraSelection (CardanoEras c) Source # hardForkInjectTxs ∷ InPairs (RequiringBoth WrapLedgerConfig (Product2 InjectTx InjectValidatedTx)) (CardanoEras c) Source # hardForkInjTxMeasure ∷ NS WrapTxMeasure (CardanoEras c) → HardForkTxMeasure (CardanoEras c) Source # |