Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Hydraw connection problems #1121

Merged
2 commits merged into from
Oct 19, 2023
Merged

Fix Hydraw connection problems #1121

2 commits merged into from
Oct 19, 2023

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Oct 17, 2023

Fix hydraw getting stuck by not passing the websocket connection but initializing connection on each http request. This makes hydraw work a bit slower but it shouldn't crash anymore. It also receives/sends websocket requests using race_ instead of concurrently_ .


  • CHANGELOG updated or not needed
  • Documentation updated or not needed
  • Haddocks updated or not needed
  • No new TODOs introduced or explained herafter

@v0d1ch v0d1ch self-assigned this Oct 17, 2023
@github-actions
Copy link

github-actions bot commented Oct 17, 2023

Test Results

366 tests  ±0   361 ✔️ ±0   20m 19s ⏱️ + 1m 50s
124 suites ±0       5 💤 ±0 
    6 files   ±0       0 ±0 

Results for commit c01874d. ± Comparison against base commit fa82bbd.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 17, 2023

Transactions Costs

Sizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using arbitrary values and results are not fully deterministic and comparable to previous runs.

Metadata
Generated at 2023-10-19 11:06:18.958573746 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 9bad424d8a3bc67f63acfe1b015b551e84a14d7d8818204089a021b5 4120
νCommit 171a1e6bdbc8aa96d957a65b3f505517386af06ba265e3f784741f67 2050
νHead 00a8a1475bd29c02c0e3ff02a2fc83607425cd9b94eaa9f2a3056ab1 9185
μHead 16bb32b8df4dfc6cefe5bbaad9174db1b61394bdeaf1b26e83024bf6* 4150
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per Head.

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 4744 11.75 4.64 0.49
2 4949 14.28 5.61 0.52
3 5153 16.47 6.44 0.56
5 5563 21.41 8.33 0.63
10 6593 33.27 12.85 0.80
38 12331 98.17 37.57 1.76

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 596 12.64 4.97 0.31
2 787 16.34 6.64 0.36
3 975 20.09 8.33 0.42
5 1348 28.20 11.93 0.52
10 2281 50.99 21.85 0.82
18 3779 94.52 40.28 1.37

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 814 24.16 9.61 0.45
2 113 1134 36.29 14.62 0.60
3 169 1454 51.63 20.93 0.78
4 226 1774 66.92 27.37 0.97
5 282 2095 89.75 36.70 1.23

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 688 19.11 8.80 0.40
2 908 20.81 10.36 0.43
3 1149 22.21 11.84 0.47
5 1198 22.64 10.40 0.46
10 2599 33.57 22.33 0.70
50 10565 95.95 80.83 1.97

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 715 22.92 10.24 0.44
2 920 23.92 11.37 0.47
3 1113 26.46 13.32 0.51
5 1589 30.02 16.60 0.58
10 2626 39.34 24.54 0.76
44 9593 99.62 77.05 1.93

Cost of Abort Transaction

Some variation because of random mixture of still initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 4977 21.11 9.14 0.61
2 5419 35.57 15.59 0.79
3 5822 52.72 23.26 1.00
4 6354 74.23 32.82 1.27
5 6743 97.76 43.30 1.55

Cost of FanOut Transaction

Involves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.

Parties UTxO UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
5 0 0 4768 8.55 3.62 0.46
5 1 57 4802 10.11 4.52 0.48
5 5 284 4945 15.30 7.70 0.55
5 10 569 5130 21.42 11.51 0.63
5 20 1138 5484 34.76 19.61 0.81
5 30 1709 5848 47.51 27.45 0.99
5 40 2277 6206 60.49 35.40 1.17
5 50 2843 6558 73.71 43.45 1.35
5 70 3985 7287 99.48 59.28 1.70

End-To-End Benchmark Results

This page is intended to collect the latest end-to-end benchmarks results produced by Hydra's Continuous Integration system from the latest master code.

Please take those results with a grain of salt as they are currently produced from very limited cloud VMs and not controlled hardware. Instead of focusing on the absolute results, the emphasis should be on relative results, eg. how the timings for a scenario evolve as the code changes.

Generated at 2023-10-19 10:57:51.022372779 UTC

3-nodes Scenario

A rather typical setup, with 3 nodes forming a Hydra head.

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 96.118442167
P99 255.39164386ms
P95 190.60845234999988ms
P50 79.32136299999999ms
Number of Invalid txs 0

Baseline Scenario

This scenario represents a minimal case and as such is a good baseline against which to assess the overhead introduced by more complex setups. There is a single hydra-node d with a single client submitting single input and single output transactions with a constant UTxO set of 1.

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 8.070279546
P99 19.18452208ms
P95 15.210668100000005ms
P50 6.4859325000000005ms
Number of Invalid txs 0

@v0d1ch v0d1ch changed the title Hydraw with race Fix Hydraw connection problems Oct 18, 2023
@ghost ghost force-pushed the hydraw-with-race branch from 9fece56 to 30b9ea7 Compare October 18, 2023 18:06
- Don't pass the connection to the webserver but connect on each
request to the websocket in another thead.
@ghost ghost force-pushed the hydraw-with-race branch from 64de58c to c01874d Compare October 19, 2023 10:53
@ghost ghost merged commit 7175e6c into master Oct 19, 2023
@ghost ghost deleted the hydraw-with-race branch October 19, 2023 11:21
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants