Safe Haskell | None |
---|---|
Language | Haskell2010 |
Test.Consensus.Shelley.MockCrypto
Synopsis
- type Block = ShelleyBlock (TPraos MockCrypto) ShelleyEra
- type CanMock proto era = (ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), PraosCrypto (ProtoCrypto proto), PraosCrypto (ProtoCrypto proto), EraTx era, SignableRepresentation Seed, SignableRepresentation (BHBody (ProtoCrypto proto)), Signable (KES (ProtoCrypto proto)) ~ SignableRepresentation, Eq (PredicateFailure (EraRule "LEDGER" era)), Show (PredicateFailure (EraRule "LEDGER" 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), Arbitrary (CertState era))
- data MockCrypto
Documentation
type Block = ShelleyBlock (TPraos MockCrypto) ShelleyEra Source #
type CanMock proto era = (ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), PraosCrypto (ProtoCrypto proto), PraosCrypto (ProtoCrypto proto), EraTx era, SignableRepresentation Seed, SignableRepresentation (BHBody (ProtoCrypto proto)), Signable (KES (ProtoCrypto proto)) ~ SignableRepresentation, Eq (PredicateFailure (EraRule "LEDGER" era)), Show (PredicateFailure (EraRule "LEDGER" 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), Arbitrary (CertState era)) Source #
Cryptography that can easily be mocked
data MockCrypto 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.