ouroboros-consensus-protocol-0.3.1.0: Cardano consensus protocols
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Protocol.Translate

Synopsis

Documentation

class TranslateProto protoFrom protoTo where Source #

Translate across protocols

Methods

translateConsensusConfigConsensusConfig protoFrom → ConsensusConfig protoTo Source #

translateTickedLedgerViewTicked (LedgerView protoFrom) → Ticked (LedgerView protoTo) Source #

Translate the ticked ledger view.

translateChainDepStateChainDepState protoFrom → ChainDepState protoTo Source #

Instances

Instances details
TranslateProto singleProto singleProto Source #

Degenerate instance - we may always translate from a protocol to itself.

Instance details

Defined in Ouroboros.Consensus.Protocol.Translate

Methods

translateConsensusConfigConsensusConfig singleProto → ConsensusConfig singleProto Source #

translateTickedLedgerViewTicked (LedgerView singleProto) → Ticked (LedgerView singleProto) Source #

translateChainDepStateChainDepState 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:

  • They share the same HASH algorithm
  • They share the same ADDRHASH algorithm
  • They share the same DSIGN verification keys
  • They share the same VRF verification keys
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Translate