| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Node.Protocol.Cardano
Synopsis
- mkConsensusProtocolCardano :: NodeByronProtocolConfiguration -> NodeShelleyProtocolConfiguration -> NodeHardForkProtocolConfiguration -> Maybe ProtocolFilepaths -> ExceptT CardanoProtocolInstantiationError IO (Protocol IO (CardanoBlock StandardCrypto) ProtocolCardano)
- mkSomeConsensusProtocolCardano :: NodeByronProtocolConfiguration -> NodeShelleyProtocolConfiguration -> NodeHardForkProtocolConfiguration -> Maybe ProtocolFilepaths -> ExceptT CardanoProtocolInstantiationError IO SomeConsensusProtocol
- data CardanoProtocolInstantiationError
- renderCardanoProtocolInstantiationError :: CardanoProtocolInstantiationError -> Text
Protocol exposing the specific type
Use this when you need the specific instance
mkConsensusProtocolCardano :: NodeByronProtocolConfiguration -> NodeShelleyProtocolConfiguration -> NodeHardForkProtocolConfiguration -> Maybe ProtocolFilepaths -> ExceptT CardanoProtocolInstantiationError IO (Protocol IO (CardanoBlock StandardCrypto) ProtocolCardano) Source #
Instantiate Protocol for Byron specifically.
Use this when you need to run the consensus with this specific protocol.
Protocols hiding the specific type
Use this when you want to handle protocols generically
mkSomeConsensusProtocolCardano :: NodeByronProtocolConfiguration -> NodeShelleyProtocolConfiguration -> NodeHardForkProtocolConfiguration -> Maybe ProtocolFilepaths -> ExceptT CardanoProtocolInstantiationError IO SomeConsensusProtocol Source #
Make SomeConsensusProtocol using the Cardano instance.
The Cardano protocol instance is currently the sequential composition of the Byron and Shelley protocols, and will likely be extended in future with further sequentially composed protocol revisions.
The use of SomeConsensusProtocol lets us handle multiple protocols in a
generic way.
This also serves a purpose as a sanity check that we have all the necessary type class instances available.
Errors
data CardanoProtocolInstantiationError Source #
Constructors
| CardanoProtocolInstantiationErrorByron ByronProtocolInstantiationError | |
| CardanoProtocolInstantiationErrorShelley ShelleyProtocolInstantiationError |
Instances
| Show CardanoProtocolInstantiationError Source # | |
Defined in Cardano.Node.Protocol.Cardano Methods showsPrec :: Int -> CardanoProtocolInstantiationError -> ShowS # | |