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

Move hydra-spec to input repository #1512

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

locallycompact
Copy link
Contributor

@locallycompact locallycompact commented Jul 16, 2024

Moves the hydra-spec.pdf to https://github.com/cardano-scaling/hydra-formal-specification


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

Copy link

github-actions bot commented Jul 16, 2024

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 2024-07-16 16:31:38.913550245 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial e6685648e63ab510b49d2ce632c570d2ef53f44f3cbdf82ed553906c 4081
νCommit fce3b967fb72f4a3be8dfa30defe413258ff453e5d32d6752d83f9cf 2060
νHead 10a116037de398d6b0721152336d602f0ea653eb3dfe540d5da63fe4 9367
μHead 4f93fdfeda690e005d3f5a180208edd3f65ddd0892466ad7f4dd678b* 4236
  • 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 4818 5.93 2.35 0.43
2 5018 7.18 2.84 0.45
3 5220 8.41 3.32 0.47
5 5623 11.12 4.39 0.52
10 6627 18.29 7.23 0.64
58 16278 84.19 33.30 1.79

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 556 9.25 3.68 0.28
2 746 11.94 4.93 0.32
3 937 14.70 6.20 0.35
5 1310 20.44 8.83 0.44
10 2240 36.05 15.86 0.65
26 5246 98.14 42.75 1.48

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 544 14.36 5.77 0.33
2 113 654 22.75 9.24 0.43
3 170 764 32.46 13.32 0.54
4 226 874 42.99 17.80 0.66
5 282 984 58.27 24.15 0.84
6 339 1099 73.36 30.56 1.01
7 395 1205 85.89 36.11 1.16

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 598 8.08 4.53 0.27
2 746 8.66 5.55 0.29
3 960 9.78 6.98 0.32
5 1167 11.11 9.02 0.36
10 1919 15.45 15.00 0.47
50 4626 39.10 23.71 0.84

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 623 8.40 4.66 0.28
2 708 8.70 5.38 0.29
3 898 9.85 6.80 0.32
5 1221 11.72 9.29 0.37
10 1995 15.98 15.25 0.48
50 8028 50.77 63.07 1.37

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 4689 16.39 7.15 0.54
2 4785 23.86 10.35 0.63
3 4924 39.70 17.51 0.81
4 5019 51.35 22.54 0.95
5 5294 76.62 34.10 1.25
6 5518 98.34 43.83 1.50

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 4650 7.82 3.29 0.44
5 1 57 4684 8.74 3.91 0.46
5 5 284 4819 13.61 6.88 0.52
5 10 569 4989 18.61 10.14 0.59
5 20 1138 5328 29.79 17.15 0.75
5 30 1704 5667 40.98 24.18 0.91
5 40 2275 6008 52.56 31.38 1.07
5 50 2847 6350 63.17 38.15 1.22
5 82 4670 7436 99.43 60.85 1.72

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 2024-07-16 16:33:44.139822525 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.109430308
P99 6.16438568999998ms
P95 4.979398599999999ms
P50 3.9490410000000002ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 22.349312942
P99 115.17057220000002ms
P95 30.63525239999999ms
P50 19.6483975ms
Number of Invalid txs 0

Copy link

github-actions bot commented Jul 16, 2024

Test Results

464 tests  ±0   457 ✅ ±0   17m 11s ⏱️ + 1m 18s
149 suites ±0     7 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit c70e4a8. ± Comparison against base commit f86515c.

♻️ This comment has been updated with latest results.

@locallycompact locallycompact marked this pull request as ready for review July 31, 2024 09:39
Copy link

Transaction 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 2024-07-31 09:42:55.455114329 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 2fac819a1f4f14e29639d1414220d2a18b6abd6b8e444d88d0dda8ff 3799
νCommit 2043a9f1a685bcf491413a5f139ee42e335157c8c6bc8d9e4018669d 1743
νHead bd9fad235c871fb7f837c767593018a84be3083ff80f9dab5f1c55f9 10194
μHead c8038945816586c4d38926ee63bba67821eb863794220ebbd0bf79ee* 4607
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per head.

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 5188 6.02 2.39 0.44
2 5390 7.18 2.84 0.47
3 5588 8.46 3.34 0.49
5 5997 11.22 4.43 0.54
10 6999 18.20 7.20 0.66
56 16246 81.53 32.25 1.76

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 559 10.52 4.15 0.29
2 748 13.86 5.65 0.34
3 933 17.33 7.20 0.38
5 1310 24.65 10.44 0.48
10 2245 45.22 19.36 0.75
20 4123 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 549 21.46 8.41 0.41
2 113 659 33.11 13.11 0.54
3 171 769 44.13 17.71 0.67
4 228 879 60.17 24.27 0.85
5 280 989 73.97 30.13 1.01
6 337 1100 91.85 37.61 1.21

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 626 17.93 7.87 0.38
2 765 19.03 9.03 0.40
3 979 21.78 10.83 0.45
5 1114 21.93 12.31 0.47
10 1854 30.37 19.23 0.62
49 7792 96.25 73.27 1.80

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 641 21.02 9.41 0.42
2 789 22.49 10.83 0.44
3 909 23.92 12.20 0.47
5 1168 26.66 14.93 0.52
10 2092 36.18 23.70 0.71
49 7873 96.26 81.61 1.86

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 695 27.10 11.67 0.48
2 805 28.98 13.20 0.51
3 894 30.30 14.35 0.54
5 1320 35.06 18.41 0.62
10 2102 44.66 26.63 0.80
39 6404 99.01 73.43 1.76

Abort transaction costs

There is some variation due to the random mixture of initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 5061 17.47 7.59 0.57
2 5190 28.43 12.46 0.70
3 5345 42.71 18.90 0.87
4 5436 56.79 25.12 1.03
5 5587 75.44 33.53 1.25
6 5639 90.60 40.18 1.42

FanOut transaction costs

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 5022 7.75 3.28 0.46
5 1 57 5056 8.88 3.99 0.47
5 5 284 5192 13.60 6.92 0.54
5 10 570 5363 19.26 10.48 0.62
5 20 1140 5702 30.67 17.63 0.78
5 30 1706 6040 41.70 24.63 0.93
5 40 2277 6381 53.62 32.01 1.10
5 50 2846 6720 63.97 38.72 1.24
5 81 4610 7771 99.33 60.93 1.73

End-to-end benchmark results

This page is intended to collect the latest end-to-end benchmark results produced by Hydra's continuous integration (CI) system from the latest master code.

Please note that these results are approximate as they are currently produced from limited cloud VMs and not controlled hardware. Rather than focusing on the absolute results, the emphasis should be on relative results, such as how the timings for a scenario evolve as the code changes.

Generated at 2024-07-31 09:45:03.16169667 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.236542226
P99 7.122035159999947ms
P95 5.191705899999997ms
P50 4.0733485ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.889329457
P99 115.87657784000008ms
P95 32.794549249999996ms
P50 21.305092000000002ms
Number of Invalid txs 0

@locallycompact locallycompact enabled auto-merge (squash) July 31, 2024 09:48
@locallycompact locallycompact merged commit b391020 into master Jul 31, 2024
21 checks passed
@locallycompact locallycompact deleted the lc/upstream-spec branch July 31, 2024 09:55
locallycompact added a commit that referenced this pull request Jul 31, 2024
locallycompact added a commit that referenced this pull request Jul 31, 2024
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.

Use Agda-enhanced version for published specification hydra.family
3 participants