cardano-protocol-tpraos-1.4.0.0: Cardano Protocol: Transitional Praos
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Protocol.TPraos.Arbitrary

Synopsis

Documentation

genBHeader ∷ (Signable (VRF c) Seed, Signable (KES c) (BHBody c), Crypto c) ⇒ [AllIssuerKeys c r] → Gen (BHeader c) Source #

genBlock ∷ (Crypto c, Signable (VRF c) Seed, Signable (KES c) (BHBody c), EraSegWits era, Arbitrary (Tx era)) ⇒ [AllIssuerKeys c r] → Gen (Block (BHeader c) era) Source #

Use supplied keys to generate a Block.

genCoherentBlock ∷ ∀ era r c. (EraSegWits era, Arbitrary (Tx era), Signable (KES c) ~ SignableRepresentation, PraosCrypto c) ⇒ [AllIssuerKeys c r] → Gen (Block (BHeader c) era) Source #

For some purposes, a totally random block generator may not be suitable. There are tests in the ouroboros-network repository, for instance, that perform some integrity checks on the generated blocks.

For other purposes, such as the serialization tests in this repository, genBlock is more appropriate.

This generator uses mkBlock provide more coherent blocks.

Orphan instances

Arbitrary HashHeader Source # 
Instance details

Arbitrary PrevHash Source # 
Instance details

Arbitrary KESPeriod Source # 
Instance details

Arbitrary OBftSlot Source # 
Instance details

Arbitrary PrtclState Source # 
Instance details

Arbitrary TicknState Source # 
Instance details

(Crypto c, Signable (VRF c) ~ SignableRepresentation) ⇒ Arbitrary (BHBody c) Source # 
Instance details

Methods

arbitraryGen (BHBody c) Source #

shrinkBHBody c → [BHBody c] Source #

(Crypto c, Signable (VRF c) ~ SignableRepresentation, Signable (KES c) ~ SignableRepresentation) ⇒ Arbitrary (BHeader c) Source # 
Instance details

Methods

arbitraryGen (BHeader c) Source #

shrinkBHeader c → [BHeader c] Source #

Crypto c ⇒ Arbitrary (OCert c) Source # 
Instance details

Methods

arbitraryGen (OCert c) Source #

shrinkOCert c → [OCert c] Source #

(Crypto c, EraSegWits era, Signable (KES c) ~ SignableRepresentation, Signable (VRF c) ~ SignableRepresentation, Arbitrary (Tx era)) ⇒ Arbitrary (Block (BHeader c) era) Source # 
Instance details

Methods

arbitraryGen (Block (BHeader c) era) Source #

shrinkBlock (BHeader c) era → [Block (BHeader c) era] Source #