Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Hydra.Generator
Contents
Synopsis
- networkId :: NetworkId
- data Dataset = Dataset {
- fundingTransaction :: Tx
- clientDatasets :: [ClientDataset]
- title :: Maybe Text
- description :: Maybe Text
- data ClientKeys = ClientKeys {
- signingKey :: SigningKey PaymentKey
- externalSigningKey :: SigningKey PaymentKey
- data ClientDataset = ClientDataset {
- clientKeys :: ClientKeys
- initialUTxO :: UTxO
- txSequence :: [Tx]
- defaultProtocolParameters :: PParams LedgerEra
- generateConstantUTxODataset :: SigningKey PaymentKey -> Int -> Int -> Gen Dataset
- generateDemoUTxODataset :: NetworkId -> SocketPath -> [ClientKeys] -> Int -> IO Dataset
- thrd :: (a, b, c) -> c
- withInitialUTxO :: SigningKey PaymentKey -> Tx -> UTxO
- genClientFunds :: [ClientKeys] -> Integer -> Gen [(VerificationKey PaymentKey, Coin)]
- generateClientDataset :: NetworkId -> Tx -> ClientKeys -> Int -> (NetworkId -> (UTxO, SigningKey PaymentKey, [Tx]) -> Int -> Gen (UTxO, SigningKey PaymentKey, [Tx])) -> Gen ClientDataset
Documentation
A Dataset
that can be run for testing purpose.
Each Dataset
represents a complete scenario where several ClientDataset
are run concurrently
against one or more HydraNode
s. A dataset can optionally have a title
and description
which will be used to report results.
Constructors
Dataset | |
Fields
|
Instances
Arbitrary Dataset Source # | |
FromJSON Dataset Source # | |
Defined in Hydra.Generator | |
ToJSON Dataset Source # | |
Defined in Hydra.Generator Methods toEncoding :: Dataset -> Encoding toJSONList :: [Dataset] -> Value toEncodingList :: [Dataset] -> Encoding | |
Generic Dataset Source # | |
Show Dataset Source # | |
type Rep Dataset Source # | |
Defined in Hydra.Generator type Rep Dataset = D1 ('MetaData "Dataset" "Hydra.Generator" "hydra-cluster-0.19.0-FdS6WpgbrGm8HrOQAHMkj7" 'False) (C1 ('MetaCons "Dataset" 'PrefixI 'True) ((S1 ('MetaSel ('Just "fundingTransaction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tx) :*: S1 ('MetaSel ('Just "clientDatasets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ClientDataset])) :*: (S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))) |
data ClientKeys Source #
Constructors
ClientKeys | |
Fields
|
Instances
Arbitrary ClientKeys Source # | |
Defined in Hydra.Generator | |
FromJSON ClientKeys Source # | |
Defined in Hydra.Generator | |
ToJSON ClientKeys Source # | |
Defined in Hydra.Generator Methods toJSON :: ClientKeys -> Value toEncoding :: ClientKeys -> Encoding toJSONList :: [ClientKeys] -> Value toEncodingList :: [ClientKeys] -> Encoding omitField :: ClientKeys -> Bool | |
Show ClientKeys Source # | |
Defined in Hydra.Generator |
data ClientDataset Source #
Constructors
ClientDataset | |
Fields
|
Instances
defaultProtocolParameters :: PParams LedgerEra Source #
generateConstantUTxODataset Source #
Arguments
:: SigningKey PaymentKey | Faucet signing key |
-> Int | Number of clients |
-> Int | Number of transactions |
-> Gen Dataset |
Generate Dataset
which does not grow the per-client UTXO set over time.
The sequence of transactions generated consist only of simple payments from
and to arbitrary keys controlled by the individual clients.
generateDemoUTxODataset Source #
Arguments
:: NetworkId | |
-> SocketPath | |
-> [ClientKeys] | Number of clients |
-> Int | Number of transactions |
-> IO Dataset |
Generate Dataset
which does not grow the per-client UTXO set over time.
This queries the network to fetch the current funds available in the faucet
to be distributed among the peers.
The sequence of transactions generated consist only of simple self payments.
Helpers
withInitialUTxO :: SigningKey PaymentKey -> Tx -> UTxO Source #
genClientFunds :: [ClientKeys] -> Integer -> Gen [(VerificationKey PaymentKey, Coin)] Source #
generateClientDataset :: NetworkId -> Tx -> ClientKeys -> Int -> (NetworkId -> (UTxO, SigningKey PaymentKey, [Tx]) -> Int -> Gen (UTxO, SigningKey PaymentKey, [Tx])) -> Gen ClientDataset Source #