Skip to main content

Test Results for hydra-node

Hydra.Utils

  • Should throw if it can't write on disk
  • Should throw if the file already exists

Hydra.Persistence

PersistenceIncremental

  • can handle empty files

  • is consistent after multiple append calls in presence of new-lines

    Details
    +++ OK, passed 400 tests:
    72.0% some item contains a new line
    5.0% no items stored
  • it cannot load from a different thread once having started appending

    Details
    +++ OK, passed 100 tests.

Persistence

  • can handle empty files

  • is consistent after save/load roundtrip

    Details
    +++ OK, passed 100 tests.

Hydra.Party

Ord

  • is transitive

    Details
    +++ OK, passed 100 tests; 493 discarded.
  • is reflexive

    Details
    +++ OK, passed 100 tests.
  • is antisymmetric

    Details
    +++ OK, passed 100 tests.
  • implements Eq and Ord correspondingly

    Details
    +++ OK, passed 100 tests.

JSON encoding of Party

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/Party.json

  • has alice, bob, carol sorted

Hydra.Options

Hydra Node RunOptions

  • validateRunOptions: using more than 5 parties should error out

  • validateRunOptions: loaded cardano keys needs to match with the hydra keys length

  • parses with default values

  • parses --host option given valid IPv4 and IPv6 addresses

  • parses --port option given valid port number

  • parses --peer <host>:<port> option

  • does parse --peer given ipv6 addresses

  • parses --monitoring-port option given valid port number

  • flag --version returns version with base version from cabal

  • parses --hydra-verification-key option as a filepath

  • parses --hydra-signing-key option as a filepath

  • parses --testnet-magic option as a number

  • parses --mainnet option

  • parses --contestation-period option as a number of seconds

  • parses --mainnet flag

  • parses --node-socket as a filepath

  • parses --cardano-signing-key option as a filepath

  • parses --cardano-verification-key option as a filepath

  • parses --ledger-protocol-parameters-file as a filepath

  • parses --start-chain-from as a pair of slot number and block header hash

  • parses --start-chain-from 0 as starting from genesis

  • parses --hydra-scripts-tx-id as a tx id

    Details
    +++ OK, passed 100 tests.
  • switches to offline chain when using --initial-utxo

JSON encoding of RunOptions

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/RunOptions.json

gen-hydra-keys sub-command

  • should be able to parse gen-hydra-keys sub-command
  • should parse gen-hydra-keys without the output-file flag using default file name

offline sub-command

  • does parse with defaults
  • does parse --ledger-genesis
  • does parse --initial-utxo

publish-scripts sub-command

  • does not parse without any options

  • does not parse with some missing option (1)

  • does not parse with some missing option (2)

  • does not parse with some missing option (3)

  • should parse using testnet and all options

  • should parse using mainnet and all options

  • roundtrip parsing & printing

    Details
    +++ OK, passed 100 tests.

Hydra.Node.Run

  • throws exception given options are invalid

Hydra.Node.EventQueue

  • adds sequential id to all events enqueued

    Details
    +++ OK, passed 100 tests.

Hydra.Node

  • emits a single ReqSn and AckSn as leader, even after multiple ReqTxs
  • rotates snapshot leaders
  • processes out-of-order AckSn
  • notifies client when postTx throws PostTxError
  • signs snapshot even if it has seen conflicting transactions
  • can continue after restart via persisted state

Configuration mismatch

  • accepts configuration consistent with HeadState
  • throws exception given contestation period differs
  • throws exception given parties differ
  • log error given configuration mismatches head state

Hydra.Network.Reliability

sending messages

  • broadcast messages to the network assigning a sequential id

    Details
    +++ OK, passed 100 tests.
  • stress test networking layer

    Details
    +++ OK, passed 5000 tests.

    Messages from Alice to Bob (5000 in total):
    33.30% < 10
    18.38% < 20
    13.48% < 30
    10.86% < 40
    8.24% < 50
    5.84% < 60
    4.84% < 70
    2.98% < 80
    1.46% < 90
    0.62% < 100

    Messages from Bob to Alice (5000 in total):
    31.92% < 10
    19.40% < 20
    13.34% < 30
    10.32% < 40
    7.74% < 50
    6.44% < 60
    5.16% < 70
    3.34% < 80
    1.76% < 90
    0.58% < 100
  • broadcast updates counter from peers

  • appends messages to disk and can load them back

receiving messages

  • forward received messages

  • do not drop messages with same ids from different peers

  • Ignores messages with malformed acks

  • drops already received messages

    Details
    +++ OK, passed 100 tests:
    58% 0
    32% 1
    10% 2

Hydra.Network.Heartbeat

  • sends a heartbeat message with local host after 500 ms
  • sends Connected when Ping received from other peer
  • sends Connected when any message received from other party
  • do not send Connected on subsequent messages from already Connected party
  • sends Disconnected given no messages has been received from known party within twice heartbeat delay
  • stop sending heartbeat message given action sends a message
  • restart sending heartbeat messages given last message sent is older than heartbeat delay

Hydra.Network.Authenticate

  • pass the authenticated messages around
  • drop message coming from unknown party
  • drop message coming from party with wrong signature
  • authenticate the message to broadcast
  • logs dropped messages

Serialization

  • can roundtrip CBOR encoding/decoding of Signed Hydra Message

    Details
    +++ OK, passed 100 tests.

JSON encoding of AuthLog

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/AuthLog.json

Hydra.Network

configureMessagePersistence

  • throws ParameterMismatch when configuring given number of acks does not match number of parties

Serialisation

  • can roundtrip CBOR encoding/decoding of Hydra Message

    Details
    +++ OK, passed 100 tests.

JSON encoding of (Message SimpleTx)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/Message SimpleTx.json

Ouroboros Network

  • broadcasts messages to single connected peer
  • broadcasts messages between 3 connected peers

Hydra.Model.MockChain

  • works with valid transaction

    Details
    +++ OK, passed 100 tests.

Hydra.Model

  • model should not generate 0 Ada UTxO

    Details
    +++ OK, passed 10000 tests.
  • model generates consistent traces

    Details
    +++ OK, passed 10000 tests.
  • implementation respects model

    Details
    +++ OK, passed 100 tests.

    Action polarity (1721 in total):
    100.00% +

    Actions (1721 in total):
    77.80% +NewTx
    9.70% +Commit
    5.52% +Seed
    5.17% +Init
    1.80% +Abort

    Transitions (1721 in total):
    77.80% Open -> Open
    6.74% Initial -> Initial
    5.52% Start -> Idle
    5.17% Idle -> Initial
    2.96% Initial -> Open
    1.80% Initial -> Final
  • check conflict-free liveness

    Details
    +++ OK, passed 100 tests.

    Action polarity (1557 in total):
    100.00% +

    Actions (1557 in total):
    65.64% +NewTx
    9.12% +Commit
    6.42% +StopTheWorld
    5.72% +Seed
    5.39% +Init
    2.83% +ObserveConfirmedTx
    2.83% +Wait
    2.06% +Abort

    Transitions (1557 in total):
    74.12% Open -> Open
    6.81% Initial -> Initial
    5.72% Start -> Idle
    5.39% Idle -> Initial
    2.83% Initial -> Open
    2.06% Final -> Final
    2.06% Initial -> Final
    0.71% Start -> Start
    0.32% Idle -> Idle
  • check head opens if all participants commit

    Details
    +++ OK, passed 100 tests.

    Action polarity (708 in total):
    100.0% +

    Actions (708 in total):
    43.5% +Commit
    14.1% +Init
    14.1% +ObserveHeadIsOpen
    14.1% +Seed
    14.1% +Wait

    Transitions (708 in total):
    29.4% Initial -> Initial
    28.2% Open -> Open
    14.1% Idle -> Initial
    14.1% Initial -> Open
    14.1% Start -> Idle

Hydra.Logging.Monitoring

  • provides prometheus metrics from traces

Hydra.Logging

  • dumps logs to stdout in JSON with timestamp

  • Validates logs.yaml schema

    Details
    +++ OK, passed 1 test.
  • Schema covers all defined log entries

    Details
    +++ OK, passed 100 tests.

Hydra.Ledger.Simple

  • validates only correctly built transactions

    Details
    +++ OK, passed 100 tests.

Hydra.Ledger.Cardano.Time

  • roundtrip slotNoToUTCTime and slotNoFromUTCTime

    Details
    +++ OK, passed 100 tests.
  • slotNoFromUTCTime works for any time

    Details
    +++ OK, passed 100 tests:
    54% after system start
    44% before system start
    2% equal to system start

Hydra.Ledger.Cardano

Generators

  • arbitrary @TxIn is reasonably collision resistant

    Details
    +++ OK, passed 100000 tests.
  • arbitrary @TxId is reasonably collision resistant

    Details
    +++ OK, passed 100000 tests.
  • arbitrary @(VerificationKey PaymentKey) is reasonably collision resistant

    Details
    +++ OK, passed 100000 tests.
  • arbitrary @(Hash PaymentKey) is reasonably collision resistant

    Details
    +++ OK, passed 100000 tests.
  • genUTxOAlonzo does not generate collapsing values

    Details
    +++ OK, passed 100 tests.
  • genUTxOAdaOnlyOfSize does not generate collapsing values

    Details
    +++ OK, passed 100 tests.
  • genUTxOFor is reasonably collision resistant

    Details
    +++ OK, passed 100000 tests.
  • genOneUTxOFor is reasonably collision resistant

    Details
    +++ OK, passed 100000 tests.

genValue

  • produces realistic values

    Details
    +++ OK, passed 100 tests.

genTxOut

  • does generate good values

    Details
    +++ OK, passed 100 tests:
    67% has datum
    56% is Script output
    50% has multiple assets
    50% has only ADA
    44% is VK output

applyTransactions

  • works with valid transaction

    Details
    +++ OK, passed 100 tests.
  • works with valid transaction deserialised from JSON

    Details
    +++ OK, passed 100 tests.

Tx

JSON encoding of (Tx BabbageEra)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/Tx BabbageEra.json

  • Same TxId before/after JSON encoding

    Details
    +++ OK, passed 100 tests.
  • Roundtrip to and from Ledger

    Details
    +++ OK, passed 100 tests.
  • Roundtrip CBOR encoding

    Details
    +++ OK, passed 100 tests.
  • JSON encoding of Tx according to schema

    Details
    +++ OK, passed 1 test.
  • parses a specific Tx

PParams

  • Same PParams before/after JSON encoding

    Details
    +++ OK, failed as expected. Falsified (after 1 test):
    PParams (BabbagePParams {bppMinFeeA = Coin 472841, bppMinFeeB = Coin 778828, bppMaxBBSize = 0, bppMaxTxSize = 0, bppMaxBHSize = 0, bppKeyDeposit = Coin 687935, bppPoolDeposit = Coin 331859, bppEMax = EpochNo 0, bppNOpt = 0, bppA0 = 662161633391547741 % 2000000000000000000, bppRho = 1925941 % 5000000, bppTau = 50348590365507543 % 62500000000000000, bppProtocolVersion = ProtVer {pvMajor = Version 0, pvMinor = 0}, bppMinPoolCost = Coin 695323, bppCoinsPerUTxOByte = Coin 245484, bppCostModels = CostModels {costModelsValid = fromList [(PlutusV1,CostModel PlutusV1 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV2,CostModel PlutusV2 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV3,CostModel PlutusV3 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])], costModelsErrors = fromList [], costModelsUnknown = fromList []}, bppPrices = Prices {prMem = 3101347618082075527 % 1000000000000000000, prSteps = 1282397877911364901 % 25000000000000000}, bppMaxTxExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 8025592446962359069, exUnitsSteps' = 8379958082522784540}}, bppMaxBlockExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 7526344648912045987, exUnitsSteps' = 6644065682513516137}}, bppMaxValSize = 0, bppCollateralPercentage = 0, bppMaxCollateralInputs = 0})
    before: PParams (BabbagePParams {bppMinFeeA = Coin 472841, bppMinFeeB = Coin 778828, bppMaxBBSize = 0, bppMaxTxSize = 0, bppMaxBHSize = 0, bppKeyDeposit = Coin 687935, bppPoolDeposit = Coin 331859, bppEMax = EpochNo 0, bppNOpt = 0, bppA0 = 662161633391547741 % 2000000000000000000, bppRho = 1925941 % 5000000, bppTau = 50348590365507543 % 62500000000000000, bppProtocolVersion = ProtVer {pvMajor = Version 0, pvMinor = 0}, bppMinPoolCost = Coin 695323, bppCoinsPerUTxOByte = Coin 245484, bppCostModels = CostModels {costModelsValid = fromList [(PlutusV1,CostModel PlutusV1 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV2,CostModel PlutusV2 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV3,CostModel PlutusV3 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])], costModelsErrors = fromList [], costModelsUnknown = fromList []}, bppPrices = Prices {prMem = 3101347618082075527 % 1000000000000000000, prSteps = 1282397877911364901 % 25000000000000000}, bppMaxTxExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 8025592446962359069, exUnitsSteps' = 8379958082522784540}}, bppMaxBlockExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 7526344648912045987, exUnitsSteps' = 6644065682513516137}}, bppMaxValSize = 0, bppCollateralPercentage = 0, bppMaxCollateralInputs = 0})
    after: PParams (BabbagePParams {bppMinFeeA = Coin 472841, bppMinFeeB = Coin 778828, bppMaxBBSize = 0, bppMaxTxSize = 0, bppMaxBHSize = 0, bppKeyDeposit = Coin 687935, bppPoolDeposit = Coin 331859, bppEMax = EpochNo 0, bppNOpt = 0, bppA0 = 662161633391547741 % 2000000000000000000, bppRho = 1925941 % 5000000, bppTau = 50348590365507543 % 62500000000000000, bppProtocolVersion = ProtVer {pvMajor = Version 7, pvMinor = 0}, bppMinPoolCost = Coin 695323, bppCoinsPerUTxOByte = Coin 245484, bppCostModels = CostModels {costModelsValid = fromList [(PlutusV1,CostModel PlutusV1 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV2,CostModel PlutusV2 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV3,CostModel PlutusV3 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])], costModelsErrors = fromList [], costModelsUnknown = fromList []}, bppPrices = Prices {prMem = 3101347618082075527 % 1000000000000000000, prSteps = 1282397877911364901 % 25000000000000000}, bppMaxTxExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 8025592446962359069, exUnitsSteps' = 8379958082522784540}}, bppMaxBlockExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 7526344648912045987, exUnitsSteps' = 6644065682513516137}}, bppMaxValSize = 0, bppCollateralPercentage = 0, bppMaxCollateralInputs = 0})
    PParams (BabbagePParams {bppMinFeeA = Coin 472841, bppMinFeeB = Coin 778828, bppMaxBBSize = 0, bppMaxTxSize = 0, bppMaxBHSize = 0, bppKeyDeposit = Coin 687935, bppPoolDeposit = Coin 331859, bppEMax = EpochNo 0, bppNOpt = 0, bppA0 = 662161633391547741 % 2000000000000000000, bppRho = 1925941 % 5000000, bppTau = 50348590365507543 % 62500000000000000, bppProtocolVersion = ProtVer {pvMajor = Version 0, pvMinor = 0}, bppMinPoolCost = Coin 695323, bppCoinsPerUTxOByte = Coin 245484, bppCostModels = CostModels {costModelsValid = fromList [(PlutusV1,CostModel PlutusV1 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV2,CostModel PlutusV2 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV3,CostModel PlutusV3 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])], costModelsErrors = fromList [], costModelsUnknown = fromList []}, bppPrices = Prices {prMem = 3101347618082075527 % 1000000000000000000, prSteps = 1282397877911364901 % 25000000000000000}, bppMaxTxExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 8025592446962359069, exUnitsSteps' = 8379958082522784540}}, bppMaxBlockExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 7526344648912045987, exUnitsSteps' = 6644065682513516137}}, bppMaxValSize = 0, bppCollateralPercentage = 0, bppMaxCollateralInputs = 0}) /= PParams (BabbagePParams {bppMinFeeA = Coin 472841, bppMinFeeB = Coin 778828, bppMaxBBSize = 0, bppMaxTxSize = 0, bppMaxBHSize = 0, bppKeyDeposit = Coin 687935, bppPoolDeposit = Coin 331859, bppEMax = EpochNo 0, bppNOpt = 0, bppA0 = 662161633391547741 % 2000000000000000000, bppRho = 1925941 % 5000000, bppTau = 50348590365507543 % 62500000000000000, bppProtocolVersion = ProtVer {pvMajor = Version 7, pvMinor = 0}, bppMinPoolCost = Coin 695323, bppCoinsPerUTxOByte = Coin 245484, bppCostModels = CostModels {costModelsValid = fromList [(PlutusV1,CostModel PlutusV1 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV2,CostModel PlutusV2 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),(PlutusV3,CostModel PlutusV3 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])], costModelsErrors = fromList [], costModelsUnknown = fromList []}, bppPrices = Prices {prMem = 3101347618082075527 % 1000000000000000000, prSteps = 1282397877911364901 % 25000000000000000}, bppMaxTxExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 8025592446962359069, exUnitsSteps' = 8379958082522784540}}, bppMaxBlockExUnits = WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 7526344648912045987, exUnitsSteps' = 6644065682513516137}}, bppMaxValSize = 0, bppCollateralPercentage = 0, bppMaxCollateralInputs = 0})

UTxO

JSON encoding of (UTxO' (TxOut CtxUTxO BabbageEra))

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/UTxO' (TxOut CtxUTxO BabbageEra).json

  • JSON encoding of UTxO according to schema

    Details
    +++ OK, passed 1 test.
  • parses a specific UTxO

JSON encoding of AssetName

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/AssetName.json

Hydra.JSONSchema

prop_validateJSONSchema

  • works with api.yaml and UTCTime

    Details
    +++ OK, passed 1 test.

validateJSON withJsonSpecifications

  • works using identity selector and Null input
  • fails on non-existing schema file
  • fails with missing tool
  • selects a sub-schema correctly
  • produces helpful errors
  • resolves refs

Hydra.HeadLogicSnapshot

On AckSn

  • sends ReqSn when leader and there are seen transactions
  • does NOT send ReqSn when we are the leader but there are NO seen transactions
  • does NOT send ReqSn when we are NOT the leader but there are seen transactions
  • updates seenSnapshot state when sending ReqSn

On ReqTx

  • always emit ReqSn given head has 1 member

    Details
    +++ OK, passed 100 tests.
  • sends ReqSn when leader and no snapshot in flight

  • does NOT send ReqSn when we are NOT the leader even if no snapshot in flight

  • does NOT send ReqSn when we are the leader but snapshot in flight

  • updates seenSnapshot state when sending ReqSn

Generic Snapshot property

  • there's always a leader for every snapshot number

    Details
    +++ OK, passed 100 tests; 17 discarded.

Hydra.HeadLogic

Coordinated Head Protocol using real Tx

  • any tx with expiring upper validity range gets pruned

    Details
    +++ OK, passed 100 tests.

Coordinated Head Protocol

  • reports if a requested tx is expired
  • waits if a requested tx is not (yet) applicable
  • confirms snapshot given it receives AckSn from all parties

Tracks Transaction Ids

  • keeps transactions in allTxs given it receives a ReqTx

  • removes transactions in allTxs given it receives a ReqSn

  • removes transactions from allTxs when included in a acked snapshot even when emitting a ReqSn

  • rejects last AckSn if one signature was from a different snapshot

  • rejects last AckSn if one signature was from a different key

  • rejects last AckSn if one signature was from a completely different message

  • rejects last AckSn if already received signature from this party

  • waits if we receive a snapshot with transaction not applicable on previous snapshot

  • waits if we receive a snapshot with unseen transactions

  • waits if we receive an AckSn for an unseen snapshot

  • rejects if we receive a too far future snapshot

  • waits if we receive a future snapshot while collecting signatures

  • acks signed snapshot from the constant leader

  • does not ack snapshots from non-leaders

  • rejects too-old snapshots

  • rejects too-old snapshots when collecting signatures

  • rejects too-new snapshots from the leader

  • rejects overlapping snapshot requests from the leader

  • ignores in-flight ReqTx when closed

  • everyone does collect on last commit after collect com

  • cannot observe abort after collect com

  • cannot observe collect com after abort

  • notifies user on head closing and when passing the contestation deadline

  • contests when detecting close with old snapshot

  • re-contests when detecting contest with old snapshot

  • ignores unrelated initTx

    Details
    +++ OK, passed 100 tests.
  • ignores abortTx of another head

    Details
    +++ OK, passed 100 tests.
  • ignores collectComTx of another head

    Details
    +++ OK, passed 100 tests.
  • ignores closeTx of another head

    Details
    +++ OK, passed 100 tests.
  • ignores contestTx of another head

    Details
    +++ OK, passed 100 tests.
  • ignores fanoutTx of another head

    Details
    +++ OK, passed 100 tests.

Types

JSON encoding of (HeadState SimpleTx)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/HeadState SimpleTx.json

JSON encoding of (Event SimpleTx)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/Event SimpleTx.json

Hydra.FireForget

  • client can send 'Hail Hydra!' to server

Hydra.Crypto

MultiSignature

  • is sensitive to order

    Details
    +++ OK, passed 100 tests; 56 discarded.
  • aggregate/verifyMultiSignature roundtrip

    Details
    +++ OK, passed 100 tests.
  • aggregateInOrder/verifyMultiSignature roundtrip

    Details
    +++ OK, passed 100 tests; 17 discarded.
  • verifyMultiSignature fails when signature is missing

    Details
    +++ OK, passed 100 tests; 92 discarded.
  • does not validate multisig if less keys given

    Details
    +++ OK, passed 100 tests; 27 discarded (6% empty).

Signature

  • show includes escaped hex

  • can sign arbitrary messages

    Details
    +++ OK, passed 100 tests; 32 discarded.
  • sign/verify roundtrip

    Details
    +++ OK, passed 100 tests.

VerificationKey

  • show includes escaped hex

JSON encoding of (VerificationKey HydraKey)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/VerificationKey HydraKey.json

SigningKey

  • show includes escaped hex

  • can be generated when seed exceeds the max seed size for algorithm

  • can be generated

    Details
    +++ OK, passed 100 tests; 34 discarded.
  • arbitrary @(SigningKey HydraKey) is reasonably collision resistant

    Details
    +++ OK, passed 100000 tests.

Hydra.ContestationPeriod

fromNominalDiffTime

  • works for diff times > 0

    Details
    +++ OK, passed 100 tests.
  • fails for diff times <= 0

    Details
    +++ OK, passed 100 tests.
  • rounds to 1 second

    Details
    +++ OK, passed 100 tests.

Hydra.Chain.Direct.Wallet

newTinyWallet

  • initialises wallet by querying UTxO

    Details
    +++ OK, passed 100 tests.
  • re-queries UTxO from the tip, even on reset

    Details
    +++ OK, passed 100 tests.

coverFee

  • sets min utxo values

    Details
    +++ OK, passed 100 tests.
  • balances transaction with fees

    Details
    +++ OK, passed 100 tests.
  • prefers largest utxo

    Details
    +++ OK, passed 100 tests.

applyTxs

  • only reduces the UTXO set when no address is ours

    Details
    +++ OK, passed 100 tests.
  • Seen inputs are consumed and not in the resulting UTXO

    Details
    +++ OK, passed 100 tests.

genTxsSpending / genUTxO

  • are well-suited for testing

    Details
    +++ OK, passed 100 tests:
    43% has dependent txs
    26% has no tx that are ours

Hydra.Chain.Direct.Tx

collectComTx

  • cover fee correctly handles redeemers

    Details
    +++ OK, passed 60 tests:
    97% Script(s) execution failed
    3% No fuel UTxO found

observeHeadTx

  • All valid transitions for all possible states can be observed.

    Details
    +++ OK, passed 100 tests.

    ChainTransition (100 in total):
    16% Collect
    15% Abort
    15% Commit
    15% Init
    13% Close
    13% Contest
    13% Fanout

HeadId (cardano)

  • headIdToPolicyId . mkHeadId === id

    Details
    +++ OK, passed 100 tests.

HeadSeed (cardano)

  • headSeedToTxIn . txInToHeadSeed === id

    Details
    +++ OK, passed 100 tests.

Hydra.Chain.Direct.TimeHandle

  • can roundtrip currentPointInTime

    Details
    +++ OK, passed 100 tests.
  • should convert slot within latest/current era

Hydra.Chain.Direct.State

acceptance

  • can close & fanout every collected head

    Details
    +++ OK, passed 100 tests:
    51% collect failed already
    49% collect, close and fanout passed

fanout

  • transaction size is below 16kB

    Details
    +++ OK, passed 100 tests:
    51% Fanout size: 40-58
    32% Fanout size: 10-40
    17% Fanout size: 1-10

    40% 5kB
    37% 4kB
    23% 6kB
  • validates within maxTxExecutionUnits

    Details
    +++ OK, passed 100 tests:
    51% Fanout size: 40-58
    32% Fanout size: 10-40
    17% Fanout size: 1-10

contest

  • transaction size is below 16kB

    Details
    +++ OK, passed 100 tests (100% 1kB).

    Close point (slot) (100 in total):
    100% > 0

    Contestation period (100 in total):
    19% > k blocks
    17% one week
    16% one month
    14% k blocks on mainnet
    13% one year
    11% < k blocks
    10% one day
  • validates within maxTxExecutionUnits

    Details
    +++ OK, passed 100 tests.

    Close point (slot) (100 in total):
    100% > 0

    Contestation period (100 in total):
    19% > k blocks
    17% one week
    16% one month
    14% k blocks on mainnet
    13% one year
    11% < k blocks
    10% one day

close

  • transaction size is below 16kB

    Details
    +++ OK, passed 100 tests:
    88% ConfirmedSnapshot
    12% InitialSnapshot

    88% 1kB
    12% 0kB
  • validates within maxTxExecutionUnits

    Details
    +++ OK, passed 100 tests:
    88% ConfirmedSnapshot
    12% InitialSnapshot

collectCom

  • transaction size is below 16kB

    Details
    +++ OK, passed 100 tests (100% 1kB).
  • validates within maxTxExecutionUnits

    Details
    +++ OK, passed 100 tests.

abort

  • transaction size is below 16kB

    Details
    +++ OK, passed 100 tests:
    61% Abort after some (but not all) commits
    23% Abort immediately, after 0 commits
    16% Abort after all commits

    100% 4kB
  • validates within maxTxExecutionUnits

    Details
    +++ OK, passed 100 tests:
    61% Abort after some (but not all) commits
    23% Abort immediately, after 0 commits
    16% Abort after all commits
  • can create valid abort transactions for any observed head

    Details
    +++ OK, passed 100 tests.

commit

  • transaction size is below 16kB

    Details
    +++ OK, passed 100 tests:
    90% Non-empty commit
    10% Empty commit

    100% 0kB
  • validates within maxTxExecutionUnits

    Details
    +++ OK, passed 100 tests:
    90% Non-empty commit
    10% Empty commit
  • only proper head is observed

    Details
    +++ OK, passed 100 tests:
    90% Non-empty commit
    10% Empty commit
  • consumes all inputs that are committed

    Details
    +++ OK, passed 100 tests:
    90% Non-empty commit
    10% Empty commit
  • can only be applied / observed once

    Details
    +++ OK, passed 100 tests:
    90% Non-empty commit
    10% Empty commit
  • reject committing outputs with byron addresses

    Details
    +++ OK, passed 100 tests.
  • reject committing outputs with reference scripts

    Details
    +++ OK, passed 100 tests.
  • reject Commits with more than maxMainnetLovelace Lovelace

    Details
    +++ OK, passed 100 tests.

init

  • transaction size is below 16kB

    Details
    +++ OK, passed 100 tests:
    100% 2+ parties

    82% 4kB
    18% 5kB
  • validates within maxTxExecutionUnits

    Details
    +++ OK, passed 100 tests (100% 2+ parties).
  • only proper head is observed

    Details
    +++ OK, passed 100 tests (100% NotAHeadPolicy).

observeTx

  • All valid transitions for all possible states can be observed.

    Details
    +++ OK, passed 100 tests.

    ChainTransition (100 in total):
    16% Collect
    15% Abort
    15% Commit
    15% Init
    13% Close
    13% Contest
    13% Fanout

Plutus.PubKeyHash

JSON encoding of PubKeyHash

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/PubKeyHash.json

ChainState

JSON encoding of ChainState

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ChainState.json

Hydra.Chain.Direct.ScriptRegistry

  • newScriptRegistry (registryUTxO r) === Just r

    Details
    +++ OK, passed 100 tests.

Hydra.Chain.Direct.Handlers

LocalChainState

  • can resume from chain state

    Details
    +++ OK, passed 100 tests:
    17% Rollback 1 blocks
    17% Rollback 3 blocks
    16% Rollback 4 blocks
    15% Rollback 2 blocks
    14% Rollback 5 blocks
    13% Rollback 6 blocks
    8% Rollback 0 blocks

chainSyncHandler

  • roll forward results in Tick events

    Details
    +++ OK, passed 100 tests.
  • roll forward fails with outdated TimeHandle

    Details
    +++ OK, passed 100 tests.
  • observes transactions onRollForward

    Details
    +++ OK, passed 100 tests:
    18% Commit
    16% Abort
    15% Init
    14% Close
    14% Fanout
    12% Collect
    11% Contest
  • rollbacks state onRollBackward

    Details
    +++ OK, passed 100 tests:
    12% Rollback to: ChainSlot 0 / 2
    12% Rollback to: ChainSlot 0 / 6
    11% Rollback to: ChainSlot 0 / 4
    7% Rollback to: ChainSlot 0 / 3
    6% Rollback to: ChainSlot 3 / 4
    5% Rollback to: ChainSlot 1 / 2
    5% Rollback to: ChainSlot 2 / 2
    5% Rollback to: ChainSlot 3 / 3
    4% Rollback to: ChainSlot 0 / 5
    4% Rollback to: ChainSlot 1 / 3
    4% Rollback to: ChainSlot 4 / 4
    4% Rollback to: ChainSlot 5 / 5
    3% Rollback to: ChainSlot 2 / 3
    3% Rollback to: ChainSlot 2 / 5
    3% Rollback to: ChainSlot 2 / 6
    3% Rollback to: ChainSlot 4 / 5
    2% Rollback to: ChainSlot 2 / 4
    2% Rollback to: ChainSlot 3 / 6
    2% Rollback to: ChainSlot 6 / 6
    1% Rollback to: ChainSlot 1 / 5
    1% Rollback to: ChainSlot 3 / 5
    1% Rollback to: ChainSlot 4 / 6

Hydra.Chain.Direct.Contract

Fanout

  • is healthy

    Details
    +++ OK, passed 1 test.
  • does not survive random adversarial mutations

    Details
    +++ OK, passed 100 tests.

    FanoutMutation (100 in total):
    28% MutateThreadTokenQuantity
    24% MutateAddUnexpectedOutput
    24% MutateChangeOutputValue
    24% MutateValidityBeforeDeadline

Contest

  • is healthy

    Details
    +++ OK, passed 1 test.
  • does not survive random adversarial mutations

    Details
    +++ OK, passed 400 tests.

    ContestMutation (400 in total):
    7.5% MutateToNonNewerSnapshot
    7.0% MutateSnapshotNumberButNotSignature
    6.8% ContestFromDifferentHead
    6.5% MutateValidityPastDeadline
    5.2% MutateContestUTxOHash
    5.2% MutateHeadIdInOutput
    5.2% MutateSignatureButNotSnapshotNumber
    5.2% MutateTokenMintingOrBurning
    5.0% MutateNoRequiredSigner
    5.0% NotUpdateDeadlineAlthoughItShould
    5.0% SnapshotNotSignedByAllParties
    4.8% MutateMultipleRequiredSigner
    4.8% NotContinueContract
    4.5% MutateRequiredSigner
    4.2% MutateContesters
    4.0% MutatePartiesInOutput
    3.8% PushDeadlineAlthoughItShouldNot
    3.5% MutateInputContesters
    3.5% MutateOutputContestationPeriod
    3.2% MutateValueInOutput

CloseInitial

  • is healthy

    Details
    +++ OK, passed 1 test.
  • does not survive random adversarial mutations

    Details
    +++ OK, passed 400 tests.

    CloseInitialMutation (400 in total):
    100.0% MutateCloseContestationDeadline'

Close

  • is healthy

    Details
    +++ OK, passed 1 test.
  • does not survive random adversarial mutations

    Details
    +++ OK, passed 400 tests.

    CloseMutation (400 in total):
    7.5% MutateSnapshotNumberButNotSignature
    7.0% MutateSnapshotNumberToLessThanEqualZero
    6.8% MutateCloseUTxOHash
    6.5% MutateMultipleRequiredSigner
    5.2% MutateContestationDeadline
    5.2% MutateRequiredSigner
    5.2% MutateSignatureButNotSnapshotNumber
    5.2% MutateValueInOutput
    5.0% MutateNoRequiredSigner
    5.0% MutatePartiesInOutput
    5.0% MutateValidityInterval
    4.8% MutateHeadIdInOutput
    4.8% NotContinueContract
    4.5% SnapshotNotSignedByAllParties
    4.2% MutateInfiniteLowerBound
    4.0% MutateContesters
    3.8% CloseFromDifferentHead
    3.5% MutateContestationPeriod
    3.5% MutateTokenMintingOrBurning
    3.2% MutateInfiniteUpperBound

CollectCom

  • is healthy

    Details
    +++ OK, passed 1 test.
  • does not survive random adversarial mutations

    Details
    +++ OK, passed 100 tests.

    CollectComMutation (100 in total):
    16% MutateNumberOfParties
    12% ExtractSomeValue
    12% NotContinueContract
    11% MutateCommitToInitial
    11% MutateTokenMintingOrBurning
    10% MutateHeadId
    10% MutateRequiredSigner
    9% MutateOpenUTxOHash
    9% RemoveSTFromOutput

Commit

  • is healthy

    Details
    +++ OK, passed 1 test.
  • does not survive random adversarial mutations

    Details
    +++ OK, passed 100 tests.

    CommitMutation (100 in total):
    15% MutateCommittedAddress
    15% MutateCommittedValue
    15% NonContinuousHeadId
    13% MutateCommitOutputValue
    13% MutateTokenMintingOrBurning
    11% MutateRequiredSigner
    9% RecordAllCommittedUTxO
    9% UsePTFromDifferentHead

Abort

  • is healthy

    Details
    +++ OK, passed 100 tests.
  • does not survive random adversarial mutations

    Details
    +++ OK, passed 200 tests.

    AbortMutation (200 in total):
    13.0% MutateThreadTokenQuantity
    12.0% ExtractValue
    8.5% MintOnAbort
    8.5% ReorderCommitOutputs
    7.5% DoNotBurnST
    7.5% MutateRequiredSigner
    7.5% UseInputFromOtherHead
    7.0% BurnOneTokenMore
    7.0% MutateParties
    7.0% MutateUseDifferentHeadToAbort
    5.0% DropCollectedInput
    5.0% DropOneCommitOutput
    4.5% DoNotBurnSTInitial

Init

  • is healthy

    Details
    +++ OK, passed 1 test.
  • does not survive random adversarial mutations

    Details
    +++ OK, passed 100 tests.

    InitMutation (100 in total):
    15% MintTooManyTokens
    15% MutateDropInitialOutput
    15% MutateInitialOutputValue
    13% MutateAddAnotherPT
    13% MutateSeedInDatum
    11% MutateHeadIdInDatum
    9% MutateDropSeedInput
    9% MutateHeadIdInInitialDatum

Serializing commits

  • deserializeCommit . serializeCommit === id

    Details
    +++ OK, passed 100 tests.

TxOut hashing

  • OffChain.hashUTxO == OnChain.hashTxOuts (on sorted tx outs)

    Details
    +++ OK, passed 20 tests.
  • OnChain.hashPreSerializedCommits == OnChain.hashTxOuts (on sorted tx outs)

    Details
    +++ OK, passed 20 tests.
  • does care about ordering of TxOut

    Details
    +++ OK, passed 20 tests; 27 discarded.

Signature validator

  • verifies single signature produced off-chain

    Details
    +++ OK, passed 100 tests.
  • verifies snapshot multi-signature for list of parties and signatures

    Details
    +++ OK, passed 100 tests.

Hydra.Behavior

rolling back & forward does not make the node crash

  • does work for rollbacks past init
  • does work for rollbacks past open

Hydra Node Logging

  • traces processing of events
  • traces handling of effects

JSON encoding of (HydraNodeLog SimpleTx)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/HydraNodeLog SimpleTx.json

Two participant Head

  • only opens the head after all nodes committed
  • can abort and re-open a head when one party has not committed
  • cannot abort head when commits have been collected
  • ignores head initialization of other head
  • outputs committed utxo when client requests it

in an open head

  • sees the head closed by other nodes

  • valid new transactions are seen by all parties

  • valid new transactions get snapshotted

  • snapshots are created as long as transactions to snapshot exist

  • depending transactions stay pending and are confirmed in order

  • depending transactions expire if not applicable in time

  • sending two conflicting transactions should lead one being confirmed and one expired

  • outputs utxo from confirmed snapshot when client requests it

  • can be finalized by all parties after contestation period

  • contest automatically when detecting closing with old snapshot

Single participant Head

  • accepts Init command
  • accepts Commit after successful Init
  • can close an open head
  • does not fanout automatically
  • does finalize head after contestation period upon command

Sanity tests of test suite

  • does not delay for real

Hydra.API.ServerOutput

JSON encoding of (ReasonablySized (TimedServerOutput (Tx BabbageEra)))

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized (TimedServerOutput (Tx BabbageEra)).json

JSON encoding of (ReasonablySized (ServerOutput (Tx BabbageEra)))

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized (ServerOutput (Tx BabbageEra)).json

JSON encoding of (ReasonablySized (ServerOutput SimpleTx))

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized (ServerOutput SimpleTx).json

Hydra.API.Server

ServerSpec

  • should fail on port in use

  • greets

  • Greetings should contain the hydra-node version

  • sends sendOutput to all connected clients

  • sends all sendOutput history to all connected clients after a restart

  • echoes history (past outputs) to client upon reconnection

    Details
    +++ OK, passed 100 tests:
    93% more than one message when reconnecting
    4% no message when reconnecting
    3% only one message when reconnecting
  • does not echo history if client says no

    Details
    +++ OK, passed 100 tests:
    93% more than one message when reconnecting
    4% no message when reconnecting
    3% only one message when reconnecting
  • outputs tx as cbor or json depending on the client

  • removes UTXO from snapshot when clients request it

  • sequence numbers are continuous and strictly monotonically increasing

    Details
    +++ OK, passed 100 tests.
  • displays correctly headStatus and snapshotUtxo in a Greeting message

  • greets with correct head status and snapshot utxo after restart

  • sends an error when input cannot be decoded

Hydra.API.HTTPServer

JSON encoding of (ReasonablySized TransactionSubmitted)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized TransactionSubmitted.json

JSON encoding of (ReasonablySized (SubmitTxRequest (Tx BabbageEra)))

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized (SubmitTxRequest (Tx BabbageEra)).json

JSON encoding of (ReasonablySized DraftCommitTxRequest)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized DraftCommitTxRequest.json

JSON encoding of (ReasonablySized DraftCommitTxResponse)

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized DraftCommitTxResponse.json

  • Validate /commit publish api schema

    Details
    +++ OK, passed 1 test.
  • Validate /commit subscribe api schema

    Details
    +++ OK, passed 1 test.
  • Validate /cardano-transaction publish api schema

    Details
    +++ OK, passed 1 test.
  • Validate /cardano-transaction subscribe api schema

    Details
    +++ OK, passed 1 test.

SubmitTxRequest accepted tx formats

  • accepts Base16 cbor encoded bytestring

    Details
    +++ OK, passed 100 tests.
  • accepts json encoded transaction

    Details
    +++ OK, passed 100 tests.
  • accepts transaction encoded as TextEnvelope

    Details
    +++ OK, passed 100 tests.

API should respond correctly

GET /protocol-parameters

  • matches schema
  • responds given parameters

Hydra.API.ClientInput

FromJSON (ValidatedTx era)

  • accepts transactions produced via cardano-cli

    Details
    +++ OK, passed 100 tests.
  • accepts raw CBOR-base16-encoded transactions

    Details
    +++ OK, passed 100 tests.

JSON encoding of (ReasonablySized (ClientInput (Tx BabbageEra)))

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized (ClientInput (Tx BabbageEra)).json

JSON encoding of (ReasonablySized (ClientInput SimpleTx))

  • allows to encode values with aeson and read them back

    Details
    +++ OK, passed 100 tests.
  • produces the same JSON as is found in golden/ReasonablySized (ClientInput SimpleTx).json