ouroboros-consensus-cardano-test-0.1.0.0: Test of the instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.Cardano.MockCrypto

Synopsis

Documentation

data MockCryptoCompatByron Source #

A replacement for MockCrypto that is compatible with bootstrapping from Byron.

  • The Ouroboros.Consensus.Cardano.CanHardFork translation requires that ADDRHASH has the same bit size as Byron address hashes (ie 224); that's why we use Blake2b_224 here.
  • Similarly, HASH has to have the same bit size as Byron header hashes (ie 256), that's why we use Blake2b_256 here.
  • The cardano-ledger-shelley package currently requires that @DSIGN ~ Ed25519DSIGN in order to use Byron bootstrap witnesses.
  • We can still use mock KES and mock VRF.

Note that many Shelley generators are not instantiated to MockShelley but are constrained by CanMock era. ShelleyEra MockCryptoCompatByron satisfies this constraint, allowing us to reuse these generators for Cardano.

Instances

Instances details
PraosCrypto MockCryptoCompatByron Source # 
Instance details

Defined in Test.Consensus.Cardano.MockCrypto

PraosCrypto MockCryptoCompatByron Source # 
Instance details

Defined in Test.Consensus.Cardano.MockCrypto

Crypto MockCryptoCompatByron Source # 
Instance details

Defined in Test.Consensus.Cardano.MockCrypto

Arbitrary (CardanoBlock MockCryptoCompatByron) 
Instance details

Defined in Test.Consensus.Cardano.Generators

Arbitrary (CardanoHeader MockCryptoCompatByron) 
Instance details

Defined in Test.Consensus.Cardano.Generators

Arbitrary (Coherent (CardanoBlock MockCryptoCompatByron)) 
Instance details

Defined in Test.Consensus.Cardano.Generators

type HASH MockCryptoCompatByron Source # 
Instance details

Defined in Test.Consensus.Cardano.MockCrypto

type HASH MockCryptoCompatByron = Blake2b_256
type ADDRHASH MockCryptoCompatByron Source # 
Instance details

Defined in Test.Consensus.Cardano.MockCrypto

type ADDRHASH MockCryptoCompatByron = Blake2b_224
type DSIGN MockCryptoCompatByron Source # 
Instance details

Defined in Test.Consensus.Cardano.MockCrypto

type DSIGN MockCryptoCompatByron = Ed25519DSIGN
type VRF MockCryptoCompatByron Source # 
Instance details

Defined in Test.Consensus.Cardano.MockCrypto

type VRF MockCryptoCompatByron = MockVRF
type KES MockCryptoCompatByron Source # 
Instance details

Defined in Test.Consensus.Cardano.MockCrypto

type KES MockCryptoCompatByron = MockKES 10