Safe Haskell | None |
---|---|
Language | Haskell2010 |
Consensus modes. The node supports several different modes with different combinations of consensus protocols and ledger eras.
Synopsis
- type family ConsensusProtocol era where ...
- type family ChainDepStateProtocol era where ...
- data ConsensusModeParams where
- newtype EpochSlots = EpochSlots {}
- type family ConsensusCryptoForBlock block where ...
- type family ConsensusBlockForEra era where ...
- toConsensusEraIndex :: forall (xs :: [Type]) era. CardanoBlock StandardCrypto ~ HardForkBlock xs => CardanoEra era -> EraIndex xs
- fromConsensusEraIndex :: EraIndex (CardanoEras StandardCrypto) -> AnyCardanoEra
The protocols supported in each era
type family ConsensusProtocol era where ... Source #
type family ChainDepStateProtocol era where ... Source #
Connection parameters for each mode
data ConsensusModeParams where Source #
The consensus-mode-specific parameters needed to connect to a local node that is using each consensus mode.
It is in fact only the Byron era that requires extra parameters, but this is
of course inherited by the CardanoMode
that uses the Byron era. The reason
this parameter is needed stems from unfortunate design decisions from the
legacy Byron era. The slots per epoch are needed to be able to decode
epoch boundary blocks from the Byron era.
It is possible in future that we may be able to eliminate this parameter by discovering it from the node during the initial handshake.
Instances
Show ConsensusModeParams Source # | |
Defined in Cardano.Api.Modes |
newtype EpochSlots Source #
The number of slots per epoch.
Instances
Conversions to and from types in the consensus library
type family ConsensusCryptoForBlock block where ... Source #
type family ConsensusBlockForEra era where ... Source #
A closed type family that maps between the consensus mode (from this API) and the block type used by the consensus libraries.
ConsensusBlockForEra ByronEra = ByronBlock | |
ConsensusBlockForEra ShelleyEra = StandardShelleyBlock | |
ConsensusBlockForEra AllegraEra = StandardAllegraBlock | |
ConsensusBlockForEra MaryEra = StandardMaryBlock | |
ConsensusBlockForEra AlonzoEra = StandardAlonzoBlock | |
ConsensusBlockForEra BabbageEra = StandardBabbageBlock | |
ConsensusBlockForEra ConwayEra = StandardConwayBlock |
toConsensusEraIndex :: forall (xs :: [Type]) era. CardanoBlock StandardCrypto ~ HardForkBlock xs => CardanoEra era -> EraIndex xs Source #