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:
71.2% some item contains a new line
4.8% no items storedit 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; 530 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 7 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>
optiondoes 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.InputQueue
adds sequential id to all enqueued items
Details
+++ OK, passed 100 tests.
Hydra.Node
checkHeadState
- accepts configuration consistent with HeadState
- throws exception given contestation period differs
- throws exception given parties differ
- log error given configuration mismatches head state
stepHydraNode
events are sent to all sinks
event ids are strictly monotonic
Details
+++ OK, passed 100 tests (0% empty list of events).
can continue after re-hydration
emits a single ReqSn 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
hydrate
loads events from source into all sinks
Details
+++ OK, passed 100 tests.
event ids are consistent
Details
+++ OK, passed 100 tests.
fails if one sink fails
Details
+++ OK, passed 100 tests.
checks head state
Details
+++ OK, passed 100 tests.
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):
32.56% < 10
19.38% < 20
13.96% < 30
11.00% < 40
7.70% < 50
5.88% < 60
4.48% < 70
3.04% < 80
1.52% < 90
0.48% < 100
Messages from Bob to Alice (5000 in total):
32.72% < 10
18.62% < 20
14.08% < 30
9.72% < 40
9.38% < 50
6.08% < 60
4.48% < 70
2.76% < 80
1.72% < 90
0.44% < 100broadcast 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:
70% 0
22% 1
7% 2
1% 3
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
- handshake failures should call the handshakeCallback
- 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 (681 in total):
100.0% +
Actions (681 in total):
28.0% +Commit
26.7% +NewTx
13.8% +Seed
13.7% +Init
4.7% +Abort
3.8% +Close
3.7% +Fanout
2.8% +Decommit
2.8% +RollbackAndForward
Transitions (681 in total):
31.9% Open -> Open
22.2% Initial -> Initial
13.8% Start -> Idle
13.7% Idle -> Initial
5.9% Initial -> Open
4.7% Initial -> Final
3.8% Open -> Closed
3.7% Closed -> Final
0.4% Closed -> Closedcheck conflict-free liveness
Details
+++ OK, passed 100 tests.
Action polarity (885 in total):
100.0% +
Actions (885 in total):
28.6% +NewTx
20.8% +Commit
11.3% +StopTheWorld
11.0% +Seed
9.9% +Init
4.3% +Abort
3.3% +RollbackAndForward
2.6% +Decommit
2.1% +Close
2.0% +Fanout
2.0% +ObserveConfirmedTx
2.0% +Wait
Transitions (885 in total):
40.1% Open -> Open
18.1% Initial -> Initial
11.0% Start -> Idle
9.9% Idle -> Initial
6.3% Final -> Final
4.3% Initial -> Final
4.2% Initial -> Open
2.1% Open -> Closed
2.0% Closed -> Final
1.0% Idle -> Idle
0.6% Closed -> Closed
0.3% Start -> Startcheck head opens if all participants commit
Details
+++ OK, passed 100 tests.
Action polarity (793 in total):
100.0% +
Actions (793 in total):
49.6% +Commit
12.6% +Init
12.6% +ObserveHeadIsOpen
12.6% +Seed
12.6% +Wait
Transitions (793 in total):
36.9% Initial -> Initial
25.2% Open -> Open
12.6% Idle -> Initial
12.6% Initial -> Open
12.6% Start -> Idlefanout contains whole confirmed UTxO
Details
+++ OK, passed 100 tests.
Action polarity (921 in total):
100.0% +
Actions (921 in total):
27.5% +NewTx
20.0% +Commit
10.9% +StopTheWorld
10.5% +Seed
9.6% +Init
4.1% +Abort
4.0% +Close
3.9% +Fanout
3.1% +RollbackAndForward
2.5% +Decommit
2.0% +ObserveConfirmedTx
2.0% +Wait
Transitions (921 in total):
36.6% Open -> Open
17.4% Initial -> Initial
10.5% Start -> Idle
9.6% Idle -> Initial
8.0% Final -> Final
4.1% Initial -> Final
4.0% Initial -> Open
4.0% Open -> Closed
3.9% Closed -> Final
1.0% Idle -> Idle
0.5% Closed -> Closed
0.3% Start -> StarttoRealUTxO is distributive
Details
+++ OK, passed 100 tests.
toTxOuts is distributive
Details
+++ OK, passed 100 tests.
parties contest to wrong closed snapshot
Details
+++ OK, passed 100 tests.
Action polarity (1393 in total):
100.00% +
Actions (1393 in total):
28.21% +Commit
14.36% +Wait
7.18% +CloseWithInitialSnapshot
7.18% +Fanout
7.18% +Init
7.18% +NewTx
7.18% +ObserveConfirmedTx
7.18% +ObserveHeadIsOpen
7.18% +Seed
7.18% +StopTheWorld
Transitions (1393 in total):
35.89% Open -> Open
21.03% Initial -> Initial
7.18% Closed -> Final
7.18% Final -> Final
7.18% Idle -> Initial
7.18% Initial -> Open
7.18% Open -> Closed
7.18% 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% before system start
45% after system start
1% 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.
genUTxO 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.
genChainPoint
generates only some genesis points
Details
+++ OK, passed 800 tests (83.4% not at genesis).
genValue
produces realistic values
Details
+++ OK, passed 100 tests.
genOutput
has enough lovelace to cover assets
Details
+++ OK, passed 100 tests.
genTxOut
does generate good values
Details
+++ OK, passed 100 tests:
76% has datum
62% is VK output
56% has multiple assets
44% has only ADA
38% is Script 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 according to schema
Details
+++ OK, passed 1 test.
PParams
Roundtrip JSON encoding
Details
+++ OK, passed 100 tests.
UTxO
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
Decommit
observes DecommitRequested and ReqDec in an Open state
ignores ReqDec when not in Open state
Details
+++ OK, passed 100 tests.
reports if a requested decommit tx is expired
wait for second decommit when another one is in flight
cannot commit while another decommit is pending
waits if a requested decommit tx is not (yet) applicable
updates decommitTx on valid ReqDec
emits ReqSn on valid RecDec
ReqSn
prunes local txs in order
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
rejects snapshot request with transaction not applicable to 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 invalid snapshots version
rejects overlapping snapshot requests from the leader
rejects same version snapshot requests with differring decommit txs
ignores in-flight ReqTx when closed
ignores in-flight ReqDec 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.
connectivity messages passthrough without affecting the current state
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 depositTx of another head
Details
+++ OK, passed 100 tests.
ignores recoverTx of another head
Details
+++ OK, passed 100 tests.
ignores decrementTx 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.
empty inputs in decommit tx are prevented
Details
+++ OK, passed 100 tests.
Hydra.FireForget
- client can send 'Hail Hydra!' to server
Hydra.Events.FileBased
eventPairFromPersistenceIncremental
can handle continuous events
Details
+++ OK, passed 100 tests.
can handle non-continuous events
Details
+++ OK, passed 100 tests.
can handle duplicate events
Details
+++ OK, passed 100 tests.
can bootstrap from plain StateChanged events
Details
+++ OK, passed 100 tests.
persisted event format
JSON encoding of StateChanged
- allows to encode values with aeson and read them back
- produces the same JSON as is found in golden/StateChanged/HeadInitialized.json
- produces the same JSON as is found in golden/StateChanged/CommittedUTxO.json
- produces the same JSON as is found in golden/StateChanged/HeadAborted.json
- produces the same JSON as is found in golden/StateChanged/HeadOpened.json
- produces the same JSON as is found in golden/StateChanged/TransactionReceived.json
- produces the same JSON as is found in golden/StateChanged/TransactionAppliedToLocalUTxO.json
- produces the same JSON as is found in golden/StateChanged/CommitRecorded.json
- produces the same JSON as is found in golden/StateChanged/CommitRecovered.json
- produces the same JSON as is found in golden/StateChanged/DecommitRecorded.json
- produces the same JSON as is found in golden/StateChanged/SnapshotRequestDecided.json
- produces the same JSON as is found in golden/StateChanged/SnapshotRequested.json
- produces the same JSON as is found in golden/StateChanged/CommitFinalized.json
- produces the same JSON as is found in golden/StateChanged/DecommitFinalized.json
- produces the same JSON as is found in golden/StateChanged/PartySignedSnapshot.json
- produces the same JSON as is found in golden/StateChanged/SnapshotConfirmed.json
- produces the same JSON as is found in golden/StateChanged/HeadClosed.json
- produces the same JSON as is found in golden/StateChanged/HeadContested.json
- produces the same JSON as is found in golden/StateChanged/HeadIsReadyToFanout.json
- produces the same JSON as is found in golden/StateChanged/HeadFannedOut.json
- produces the same JSON as is found in golden/StateChanged/ChainRolledBack.json
- produces the same JSON as is found in golden/StateChanged/TickObserved.json
JSON encoding of (StateEvent (Tx ConwayEra))
allows to encode values with aeson and read them back
Details
+++ OK, passed 100 tests.
produces the same JSON as is found in golden/StateEvent (Tx ConwayEra).json
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; 14 discarded.
verifyMultiSignature fails when signature is missing
Details
+++ OK, passed 100 tests; 75 discarded.
does not validate multisig if less keys given
Details
+++ OK, passed 100 tests; 21 discarded (3% 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; 31 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 (0% spending script).
Only 0% spending script, but expected 5%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:
28% has dependent txs
24% has no tx that are ours
Hydra.Chain.Direct.TxTrace
realWorldModelUTxO preserves addition
Details
+++ OK, passed 100 tests.
generates interesting transaction traces
Details
+++ OK, passed 3200 tests:
92.69% has some snapshots
65.66% close with non initial snapshots
44.78% reach fanout
28.91% fanout with some UTxO
20.31% fanout with additional UTxO to distribute
15.88% fanout with empty UTxO
7.31% empty
7.31% has decrements
3.88% has multiple contestsall valid transactions
Details
+++ OK, passed 800 tests:
92.8% has some snapshots
68.4% close with non initial snapshots
46.4% reach fanout
30.0% fanout with some UTxO
21.5% fanout with additional UTxO to distribute
16.4% fanout with empty UTxO
7.2% empty
7.2% has decrements
4.0% has multiple contests
Action polarity (8758 in total):
50.42% +
49.58% -
Actions (8758 in total):
38.49% -Contest
28.60% +NewSnapshot
11.09% -Decrement
9.02% +Decrement
6.25% +Close
4.24% +Fanout
2.32% +Contest
Actions rejected by precondition (103 in total):
100.0% Close
Hydra.Chain.Direct.Tx
commitTx
genBlueprintTx generates interesting txs
Details
+++ OK, passed 100 tests:
100% blueprint has reference input
100% blueprint spends script UTxO
85% blueprint spends from script AND pub key
85% blueprint spends pub key UTxO
44% blueprint has reward redeemerValidate blueprint and commit transactions
Details
+++ OK, passed 100 tests.
observeHeadTx
All valid transitions for all possible states can be observed.
Details
+++ OK, passed 100 tests.
ChainTransition (100 in total):
16% Init
15% Contest
12% Abort
11% Commit
10% Close
10% Collect
9% Fanout
9% Increment
8% Decrement
HeadId (cardano)
headIdToPolicyId . mkHeadId === id
Details
+++ OK, passed 100 tests.
curencySymbolToHeadId . headIdToCurrencySymbol === 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:
56% collect, close and fanout passed
44% collect failed already
fanout
transaction size is below 16kB
Details
+++ OK, passed 100 tests:
51% Fanout size: 40-44
28% Fanout size: 10-40
19% Fanout size: 1-10
2% Fanout size: 0
65% 12kB
35% 11kBvalidates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests:
51% Fanout size: 40-44
28% Fanout size: 10-40
19% Fanout size: 1-10
2% Fanout size: 0
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):
24% one week
15% one month
15% one year
14% > k blocks
13% one day
10% < k blocks
9% k blocks on mainnetvalidates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests.
Close point (slot) (100 in total):
100% > 0
Contestation period (100 in total):
24% one week
15% one month
15% one year
14% > k blocks
13% one day
10% < k blocks
9% k blocks on mainnet
close
transaction size is below 16kB
Details
+++ OK, passed 100 tests:
100% ConfirmedSnapshot
100% 1kBvalidates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests (100% ConfirmedSnapshot).
decrement
transaction size is below 16kB
Details
+++ OK, passed 100 tests (100% 1kB).
validates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests.
observes distributed outputs
Details
+++ OK, passed 100 tests.
recover
transaction size is below 16kB
Details
+++ OK, passed 100 tests (100% 4kB).
validates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests.
observes recover
Details
+++ OK, passed 100 tests.
deposit
transaction size is below 16kB
Details
+++ OK, passed 100 tests (100% 0kB).
validates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests.
observes deposit
Details
+++ OK, passed 100 tests.
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:
78% Abort after some (but not all) commits
15% Abort after all commits
7% Abort immediately, after 0 commits
98% 11kB
2% 12kBvalidates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests:
78% Abort after some (but not all) commits
15% Abort after all commits
7% Abort immediately, after 0 commitscan create valid abort transactions for any observed head
Details
+++ OK, passed 100 tests.
commit
transaction size is below 16kB
Details
+++ OK, passed 100 tests:
97% Non-empty commit
3% Empty commit
100% 0kBvalidates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests:
97% Non-empty commit
3% Empty commitonly proper head is observed
Details
+++ OK, passed 100 tests:
97% Non-empty commit
3% Empty commitconsumes all inputs that are committed
Details
+++ OK, passed 100 tests:
97% Non-empty commit
3% Empty commitcan only be applied / observed once
Details
+++ OK, passed 100 tests:
97% Non-empty commit
3% Empty commitreject committing outputs with byron addresses
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
0% 1 party
61% 12kB
39% 11kBvalidates within maxTxExecutionUnits
Details
+++ OK, passed 100 tests:
100% 2+ parties
0% 1 partyonly proper head is observed
Details
+++ OK, passed 100 tests (100% NotAHeadPolicy).
splitUTxO
it splits at least one utxo off
Details
+++ OK, passed 100 tests; 36 discarded.
observeTx
All valid transitions for all possible states can be observed.
Details
+++ OK, passed 100 tests.
ChainTransition (100 in total):
16% Init
15% Contest
12% Abort
11% Commit
10% Close
10% Collect
9% Fanout
9% Increment
8% Decrement
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
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:
16% Rollback 2 blocks
16% Rollback 5 blocks
14% Rollback 0 blocks
14% Rollback 3 blocks
14% Rollback 4 blocks
9% Rollback 6 blocks
6% Rollback 1 blocks
6% Rollback 7 blocks
5% Rollback 8 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:
16% Close
15% Increment
12% Fanout
11% Collect
11% Init
10% Abort
9% Commit
8% Contest
8% Decrementrollbacks state onRollBackward
Details
+++ OK, passed 100 tests:
10% Rollback to: ChainSlot 0 / 4
9% Rollback to: ChainSlot 0 / 5
7% Rollback to: ChainSlot 0 / 6
7% Rollback to: ChainSlot 0 / 8
6% Rollback to: ChainSlot 1 / 2
5% Rollback to: ChainSlot 0 / 2
5% Rollback to: ChainSlot 0 / 3
5% Rollback to: ChainSlot 2 / 2
4% Rollback to: ChainSlot 0 / 7
3% Rollback to: ChainSlot 1 / 3
3% Rollback to: ChainSlot 2 / 4
3% Rollback to: ChainSlot 3 / 3
3% Rollback to: ChainSlot 4 / 5
2% Rollback to: ChainSlot 1 / 7
2% Rollback to: ChainSlot 2 / 5
2% Rollback to: ChainSlot 2 / 8
2% Rollback to: ChainSlot 3 / 4
2% Rollback to: ChainSlot 3 / 5
2% Rollback to: ChainSlot 3 / 6
2% Rollback to: ChainSlot 4 / 4
2% Rollback to: ChainSlot 5 / 5
1% Rollback to: ChainSlot 1 / 4
1% Rollback to: ChainSlot 1 / 5
1% Rollback to: ChainSlot 1 / 6
1% Rollback to: ChainSlot 1 / 8
1% Rollback to: ChainSlot 2 / 3
1% Rollback to: ChainSlot 2 / 6
1% Rollback to: ChainSlot 3 / 7
1% Rollback to: ChainSlot 3 / 8
1% Rollback to: ChainSlot 4 / 6
1% Rollback to: ChainSlot 4 / 8
1% Rollback to: ChainSlot 5 / 7
1% Rollback to: ChainSlot 6 / 6
1% Rollback to: ChainSlot 6 / 7
1% Rollback to: ChainSlot 7 / 8
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
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
Decommit
- can request decommit
- requested decommits get approved
- can only process one decommit at once
- can process transactions while decommit pending
- can close with decommit in flight
- fanout utxo is correct after a decommit
Commit
- requested commits get approved
- can process multiple commits
- can process transactions while commit pending
- can close with commit in flight
- fanout utxo is correct after a commit
- multiple commits and decommits in sequence
- commit and decommit same utxo
- 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 ServerOutput
allows to encode values with aeson and read them back
produces the same JSON as is found in golden/ServerOutput/PeerConnected.json
produces the same JSON as is found in golden/ServerOutput/PeerDisconnected.json
produces the same JSON as is found in golden/ServerOutput/PeerHandshakeFailure.json
produces the same JSON as is found in golden/ServerOutput/HeadIsInitializing.json
produces the same JSON as is found in golden/ServerOutput/Committed.json
produces the same JSON as is found in golden/ServerOutput/HeadIsOpen.json
produces the same JSON as is found in golden/ServerOutput/HeadIsClosed.json
produces the same JSON as is found in golden/ServerOutput/HeadIsContested.json
produces the same JSON as is found in golden/ServerOutput/ReadyToFanout.json
produces the same JSON as is found in golden/ServerOutput/HeadIsAborted.json
produces the same JSON as is found in golden/ServerOutput/HeadIsFinalized.json
produces the same JSON as is found in golden/ServerOutput/CommandFailed.json
produces the same JSON as is found in golden/ServerOutput/TxValid.json
produces the same JSON as is found in golden/ServerOutput/TxInvalid.json
produces the same JSON as is found in golden/ServerOutput/SnapshotConfirmed.json
produces the same JSON as is found in golden/ServerOutput/GetUTxOResponse.json
produces the same JSON as is found in golden/ServerOutput/InvalidInput.json
produces the same JSON as is found in golden/ServerOutput/Greetings.json
produces the same JSON as is found in golden/ServerOutput/PostTxOnChainFailed.json
produces the same JSON as is found in golden/ServerOutput/IgnoredHeadInitializing.json
produces the same JSON as is found in golden/ServerOutput/DecommitRequested.json
produces the same JSON as is found in golden/ServerOutput/DecommitInvalid.json
produces the same JSON as is found in golden/ServerOutput/DecommitApproved.json
produces the same JSON as is found in golden/ServerOutput/CommitRecorded.json
produces the same JSON as is found in golden/ServerOutput/CommitApproved.json
produces the same JSON as is found in golden/ServerOutput/DecommitFinalized.json
produces the same JSON as is found in golden/ServerOutput/CommitFinalized.json
produces the same JSON as is found in golden/ServerOutput/CommitRecovered.json
matches JSON schema
Details
+++ OK, passed 1 test.
JSON encoding of (ReasonablySized (TimedServerOutput (Tx ConwayEra)))
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 ConwayEra)).json
Hydra.API.Server
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:
91% more than one message when reconnecting
5% only one message when reconnecting
4% no message when reconnectingdoes not echo history if client says no
Details
+++ OK, passed 100 tests:
91% more than one message when reconnecting
5% only one message when reconnecting
4% no message when reconnectingremoves UTXO from snapshot when clients request it
sequence numbers are continuous
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
TLS support
- accepts TLS connections when configured
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 ConwayEra)))
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 ConwayEra)).json
JSON encoding of (ReasonablySized (DraftCommitTxRequest (Tx ConwayEra)))
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 (Tx ConwayEra)).json
JSON encoding of (ReasonablySized (DraftCommitTxResponse (Tx ConwayEra)))
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 (Tx ConwayEra)).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.
Validate /decommit publish api schema
Details
+++ OK, passed 1 test.
Validate /decommit subscribe api schema
Details
+++ OK, passed 1 test.
Validate /commit publish api schema
Details
+++ OK, passed 1 test.
Validate /commit subscribe api schema
Details
+++ OK, passed 1 test.
Validate /commits publish api schema
Details
+++ OK, passed 1 test.
Validate /commits subscribe api schema
Details
+++ OK, passed 1 test.
Validate /commits/tx-id publish api schema
Details
+++ OK, passed 1 test.
Validate /commits/tx-id subscribe api schema
Details
+++ OK, passed 1 test.
SubmitTxRequest accepted tx formats
accepts json encoded transaction
Details
+++ OK, passed 100 tests.
accepts transaction encoded as TextEnvelope
Details
+++ OK, passed 100 tests.
API should respond correctly
POST /commit
responds on valid requests
Details
+++ OK, passed 100 tests.
handles PostTxErrors accordingly
Details
+++ OK, passed 1600 tests:
5.00% UnsupportedLegacyOutput
4.50% CommittedTooMuchADAForMainnet
4.31% InvalidHeadId
3.69% CannotFindOwnInitial
GET /snapshot/utxo
responds correctly
Details
+++ OK, passed 100 tests.
ok response matches schema
Details
+++ OK, passed 4 tests:
75% non empty
25% emptyhas inlineDatumRaw
Details
+++ OK, passed 100 tests.
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.
JSON encoding of (ReasonablySized (ClientInput (Tx ConwayEra)))
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 ConwayEra)).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