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

Test.Cardano.Protocol.TPraos.Arbitrary

Synopsis

Documentation

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

Use supplied keys to generate a Block.

genCoherentBlock ∷ ∀ era r. (EraSegWits era, Arbitrary (Tx era), Signable (KES (EraCrypto era)) ~ SignableRepresentation, Signable (DSIGN (EraCrypto era)) ~ SignableRepresentation, PraosCrypto (EraCrypto era)) ⇒ [AllIssuerKeys (EraCrypto era) r] → Gen (Block (BHeader (EraCrypto era)) 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 KESPeriod 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 (HashHeader c) Source # 
Instance details

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

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

Methods

arbitraryGen (OCert c) Source #

shrinkOCert c → [OCert c] Source #

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

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

(Era era, c ~ EraCrypto era, 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 #