ouroboros-consensus:unstable-shelley-testlib
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.Shelley.Generators

Documentation

data SomeResult blk where #

Constructors

SomeResult ∷ ∀ result blk (fp ∷ QueryFootprint). (Eq result, Show result, Typeable result) ⇒ BlockQuery blk fp result → result → SomeResult blk 

Instances

Instances details
(Arbitrary (InstantStake era), CanMock proto era) ⇒ Arbitrary (SomeResult (ShelleyBlock proto era)) Source # 
Instance details

Defined in Test.Consensus.Shelley.Generators

Methods

arbitrary ∷ Gen (SomeResult (ShelleyBlock proto era)) Source #

shrink ∷ SomeResult (ShelleyBlock proto era) → [SomeResult (ShelleyBlock proto era)] Source #

Eq (SomeResult blk) # 
Instance details

Defined in Test.Util.Serialisation.SomeResult

Methods

(==) ∷ SomeResult blk → SomeResult blk → Bool #

(/=) ∷ SomeResult blk → SomeResult blk → Bool #

Show (SomeResult blk) # 
Instance details

Defined in Test.Util.Serialisation.SomeResult

Methods

showsPrec ∷ Int → SomeResult blk → ShowS #

show ∷ SomeResult blk → String #

showList ∷ [SomeResult blk] → ShowS #

Orphan instances

Arbitrary CompactGenesis Source # 
Instance details

Methods

arbitrary ∷ Gen CompactGenesis Source #

shrink ∷ CompactGenesis → [CompactGenesis] Source #

Arbitrary BigEndianTxIn Source # 
Instance details

Methods

arbitrary ∷ Gen BigEndianTxIn Source #

shrink ∷ BigEndianTxIn → [BigEndianTxIn] Source #

Arbitrary ShelleyTransition Source # 
Instance details

Methods

arbitrary ∷ Gen ShelleyTransition Source #

shrink ∷ ShelleyTransition → [ShelleyTransition] Source #

Arbitrary ShelleyNodeToClientVersion Source # 
Instance details

Methods

arbitrary ∷ Gen ShelleyNodeToClientVersion Source #

shrink ∷ ShelleyNodeToClientVersion → [ShelleyNodeToClientVersion] Source #

Arbitrary ShelleyNodeToNodeVersion Source # 
Instance details

Methods

arbitrary ∷ Gen ShelleyNodeToNodeVersion Source #

shrink ∷ ShelleyNodeToNodeVersion → [ShelleyNodeToNodeVersion] Source #

Arbitrary NonMyopicMemberRewards Source # 
Instance details

Methods

arbitrary ∷ Gen NonMyopicMemberRewards Source #

shrink ∷ NonMyopicMemberRewards → [NonMyopicMemberRewards] Source #

Arbitrary ShelleyHash Source # 
Instance details

Methods

arbitrary ∷ Gen ShelleyHash Source #

shrink ∷ ShelleyHash → [ShelleyHash] Source #

Arbitrary TPraosState Source # 
Instance details

Methods

arbitrary ∷ Gen TPraosState Source #

shrink ∷ TPraosState → [TPraosState] Source #

CanMock (Praos crypto) era ⇒ Arbitrary (Header (ShelleyBlock (Praos crypto) era)) Source # 
Instance details

Methods

arbitrary ∷ Gen (Header (ShelleyBlock (Praos crypto) era)) Source #

shrink ∷ Header (ShelleyBlock (Praos crypto) era) → [Header (ShelleyBlock (Praos crypto) era)] Source #

CanMock (TPraos crypto) era ⇒ Arbitrary (Header (ShelleyBlock (TPraos crypto) era)) Source # 
Instance details

Methods

arbitrary ∷ Gen (Header (ShelleyBlock (TPraos crypto) era)) Source #

shrink ∷ Header (ShelleyBlock (TPraos crypto) era) → [Header (ShelleyBlock (TPraos crypto) era)] Source #

CanMock proto era ⇒ Arbitrary (AnnTip (ShelleyBlock proto era)) Source # 
Instance details

Methods

arbitrary ∷ Gen (AnnTip (ShelleyBlock proto era)) Source #

shrink ∷ AnnTip (ShelleyBlock proto era) → [AnnTip (ShelleyBlock proto era)] Source #

CanMock proto era ⇒ Arbitrary (SomeBlockQuery (BlockQuery (ShelleyBlock proto era))) Source # 
Instance details

Methods

arbitrary ∷ Gen (SomeBlockQuery (BlockQuery (ShelleyBlock proto era))) Source #

shrink ∷ SomeBlockQuery (BlockQuery (ShelleyBlock proto era)) → [SomeBlockQuery (BlockQuery (ShelleyBlock proto era))] Source #

CanMock proto era ⇒ Arbitrary (GenTx (ShelleyBlock proto era)) Source # 
Instance details

Methods

arbitrary ∷ Gen (GenTx (ShelleyBlock proto era)) Source #

shrink ∷ GenTx (ShelleyBlock proto era) → [GenTx (ShelleyBlock proto era)] Source #

CanMock proto era ⇒ Arbitrary (GenTxId (ShelleyBlock proto era)) Source # 
Instance details

Methods

arbitrary ∷ Gen (GenTxId (ShelleyBlock proto era)) Source #

shrink ∷ GenTxId (ShelleyBlock proto era) → [GenTxId (ShelleyBlock proto era)] Source #

Arbitrary (TranslationContext era) ⇒ Arbitrary (ShelleyLedgerConfig era) Source #

Generate a ShelleyLedgerConfig with a fixed EpochInfo (see arbitraryGlobalsWithFixedEpochInfo).

Instance details

Methods

arbitrary ∷ Gen (ShelleyLedgerConfig era) Source #

shrink ∷ ShelleyLedgerConfig era → [ShelleyLedgerConfig era] Source #

CanMock (Praos crypto) era ⇒ Arbitrary (Coherent (ShelleyBlock (Praos crypto) era)) Source #

Create a coherent Praos block

TODO Establish a coherent block without doing this translation from a TPraos header.

Instance details

Methods

arbitrary ∷ Gen (Coherent (ShelleyBlock (Praos crypto) era)) Source #

shrink ∷ Coherent (ShelleyBlock (Praos crypto) era) → [Coherent (ShelleyBlock (Praos crypto) era)] Source #

CanMock (TPraos crypto) era ⇒ Arbitrary (Coherent (ShelleyBlock (TPraos crypto) era)) Source #

This uses a different upstream generator to ensure the header and block body relate as expected.

Instance details

Methods

arbitrary ∷ Gen (Coherent (ShelleyBlock (TPraos crypto) era)) Source #

shrink ∷ Coherent (ShelleyBlock (TPraos crypto) era) → [Coherent (ShelleyBlock (TPraos crypto) era)] Source #

(Arbitrary (InstantStake era), CanMock proto era) ⇒ Arbitrary (SomeResult (ShelleyBlock proto era)) Source # 
Instance details

Methods

arbitrary ∷ Gen (SomeResult (ShelleyBlock proto era)) Source #

shrink ∷ SomeResult (ShelleyBlock proto era) → [SomeResult (ShelleyBlock proto era)] Source #

(Arbitrary (InstantStake era), CanMock proto era) ⇒ Arbitrary (LedgerState (ShelleyBlock proto era) EmptyMK) Source # 
Instance details

Methods

arbitrary ∷ Gen (LedgerState (ShelleyBlock proto era) EmptyMK) Source #

shrink ∷ LedgerState (ShelleyBlock proto era) EmptyMK → [LedgerState (ShelleyBlock proto era) EmptyMK] Source #

(Arbitrary (InstantStake era), CanMock proto era) ⇒ Arbitrary (LedgerState (ShelleyBlock proto era) ValuesMK) Source # 
Instance details

Methods

arbitrary ∷ Gen (LedgerState (ShelleyBlock proto era) ValuesMK) Source #

shrink ∷ LedgerState (ShelleyBlock proto era) ValuesMK → [LedgerState (ShelleyBlock proto era) ValuesMK] Source #

(PraosCrypto crypto, CanMock (Praos crypto) era) ⇒ Arbitrary (ShelleyBlock (Praos crypto) era) Source # 
Instance details

Methods

arbitrary ∷ Gen (ShelleyBlock (Praos crypto) era) Source #

shrink ∷ ShelleyBlock (Praos crypto) era → [ShelleyBlock (Praos crypto) era] Source #

CanMock (TPraos crypto) era ⇒ Arbitrary (ShelleyBlock (TPraos crypto) era) Source #

The upstream Arbitrary instance for Shelley blocks does not generate coherent blocks, so neither does this.

Instance details

Methods

arbitrary ∷ Gen (ShelleyBlock (TPraos crypto) era) Source #

shrink ∷ ShelleyBlock (TPraos crypto) era → [ShelleyBlock (TPraos crypto) era] Source #

CanMock proto era ⇒ Arbitrary (ShelleyTip proto era) Source # 
Instance details

Methods

arbitrary ∷ Gen (ShelleyTip proto era) Source #

shrink ∷ ShelleyTip proto era → [ShelleyTip proto era] Source #

CanMock proto era ⇒ Arbitrary (WithVersion ShelleyNodeToClientVersion (SomeBlockQuery (BlockQuery (ShelleyBlock proto era)))) Source # 
Instance details

Methods

arbitrary ∷ Gen (WithVersion ShelleyNodeToClientVersion (SomeBlockQuery (BlockQuery (ShelleyBlock proto era)))) Source #

shrink ∷ WithVersion ShelleyNodeToClientVersion (SomeBlockQuery (BlockQuery (ShelleyBlock proto era))) → [WithVersion ShelleyNodeToClientVersion (SomeBlockQuery (BlockQuery (ShelleyBlock proto era)))] Source #

CanMock proto era ⇒ Arbitrary (Point (ShelleyBlock proto era)) Source # 
Instance details

Methods

arbitrary ∷ Gen (Point (ShelleyBlock proto era)) Source #

shrink ∷ Point (ShelleyBlock proto era) → [Point (ShelleyBlock proto era)] Source #

ShelleyBasedEra era ⇒ Arbitrary (SomeSecond (NestedCtxt f) (ShelleyBlock proto era)) Source # 
Instance details

Methods

arbitrary ∷ Gen (SomeSecond (NestedCtxt f) (ShelleyBlock proto era)) Source #

shrink ∷ SomeSecond (NestedCtxt f) (ShelleyBlock proto era) → [SomeSecond (NestedCtxt f) (ShelleyBlock proto era)] Source #