Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hydra.Chain.Direct.Contract.Contest
Synopsis
- healthyContestTx :: (Tx, UTxO)
- healthyClosedHeadTxIn :: TxIn
- healthyClosedHeadTxOut :: TxOut CtxUTxO
- healthyContestSnapshot :: Snapshot Tx
- healthyContestSnapshotNumber :: SnapshotNumber
- healthyContestUTxO :: UTxO
- healthyContestUTxOHash :: BuiltinByteString
- healthyClosedState :: State
- healthySlotNo :: SlotNo
- healthyContestationDeadline :: UTCTime
- healthyOnChainContestationPeriod :: ContestationPeriod
- healthyContestationPeriod :: ContestationPeriod
- healthyContestationPeriodSeconds :: Integer
- healthyClosedSnapshotNumber :: SnapshotNumber
- healthyClosedUTxOHash :: BuiltinByteString
- healthyClosedUTxO :: UTxO
- healthyContesterVerificationKey :: VerificationKey PaymentKey
- healthySigningKeys :: [SigningKey HydraKey]
- healthyParties :: [Party]
- healthyOnChainParties :: [Party]
- healthySignature :: SnapshotNumber -> MultiSignature (Snapshot Tx)
- data ContestMutation
- = NotContinueContract
- | MutateSignatureButNotSnapshotNumber
- | MutateSnapshotNumberButNotSignature
- | MutateToNonNewerSnapshot
- | MutateRequiredSigner
- | MutateNoRequiredSigner
- | MutateMultipleRequiredSigner
- | MutateContestUTxOHash
- | SnapshotNotSignedByAllParties
- | MutateValidityPastDeadline
- | ContestFromDifferentHead
- | MutateTokenMintingOrBurning
- | MutateInputContesters
- | MutateContesters
- | MutateValueInOutput
- | NotUpdateDeadlineAlthoughItShould
- | PushDeadlineAlthoughItShouldNot
- | MutateOutputContestationPeriod
- | MutatePartiesInOutput
- | MutateHeadIdInOutput
- genContestMutation :: (Tx, UTxO) -> Gen SomeMutation
Documentation
healthyContestTx :: (Tx, UTxO) Source #
Healthy contest tx where the contester is the first one to contest and correctly pushing out the deadline by the contestation period.
healthyClosedHeadTxIn :: TxIn Source #
healthyClosedHeadTxOut :: TxOut CtxUTxO Source #
healthyContestSnapshot :: Snapshot Tx Source #
healthyContestSnapshotNumber :: SnapshotNumber Source #
healthyContestUTxO :: UTxO Source #
healthyContestUTxOHash :: BuiltinByteString Source #
healthyClosedState :: State Source #
healthySlotNo :: SlotNo Source #
healthyContestationDeadline :: UTCTime Source #
healthyOnChainContestationPeriod :: ContestationPeriod Source #
healthyContestationPeriod :: ContestationPeriod Source #
healthyClosedSnapshotNumber :: SnapshotNumber Source #
healthyClosedUTxOHash :: BuiltinByteString Source #
healthyClosedUTxO :: UTxO Source #
healthyContesterVerificationKey :: VerificationKey PaymentKey Source #
healthySigningKeys :: [SigningKey HydraKey] Source #
healthyParties :: [Party] Source #
healthyOnChainParties :: [Party] Source #
healthySignature :: SnapshotNumber -> MultiSignature (Snapshot Tx) Source #
data ContestMutation Source #
Constructors
NotContinueContract | Ensures collectCom does not allow any output address but νHead. |
MutateSignatureButNotSnapshotNumber | Invalidates the tx by changing the redeemer signature but not the snapshot number in resulting head output. Ensures the snapshot signature is multisigned by all valid Head participants. |
MutateSnapshotNumberButNotSignature | Invalidates the tx by changing the snapshot number in resulting head output but not the redeemer signature. Ensures the snapshot signature is aligned with snapshot number. |
MutateToNonNewerSnapshot | Invalidates the tx by changing the contest snapshot number too old. This is achieved by updating the head input datum to be older, so the healthy snapshot number becomes too old. |
MutateRequiredSigner | Ensures close is authenticated by one of the Head members by changing the signer used on the tx to be not one of PTs. |
MutateNoRequiredSigner | Ensures close is authenticated by one of the Head members by changing the signer used on the tx to be empty. |
MutateMultipleRequiredSigner | Ensures close is authenticated by one of the Head members by changing the signer used on the tx to have multiple signers (including the signer to not fail for SignerIsNotAParticipant). |
MutateContestUTxOHash | Invalidates the tx by changing the utxo hash in resulting head output. Ensures the output state is consistent with the redeemer. |
SnapshotNotSignedByAllParties | Ensures the contest snapshot is multisigned by all Head participants by changing the parties in the input head datum. If they do not align the multisignature will not be valid anymore. |
MutateValidityPastDeadline | Invalidates the tx by changing the upper bound to be beyond contestation deadline from head input (stored state). |
ContestFromDifferentHead | Change the head policy id to simulate contestation using a ST and signer from a different head. The signer shows a correct signature but from a different head. This will cause the signer to not be present in the participation tokens. |
MutateTokenMintingOrBurning | Minting or burning of tokens should not be possible in contest. |
MutateInputContesters | Ensures a participant can only contest once by changing the head input datum to already include the signer. |
MutateContesters | Ensures a the signer needs to be added to the head output datum. |
MutateValueInOutput | Invalidates the tx by changing the output values arbitrarily to be different (not preserved) from the head. Ensures values are preserved between head input and output. |
NotUpdateDeadlineAlthoughItShould | Not pushing the contestation deadline in head output datum should not be allowed. |
PushDeadlineAlthoughItShouldNot | Pushes the deadline although this is the last contest. Instead of
creating another healthy case and mutate that one, this mutation just
changes the starting situation so that everyone else already contested.
Remember the |
MutateOutputContestationPeriod | Ensures contestation period does not change between head input datum and head output datum. |
MutatePartiesInOutput | Ensures parties do not change between head input datum and head output datum. |
MutateHeadIdInOutput | Ensures headId do not change between head input datum and head output datum. |
Instances
genContestMutation :: (Tx, UTxO) -> Gen SomeMutation Source #