Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Node.Protocol.Byron
Synopsis
- mkConsensusProtocolByron :: NodeByronProtocolConfiguration -> Maybe ProtocolFilepaths -> ExceptT ByronProtocolInstantiationError IO (Protocol IO ByronBlockHFC ProtocolByron)
- mkSomeConsensusProtocolByron :: NodeByronProtocolConfiguration -> Maybe ProtocolFilepaths -> ExceptT ByronProtocolInstantiationError IO SomeConsensusProtocol
- data ByronProtocolInstantiationError
- = CanonicalDecodeFailure !FilePath !Text
- | GenesisHashMismatch !GenesisHash !GenesisHash
- | DelegationCertificateFilepathNotSpecified
- | GenesisConfigurationError !FilePath !ConfigurationError
- | GenesisReadError !FilePath !GenesisDataError
- | CredentialsError !ByronLeaderCredentialsError
- | SigningKeyDeserialiseFailure !FilePath !DeserialiseFailure
- | SigningKeyFilepathNotSpecified
- renderByronProtocolInstantiationError :: ByronProtocolInstantiationError -> Text
- readGenesis :: GenesisFile -> Maybe GenesisHash -> RequiresNetworkMagic -> ExceptT ByronProtocolInstantiationError IO Config
- readLeaderCredentials :: Config -> Maybe ProtocolFilepaths -> ExceptT ByronProtocolInstantiationError IO (Maybe ByronLeaderCredentials)
Protocol exposing the specific type
Use this when you need the specific instance
mkConsensusProtocolByron :: NodeByronProtocolConfiguration -> Maybe ProtocolFilepaths -> ExceptT ByronProtocolInstantiationError IO (Protocol IO ByronBlockHFC ProtocolByron) 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
mkSomeConsensusProtocolByron :: NodeByronProtocolConfiguration -> Maybe ProtocolFilepaths -> ExceptT ByronProtocolInstantiationError IO SomeConsensusProtocol Source #
Make SomeConsensusProtocol
using the Byron instance.
This 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 ByronProtocolInstantiationError Source #
Constructors
Instances
Show ByronProtocolInstantiationError Source # | |
Defined in Cardano.Node.Protocol.Byron Methods showsPrec :: Int -> ByronProtocolInstantiationError -> ShowS # |