Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- genBHeader ∷ (Signable (DSIGN c) (OCertSignable c), Signable (VRF c) Seed, Signable (KES c) (BHBody c), Crypto c) ⇒ [AllIssuerKeys c r] → Gen (BHeader c)
- 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)
- 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)
Documentation
genBHeader ∷ (Signable (DSIGN c) (OCertSignable c), Signable (VRF c) Seed, Signable (KES c) (BHBody c), Crypto c) ⇒ [AllIssuerKeys c r] → Gen (BHeader c) Source #
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 # | |
Arbitrary TicknState Source # | |
arbitrary ∷ Gen TicknState Source # shrink ∷ TicknState → [TicknState] Source # | |
(Crypto c, Signable (VRF c) ~ SignableRepresentation) ⇒ Arbitrary (BHBody c) Source # | |
(Crypto c, Signable (VRF c) ~ SignableRepresentation, Signable (KES c) ~ SignableRepresentation) ⇒ Arbitrary (BHeader c) Source # | |
Crypto c ⇒ Arbitrary (HashHeader c) Source # | |
arbitrary ∷ Gen (HashHeader c) Source # shrink ∷ HashHeader c → [HashHeader c] Source # | |
Crypto c ⇒ Arbitrary (PrevHash c) Source # | |
Crypto c ⇒ Arbitrary (OCert c) Source # | |
Crypto c ⇒ Arbitrary (OBftSlot c) Source # | |
Crypto c ⇒ Arbitrary (PrtclState c) Source # | |
arbitrary ∷ Gen (PrtclState c) Source # shrink ∷ PrtclState c → [PrtclState c] Source # | |
(Era era, c ~ EraCrypto era, EraSegWits era, Signable (KES c) ~ SignableRepresentation, Signable (VRF c) ~ SignableRepresentation, Arbitrary (Tx era)) ⇒ Arbitrary (Block (BHeader c) era) Source # | |