Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Cardano.CanHardFork
Synopsis
- data ByronPartialLedgerConfig = ByronPartialLedgerConfig {
- byronLedgerConfig :: !(LedgerConfig ByronBlock)
- byronTriggerHardFork :: !TriggerHardFork
- type CardanoHardForkConstraints c = (PraosCrypto c, PraosCrypto c, TranslateProto (TPraos c) (Praos c), ShelleyCompatible (TPraos c) (ShelleyEra c), LedgerSupportsProtocol (ShelleyBlock (TPraos c) (ShelleyEra c)), ShelleyCompatible (TPraos c) (AllegraEra c), LedgerSupportsProtocol (ShelleyBlock (TPraos c) (AllegraEra c)), ShelleyCompatible (TPraos c) (MaryEra c), LedgerSupportsProtocol (ShelleyBlock (TPraos c) (MaryEra c)), ShelleyCompatible (TPraos c) (AlonzoEra c), LedgerSupportsProtocol (ShelleyBlock (TPraos c) (AlonzoEra c)), ShelleyCompatible (Praos c) (BabbageEra c), LedgerSupportsProtocol (ShelleyBlock (Praos c) (BabbageEra c)), ShelleyCompatible (Praos c) (ConwayEra c), LedgerSupportsProtocol (ShelleyBlock (Praos c) (ConwayEra c)), HASH c ~ Blake2b_256, ADDRHASH c ~ Blake2b_224, DSIGN c ~ Ed25519DSIGN)
- data TriggerHardFork
- data ShelleyPartialLedgerConfig era = ShelleyPartialLedgerConfig {}
- forecastAcrossShelley :: forall protoFrom protoTo eraFrom eraTo. (TranslateProto protoFrom protoTo, LedgerSupportsProtocol (ShelleyBlock protoFrom eraFrom)) => ShelleyLedgerConfig eraFrom -> ShelleyLedgerConfig eraTo -> Bound -> SlotNo -> LedgerState (ShelleyBlock protoFrom eraFrom) -> Except OutsideForecastRange (WrapLedgerView (ShelleyBlock protoTo eraTo))
- translateChainDepStateAcrossShelley :: forall eraFrom eraTo protoFrom protoTo. TranslateProto protoFrom protoTo => RequiringBoth WrapConsensusConfig (Translate WrapChainDepState) (ShelleyBlock protoFrom eraFrom) (ShelleyBlock protoTo eraTo)
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.
Constructors
ByronPartialLedgerConfig | |
Fields
|
Instances
type CardanoHardForkConstraints c = (PraosCrypto c, PraosCrypto c, TranslateProto (TPraos c) (Praos c), ShelleyCompatible (TPraos c) (ShelleyEra c), LedgerSupportsProtocol (ShelleyBlock (TPraos c) (ShelleyEra c)), ShelleyCompatible (TPraos c) (AllegraEra c), LedgerSupportsProtocol (ShelleyBlock (TPraos c) (AllegraEra c)), ShelleyCompatible (TPraos c) (MaryEra c), LedgerSupportsProtocol (ShelleyBlock (TPraos c) (MaryEra c)), ShelleyCompatible (TPraos c) (AlonzoEra c), LedgerSupportsProtocol (ShelleyBlock (TPraos c) (AlonzoEra c)), ShelleyCompatible (Praos c) (BabbageEra c), LedgerSupportsProtocol (ShelleyBlock (Praos c) (BabbageEra c)), ShelleyCompatible (Praos c) (ConwayEra c), LedgerSupportsProtocol (ShelleyBlock (Praos c) (ConwayEra c)), HASH c ~ Blake2b_256, ADDRHASH c ~ Blake2b_224, DSIGN c ~ Ed25519DSIGN) Source #
data TriggerHardFork #
Constructors
TriggerHardForkAtVersion !Word16 | |
TriggerHardForkAtEpoch !EpochNo | |
TriggerHardForkNotDuringThisExecution |
Instances
Re-exports of Shelley code
data ShelleyPartialLedgerConfig era Source #
Constructors
ShelleyPartialLedgerConfig | |
Fields
|
Instances
forecastAcrossShelley Source #
Arguments
:: forall protoFrom protoTo eraFrom eraTo. (TranslateProto protoFrom protoTo, LedgerSupportsProtocol (ShelleyBlock protoFrom eraFrom)) | |
=> ShelleyLedgerConfig eraFrom | |
-> ShelleyLedgerConfig eraTo | |
-> Bound | Transition between the two eras |
-> SlotNo | Forecast for this slot |
-> LedgerState (ShelleyBlock protoFrom eraFrom) | |
-> Except OutsideForecastRange (WrapLedgerView (ShelleyBlock protoTo eraTo)) |
Forecast from a Shelley-based era to the next Shelley-based era.
translateChainDepStateAcrossShelley :: forall eraFrom eraTo protoFrom protoTo. TranslateProto protoFrom protoTo => RequiringBoth WrapConsensusConfig (Translate WrapChainDepState) (ShelleyBlock protoFrom eraFrom) (ShelleyBlock protoTo eraTo) Source #
Orphan instances
SingleEraBlock ByronBlock Source # | |
Methods singleEraTransition :: PartialLedgerConfig ByronBlock -> EraParams -> Bound -> LedgerState ByronBlock -> Maybe EpochNo singleEraInfo :: proxy ByronBlock -> SingleEraInfo ByronBlock | |
HasPartialLedgerConfig ByronBlock Source # | |
Associated Types type PartialLedgerConfig ByronBlock Methods completeLedgerConfig :: proxy ByronBlock -> EpochInfo (Except PastHorizonException) -> PartialLedgerConfig ByronBlock -> LedgerConfig ByronBlock | |
CardanoHardForkConstraints c => CanHardFork (CardanoEras c) Source # | |
Methods hardForkEraTranslation :: EraTranslation (CardanoEras c) hardForkChainSel :: Tails AcrossEraSelection (CardanoEras c) hardForkInjectTxs :: InPairs (RequiringBoth WrapLedgerConfig (Product2 InjectTx InjectValidatedTx)) (CardanoEras c) | |
PBftCrypto bc => HasPartialConsensusConfig (PBft bc) Source # | |
Associated Types type PartialConsensusConfig (PBft bc) Methods completeConsensusConfig :: proxy (PBft bc) -> EpochInfo (Except PastHorizonException) -> PartialConsensusConfig (PBft bc) -> ConsensusConfig (PBft bc) toPartialConsensusConfig :: proxy (PBft bc) -> ConsensusConfig (PBft bc) -> PartialConsensusConfig (PBft bc) |