ouroboros-consensus-shelley-test-0.1.0.0: Test infrastructure for Shelley
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.Shelley.MockCrypto

Synopsis

Documentation

type CanMock proto era = (ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), Mock (EraCrypto era), PraosCrypto (EraCrypto era), ValidateScript era, Arbitrary (AuxiliaryData era), Arbitrary (PParams era), Arbitrary (Script era), Arbitrary (TxBody era), Arbitrary (Tx era), Arbitrary (TxOut era), Arbitrary (Value era), Arbitrary (PredicateFailure (UTXOW era)), Arbitrary (Witnesses era), Arbitrary (StashedAVVMAddresses 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 ⇒ 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 ⇒ Crypto (MockCrypto h) Source # 
Instance details

Defined in Test.Consensus.Shelley.MockCrypto

Associated Types

type HASH (MockCrypto h)

type ADDRHASH (MockCrypto h)

type DSIGN (MockCrypto h)

type KES (MockCrypto h)

type VRF (MockCrypto h)

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 DSIGN (MockCrypto h) = MockDSIGN
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 VRF (MockCrypto h) = MockVRF
type TxGenExtra (ShelleyBlock (TPraos (MockCrypto h)) (MockShelley h)) Source # 
Instance details

Defined in Test.ThreadNet.TxGen.Shelley