hydra-cluster-0.19.0: Integration test suite using a local cluster of cardano and hydra nodes
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Cluster.Scenarios

Synopsis

Documentation

data EndToEndLog Source #

Instances

Instances details
FromJSON EndToEndLog Source # 
Instance details

Defined in Hydra.Cluster.Scenarios

Methods

parseJSON :: Value -> Parser EndToEndLog

parseJSONList :: Value -> Parser [EndToEndLog]

omittedField :: Maybe EndToEndLog

ToJSON EndToEndLog Source # 
Instance details

Defined in Hydra.Cluster.Scenarios

Methods

toJSON :: EndToEndLog -> Value

toEncoding :: EndToEndLog -> Encoding

toJSONList :: [EndToEndLog] -> Value

toEncodingList :: [EndToEndLog] -> Encoding

omitField :: EndToEndLog -> Bool

Generic EndToEndLog Source # 
Instance details

Defined in Hydra.Cluster.Scenarios

Associated Types

type Rep EndToEndLog :: Type -> Type Source #

Show EndToEndLog Source # 
Instance details

Defined in Hydra.Cluster.Scenarios

Eq EndToEndLog Source # 
Instance details

Defined in Hydra.Cluster.Scenarios

type Rep EndToEndLog Source # 
Instance details

Defined in Hydra.Cluster.Scenarios

type Rep EndToEndLog = D1 ('MetaData "EndToEndLog" "Hydra.Cluster.Scenarios" "hydra-cluster-0.19.0-FdS6WpgbrGm8HrOQAHMkj7" 'False) (((C1 ('MetaCons "ClusterOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Options)) :+: C1 ('MetaCons "FromCardanoNode" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NodeLog))) :+: (C1 ('MetaCons "FromFaucet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FaucetLog)) :+: (C1 ('MetaCons "FromHydraNode" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HydraNodeLog)) :+: C1 ('MetaCons "FromMithril" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MithrilLog))))) :+: ((C1 ('MetaCons "StartingFunds" 'PrefixI 'True) (S1 ('MetaSel ('Just "actor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "utxo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTxO)) :+: (C1 ('MetaCons "RefueledFunds" 'PrefixI 'True) (S1 ('MetaSel ('Just "actor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "refuelingAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: S1 ('MetaSel ('Just "utxo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTxO))) :+: C1 ('MetaCons "RemainingFunds" 'PrefixI 'True) (S1 ('MetaSel ('Just "actor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "utxo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTxO)))) :+: (C1 ('MetaCons "PublishedHydraScriptsAt" 'PrefixI 'True) (S1 ('MetaSel ('Just "hydraScriptsTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId)) :+: (C1 ('MetaCons "UsingHydraScriptsAt" 'PrefixI 'True) (S1 ('MetaSel ('Just "hydraScriptsTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId)) :+: C1 ('MetaCons "CreatedKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "keyPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath))))))

restartedNodeCanObserveCommitTx :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

testPreventResumeReconfiguredPeer :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

restartedNodeCanAbort :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

singlePartyHeadFullLifeCycle :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

Step through the full life cycle of a Hydra Head with only a single participant. This scenario is also used by the smoke test run via the `hydra-cluster` executable.

singlePartyOpenAHead Source #

Arguments

:: Tracer IO EndToEndLog 
-> FilePath 
-> RunningNode 
-> TxId 
-> (HydraClient -> SigningKey PaymentKey -> IO ())

Continuation called when the head is open

-> IO () 

Open a Hydra Head with only a single participant but some arbitrary UTxO committed.

singlePartyCommitsFromExternal :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

Single hydra-node where the commit is done using some wallet UTxO.

singlePartyCommitsFromExternalTxBlueprint :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

Single hydra-node where the commit is done from a raw transaction blueprint.

canCloseWithLongContestationPeriod :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

Initialize open and close a head on a real network and ensure contestation period longer than the time horizon is possible. For this it is enough that we can close a head and not wait for the deadline.

canSubmitTransactionThroughAPI :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

threeNodesNoErrorsOnOpen :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

Three hydra nodes open a head and we assert that none of them sees errors. This was particularly misleading when everyone tries to post the collect transaction concurrently.

initWithWrongKeys :: FilePath -> Tracer IO EndToEndLog -> RunningNode -> TxId -> IO () Source #

Two hydra node setup where Alice is wrongly configured to use Carol's cardano keys instead of Bob's which will prevent him to be notified the HeadIsInitializing but he should still receive some notification.

canDecommit :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> TxId -> IO () Source #

Open a a single participant head with some UTxO and incrementally decommit it.

L2 scenarios

respendUTxO :: HydraClient -> SigningKey PaymentKey -> NominalDiffTime -> IO () Source #

Finds UTxO owned by given key in the head and creates transactions respending it to the same address as fast as possible, forever. NOTE: This relies on zero-fee protocol parameters.

Utilities

refuelIfNeeded :: Tracer IO EndToEndLog -> RunningNode -> Actor -> Coin -> IO () Source #

Refuel given Actor with given Lovelace if current marked UTxO is below that amount.

returnFundsToFaucet :: Tracer IO EndToEndLog -> RunningNode -> Actor -> IO () Source #

Return the remaining funds to the faucet

headIsInitializingWith :: Set Party -> Value -> Maybe HeadId Source #

expectErrorStatus Source #

Arguments

:: Int

Expected http status code

-> Maybe ByteString

Optional string expected to be present somewhere in the response body

-> HttpException

Expected exception

-> Bool