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

Test.Consensus.Cardano.Generators

Description

Arbitrary instances intended for serialisation roundtrip tests for CardanoBlock and its related types.

Because the generated values are only used in serialisation roundtrip tests, they don't need to be valid blocks, transactions, etc.

We combine the Byron and Shelley-based instances defined elsewhere into Cardano instances by picking randomly from one of the eras.

Documentation

Orphan instances

Arbitrary EraParams Source # 
Instance details

Arbitrary SafeZone Source # 
Instance details

Arbitrary EraEnd Source # 
Instance details

Arbitrary EraSummary Source # 
Instance details

Arbitrary (EraIndex (CardanoEras c)) Source # 
Instance details

Arbitrary (BlockNodeToClientVersion blk) ⇒ Arbitrary (EraNodeToClientVersion blk) Source # 
Instance details

CardanoHardForkConstraints c ⇒ Arbitrary (HardForkNodeToClientVersion (CardanoEras c)) Source # 
Instance details

CardanoHardForkConstraints c ⇒ Arbitrary (HardForkNodeToNodeVersion (CardanoEras c)) Source # 
Instance details

Arbitrary (Interpreter (CardanoEras c)) Source # 
Instance details

(c ~ MockCryptoCompatByron, ShelleyBasedEra (ShelleyEra c)) ⇒ Arbitrary (AnnTip (CardanoBlock c)) Source # 
Instance details

Arbitrary (BlockNodeToNodeVersion blk) ⇒ Arbitrary (WrapNodeToNodeVersion blk) Source # 
Instance details

Arbitrary (Coherent (CardanoBlock MockCryptoCompatByron)) Source # 
Instance details

Arbitrary (CardanoBlock MockCryptoCompatByron) Source # 
Instance details

Arbitrary (CardanoHeader MockCryptoCompatByron) Source # 
Instance details

(CanMock (TPraos c) (ShelleyEra c), CardanoHardForkConstraints c) ⇒ Arbitrary (OneEraHash (CardanoEras c)) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (SomeSecond BlockQuery (CardanoBlock c))) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (SomeResult (CardanoBlock c))) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (CardanoApplyTxErr c)) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (CardanoBlock c)) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (CardanoGenTx c)) Source # 
Instance details

CardanoHardForkConstraints c ⇒ Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (Some (QueryHardFork (CardanoEras c)))) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (SomeSecond (NestedCtxt Header) (CardanoBlock c))) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoBlock c)) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTx c)) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTxId c)) Source # 
Instance details

c ~ MockCryptoCompatByronArbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoHeader c)) Source # 
Instance details

Arbitrary (Some QueryAnytime) Source # 
Instance details

(Arbitrary a, SListI xs) ⇒ Arbitrary (NonEmpty xs a) Source # 
Instance details

Methods

arbitraryGen (NonEmpty xs a) Source #

shrinkNonEmpty xs a → [NonEmpty xs a] Source #