Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ByronPartialLedgerConfig = ByronPartialLedgerConfig { }
- 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)), HASH c ~ Blake2b_256 , ADDRHASH c ~ Blake2b_224 , DSIGN c ~ Ed25519DSIGN )
- data TriggerHardFork
-
data
ShelleyPartialLedgerConfig
era =
ShelleyPartialLedgerConfig
{
- shelleyLedgerConfig :: !( ShelleyLedgerConfig era)
- shelleyTriggerHardFork :: ! TriggerHardFork
- forecastAcrossShelley :: ( TranslateProto protoFrom protoTo, LedgerSupportsProtocol ( ShelleyBlock protoFrom eraFrom)) => ShelleyLedgerConfig eraFrom -> ShelleyLedgerConfig eraTo -> Bound -> SlotNo -> LedgerState ( ShelleyBlock protoFrom eraFrom) -> Except OutsideForecastRange ( Ticked ( 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.
Instances
Generic ByronPartialLedgerConfig Source # | |
Defined in Ouroboros.Consensus.Cardano.CanHardFork |
|
NoThunks ByronPartialLedgerConfig Source # | |
Defined in Ouroboros.Consensus.Cardano.CanHardFork |
|
type Rep ByronPartialLedgerConfig Source # | |
Defined in Ouroboros.Consensus.Cardano.CanHardFork
type
Rep
ByronPartialLedgerConfig
=
D1
('
MetaData
"ByronPartialLedgerConfig" "Ouroboros.Consensus.Cardano.CanHardFork" "ouroboros-consensus-cardano-0.1.0.1-3AwOJsg5eTrDZBA8Dc5gHR" '
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
)))
|
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)), HASH c ~ Blake2b_256 , ADDRHASH c ~ Blake2b_224 , DSIGN c ~ Ed25519DSIGN ) Source #
data TriggerHardFork Source #
The trigger condition that will cause the hard fork transition.
TriggerHardForkAtVersion ! Word16 |
Trigger the transition when the on-chain protocol major version (from the ledger state) reaches this number. |
TriggerHardForkAtEpoch ! EpochNo |
For testing only, trigger the transition at a specific hard-coded epoch, irrespective of the ledger state. |
TriggerHardForkNever |
Never trigger a hard fork |
Instances
Re-exports of Shelley code
data ShelleyPartialLedgerConfig era Source #
ShelleyPartialLedgerConfig | |
|
Instances
forecastAcrossShelley Source #
:: ( 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 ( Ticked ( 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 # | |
singleEraTransition :: PartialLedgerConfig ByronBlock -> EraParams -> Bound -> LedgerState ByronBlock -> Maybe EpochNo Source # singleEraInfo :: proxy ByronBlock -> SingleEraInfo ByronBlock Source # |
|
HasPartialLedgerConfig ByronBlock Source # | |
completeLedgerConfig :: proxy ByronBlock -> EpochInfo ( Except PastHorizonException ) -> PartialLedgerConfig ByronBlock -> LedgerConfig ByronBlock Source # |
|
CardanoHardForkConstraints c => CanHardFork ( CardanoEras c) Source # | |
PBftCrypto bc => HasPartialConsensusConfig ( PBft bc) Source # | |
type PartialConsensusConfig ( PBft bc) Source # completeConsensusConfig :: proxy ( PBft bc) -> EpochInfo ( Except PastHorizonException ) -> PartialConsensusConfig ( PBft bc) -> ConsensusConfig ( PBft bc) Source # toPartialConsensusConfig :: proxy ( PBft bc) -> ConsensusConfig ( PBft bc) -> PartialConsensusConfig ( PBft bc) Source # |