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.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 EraSummary Source # 
Instance details

Arbitrary EraEnd Source # 
Instance details

Methods

arbitrary ∷ Gen EraEnd

shrinkEraEnd → [EraEnd]

Arbitrary EraParams Source # 
Instance details

Methods

arbitrary ∷ Gen EraParams

shrinkEraParams → [EraParams]

Arbitrary SafeZone Source # 
Instance details

Methods

arbitrary ∷ Gen SafeZone

shrinkSafeZone → [SafeZone]

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

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

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

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

Arbitrary (EraIndex (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 (CardanoBlock MockCryptoCompatByron) Source # 
Instance details

Arbitrary (CardanoHeader MockCryptoCompatByron) Source # 
Instance details

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

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

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

Methods

arbitrary ∷ Gen (NonEmpty xs a)

shrinkNonEmpty xs a → [NonEmpty xs a]

Arbitrary (Some QueryAnytime) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTxId c)) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTx c)) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoHeader c)) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (CardanoBlock c)) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) (SomeSecond (NestedCtxt Header) (CardanoBlock c))) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (SomeResult (CardanoBlock c))) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (SomeSecond BlockQuery (CardanoBlock c))) Source # 
Instance details

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

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (CardanoApplyTxErr c)) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (CardanoGenTx c)) Source # 
Instance details

c ~ MockCryptoCompatByron ⇒ Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) (CardanoBlock c)) Source # 
Instance details