type ProtocolByron = HardForkProtocol '[ ByronBlock ]
type ProtocolShelley = HardForkProtocol '[ ShelleyBlock StandardShelley ]
+
type ProtocolMary = HardForkProtocol '[ ShelleyBlock StandardMary ]
type ProtocolCardano = HardForkProtocol '[ ByronBlock
, ShelleyBlock StandardShelley
, ShelleyBlock StandardAllegra
-- | Consensus protocol to use
data Protocol (m :: Type -> Type) blk p where
-
-- | Run PBFT against the real Byron ledger
+
-- | Run PBFT against the Byron ledger
-> Protocol m ByronBlockHFC ProtocolByron
-
-- | Run TPraos against the real Shelley ledger
+
-- | Run TPraos against the Shelley ledger
:: ProtocolParamsShelleyBased StandardShelley []
-> Protocol m (ShelleyBlockHFC StandardShelley) ProtocolShelley
+
-- | Run TPraos against the Mary ledger
+
:: ProtocolParamsShelleyBased StandardMary []
+
-> Protocol m (ShelleyBlockHFC StandardMary) ProtocolMary
-- | Run the protocols of /the/ Cardano block
verifyProtocol :: Protocol m blk p -> (p :~: BlockProtocol blk)
verifyProtocol ProtocolByron{} = Refl
verifyProtocol ProtocolShelley{} = Refl
+
verifyProtocol ProtocolMary{} = Refl
verifyProtocol ProtocolCardano{} = Refl
{-------------------------------------------------------------------------------
protocolInfo (ProtocolShelley paramsShelleyBased paramsShelley) =
inject $ protocolInfoShelley paramsShelleyBased paramsShelley
+
protocolInfo (ProtocolMary paramsShelleyBased paramsMary) =
+
inject $ protocolInfoMary paramsShelleyBased paramsMary
protocolInfo (ProtocolCardano
runProtocol :: Protocol m blk p -> Dict (RunNode blk)
runProtocol ProtocolByron{} = Dict
runProtocol ProtocolShelley{} = Dict
+
runProtocol ProtocolMary{} = Dict
runProtocol ProtocolCardano{} = Dict
{-------------------------------------------------------------------------------