Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
class
TranslateProto
protoFrom protoTo
where
- translateConsensusConfig :: ConsensusConfig protoFrom -> ConsensusConfig protoTo
- translateTickedLedgerView :: Ticked ( LedgerView protoFrom) -> Ticked ( LedgerView protoTo)
- translateChainDepState :: ChainDepState protoFrom -> ChainDepState protoTo
Documentation
class TranslateProto protoFrom protoTo where Source #
Translate across protocols
translateConsensusConfig :: ConsensusConfig protoFrom -> ConsensusConfig protoTo Source #
translateTickedLedgerView :: Ticked ( LedgerView protoFrom) -> Ticked ( LedgerView protoTo) Source #
Translate the ticked ledger view.
translateChainDepState :: ChainDepState protoFrom -> ChainDepState protoTo Source #
Instances
TranslateProto singleProto singleProto Source # |
Degenerate instance - we may always translate from a protocol to itself. |
Defined in Ouroboros.Consensus.Protocol.Translate translateConsensusConfig :: ConsensusConfig singleProto -> ConsensusConfig singleProto Source # translateTickedLedgerView :: Ticked ( LedgerView singleProto) -> Ticked ( LedgerView singleProto) Source # translateChainDepState :: ChainDepState singleProto -> ChainDepState singleProto Source # |
|
( HASH c1 ~ HASH c2, ADDRHASH c1 ~ ADDRHASH c2, VerKeyDSIGN c1 ~ VerKeyDSIGN c2, VerKeyVRF c1 ~ VerKeyVRF c2) => TranslateProto ( TPraos c1) ( Praos c2) Source # |
We can translate between TPraos and Praos, provided:
|
Defined in Ouroboros.Consensus.Protocol.Praos.Translate translateConsensusConfig :: ConsensusConfig ( TPraos c1) -> ConsensusConfig ( Praos c2) Source # translateTickedLedgerView :: Ticked ( LedgerView ( TPraos c1)) -> Ticked ( LedgerView ( Praos c2)) Source # translateChainDepState :: ChainDepState ( TPraos c1) -> ChainDepState ( Praos c2) Source # |