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

Adr/network reliability #1082

Merged
merged 14 commits into from
Sep 26, 2023
Merged

Adr/network reliability #1082

merged 14 commits into from
Sep 26, 2023

Conversation

pgrange
Copy link
Contributor

@pgrange pgrange commented Sep 19, 2023

This ADR describes assumptions and responsibilities of the networking layer to ensure reliability. See #188


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

@pgrange pgrange mentioned this pull request Sep 19, 2023
2 tasks
@pgrange pgrange marked this pull request as ready for review September 19, 2023 14:40
@github-actions
Copy link

github-actions bot commented Sep 19, 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-09-26 09:51:50.611970994 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial eaf589de11c6c805af24b759e7794d62661d3db4ade79594892ebaec 4106
νCommit 8dcc1fb34d1ba168dfb0b82e7d1a31956a2db5856f268146b0fd7f2a 2051
νHead e35bdf32cd3806596150c1cbab6ab5456bd957b36019ed2746bf481d 8797
μHead 386ad19467be96131379dacf57a9351a762da2dee3486a855f0409c9* 4151
  • 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 4745 11.70 4.61 0.49
2 4949 14.15 5.55 0.52
3 5155 16.36 6.38 0.56
5 5569 21.29 8.26 0.63
10 6590 33.42 12.89 0.80
37 12127 96.56 36.92 1.73

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 598 12.64 4.97 0.31
2 787 16.26 6.61 0.36
3 975 20.11 8.33 0.42
5 1350 28.23 11.94 0.52
10 2287 50.99 21.84 0.82
18 3788 94.67 40.33 1.37

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 814 23.84 9.50 0.45
2 113 1134 36.27 14.59 0.60
3 171 1456 54.65 22.03 0.81
4 226 1775 69.26 28.19 0.99
5 282 2094 93.64 38.08 1.27

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 693 19.23 8.84 0.40
2 899 21.00 10.42 0.43
3 1136 22.83 12.04 0.47
5 1576 26.20 15.17 0.54
10 2572 34.60 22.66 0.71
50 10810 98.40 81.92 2.01

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 713 22.67 10.13 0.44
2 962 24.63 11.81 0.48
3 1140 26.10 13.10 0.51
5 1608 30.38 16.72 0.59
10 2569 39.11 24.17 0.75
42 9144 97.05 74.19 1.87

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 5019 21.36 9.22 0.61
2 5484 35.95 15.71 0.80
3 5906 53.95 23.69 1.02
4 6316 75.91 33.36 1.28
5 6753 99.90 44.00 1.57

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 4767 8.95 3.77 0.46
5 1 57 4803 10.08 4.50 0.48
5 5 284 4951 15.44 7.74 0.55
5 10 569 5122 21.61 11.58 0.63
5 20 1137 5484 34.94 19.66 0.82
5 30 1706 5845 47.77 27.55 0.99
5 40 2274 6199 60.68 35.46 1.17
5 50 2847 6567 73.95 43.53 1.35
5 70 3983 7287 99.83 59.40 1.71

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-09-26 09:43:12.128619448 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) 119.291241551
P99 312.36531404999994ms
P95 240.54164164999995ms
P50 106.2657595ms
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) 5.637089610
P99 18.31750805999999ms
P95 12.513279ms
P50 4.2738285000000005ms
Number of Invalid txs 0

@github-actions
Copy link

github-actions bot commented Sep 19, 2023

Test Results

359 tests   354 ✔️  15m 49s ⏱️
122 suites      5 💤
    6 files        0

Results for commit 4f9a84a.

♻️ This comment has been updated with latest results.

@ch1bo ch1bo self-assigned this Sep 20, 2023
@ch1bo ch1bo self-requested a review September 20, 2023 09:39
Copy link
Contributor

@v0d1ch v0d1ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
Copy link
Member

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the context section as it gives a good introduction. In my opinion, to approve and merge this, only a few more clarifications are needed (see below). None of them are show-stoppers though.

docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
docs/adr/2023-09-08_026-network-resilience.md Outdated Show resolved Hide resolved
abailly-iohk and others added 13 commits September 26, 2023 11:38
Co-authored-by: Sasha Bogicevic <Sasha.Bogicevic@iohk.io>
Co-authored-by: Sebastian Nagel <ch1bo@users.noreply.github.com>
Co-authored-by: Sebastian Nagel <ch1bo@users.noreply.github.com>
Co-authored-by: Sebastian Nagel <ch1bo@users.noreply.github.com>
Co-authored-by: Sebastian Nagel <ch1bo@users.noreply.github.com>
This seems an implementation detail
@pgrange pgrange merged commit e5927f4 into master Sep 26, 2023
14 checks passed
@pgrange pgrange deleted the adr/network_reliability branch September 26, 2023 09:43
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.

None yet

5 participants