ouroboros-consensus-cardano-0.20.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Consensus.Shelley.MockCrypto

Synopsis

Documentation

type CanMock proto era = (ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), Mock (EraCrypto era), PraosCrypto (EraCrypto era), EraTx era, Arbitrary (TxAuxData era), Arbitrary (PParams era), Arbitrary (PParamsUpdate era), Arbitrary (Script era), Arbitrary (TxBody era), Arbitrary (Tx era), Arbitrary (TxOut era), Arbitrary (Value era), Arbitrary (PredicateFailure (ShelleyUTXOW era)), Arbitrary (TxWits era), Arbitrary (StashedAVVMAddresses era), Arbitrary (GovState era)) Source #

Cryptography that can easily be mocked

data MockCrypto h Source #

A mock replacement for StandardCrypto

We run the tests with this mock crypto, as it is easier to generate and debug things. The code is parametric in the crypto, so it shouldn't make much of a difference. This also has the important advantage that we can reuse the generators from cardano-ledger-specs.

Instances

Instances details
HashAlgorithm h ⇒ Crypto (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

Associated Types

type HASH (MockCrypto h) Source #

type ADDRHASH (MockCrypto h) Source #

type DSIGN (MockCrypto h) Source #

type KES (MockCrypto h) Source #

type VRF (MockCrypto h) Source #

HashAlgorithm h ⇒ PraosCrypto (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

HashAlgorithm h ⇒ PraosCrypto (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

HashAlgorithm h ⇒ TxGen (ShelleyBlock (TPraos (MockCrypto h)) (MockShelley h)) Source # 
Instance details

Defined in Test.ThreadNet.TxGen.Shelley

Associated Types

type TxGenExtra (ShelleyBlock (TPraos (MockCrypto h)) (MockShelley h)) Source #

type ADDRHASH (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

type ADDRHASH (MockCrypto h) = h
type DSIGN (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

type HASH (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

type HASH (MockCrypto h) = h
type KES (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

type KES (MockCrypto h) = MockKES 10
type VRF (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

type TxGenExtra (ShelleyBlock (TPraos (MockCrypto h)) (MockShelley h)) Source # 
Instance details

Defined in Test.ThreadNet.TxGen.Shelley