Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- genBHeader ∷ (Signable (VRF c) Seed, Signable (KES c) (BHBody c), Crypto c) ⇒ [AllIssuerKeys c r] → Gen (BHeader c)
- 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)
- genCoherentBlock ∷ ∀ era r c. (EraSegWits era, Arbitrary (Tx era), Signable (KES c) ~ SignableRepresentation, PraosCrypto c) ⇒ [AllIssuerKeys c r] → Gen (Block (BHeader c) era)
- newtype VRFNatVal = VRFNatVal Natural
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 # | |
arbitrary ∷ Gen HashHeader Source # shrink ∷ HashHeader → [HashHeader] Source # | |
Arbitrary PrevHash Source # | |
Arbitrary KESPeriod Source # | |
Arbitrary OBftSlot Source # | |
Arbitrary PrtclState Source # | |
arbitrary ∷ Gen PrtclState Source # shrink ∷ PrtclState → [PrtclState] 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 (OCert c) Source # | |
(Crypto c, EraSegWits era, Signable (KES c) ~ SignableRepresentation, Signable (VRF c) ~ SignableRepresentation, Arbitrary (Tx era)) ⇒ Arbitrary (Block (BHeader c) era) Source # | |