cardano-scaling / hydra

Implementation of the Hydra Head protocol
https://hydra.family/head-protocol/
Apache License 2.0
274 stars 84 forks source link

Use spec from hydra-formal-specification #1548

Closed locallycompact closed 1 month ago

github-actions[bot] commented 1 month ago

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-08-07 06:34:11.405568897 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
Parties Tx size % max Mem % max CPU Min fee ₳
1 5186 5.71 2.25 0.44
2 5389 7.13 2.82 0.47
3 5590 8.56 3.39 0.49
5 5994 11.21 4.43 0.54
10 6998 18.16 7.18 0.66
56 16247 81.84 32.38 1.76

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 554 10.52 4.15 0.29
2 747 13.86 5.65 0.34
3 937 17.33 7.20 0.38
5 1307 24.65 10.44 0.48
10 2250 45.22 19.36 0.75
20 4120 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 548 22.14 8.66 0.42
2 114 659 33.89 13.40 0.55
3 171 773 47.29 18.88 0.70
4 227 879 61.71 24.85 0.87
5 284 989 77.59 31.46 1.05
6 339 1104 91.83 37.60 1.21

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 631 17.96 7.89 0.38
2 815 20.00 9.41 0.42
3 968 21.66 10.78 0.45
5 1337 26.22 13.98 0.52
10 1932 32.02 19.94 0.64
50 7891 97.23 74.37 1.82

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 645 20.98 9.39 0.42
2 780 22.37 10.77 0.44
3 867 23.42 11.83 0.46
5 1129 26.44 14.67 0.52
10 2005 35.47 23.14 0.69
50 8018 99.98 84.11 1.92

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 665 27.18 11.67 0.48
2 758 28.52 12.84 0.51
3 936 30.72 14.69 0.55
5 1324 35.02 18.39 0.62
10 1953 43.94 25.94 0.78
38 6160 97.03 71.55 1.72

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 5059 17.32 7.53 0.57
2 5184 28.46 12.47 0.70
3 5342 42.38 18.75 0.86
4 5359 55.52 24.48 1.01
5 5486 69.81 30.81 1.18
6 5774 96.60 43.08 1.50

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.95 3.36 0.46
5 1 57 5056 9.28 4.16 0.48
5 5 283 5190 13.21 6.75 0.53
5 10 569 5362 19.26 10.48 0.62
5 20 1136 5698 30.19 17.43 0.77
5 30 1705 6039 41.70 24.63 0.93
5 40 2275 6380 53.43 31.93 1.09
5 50 2849 6724 64.17 38.80 1.24
5 81 4608 7769 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-08-07 06:36:33.149155905 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.274909140
P99 9.335837979999988ms
P95 5.439494699999996ms
P50 3.9544945ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 22.703135677
P99 112.11208306000005ms
P95 31.306382599999992ms
P50 20.2459755ms
Number of Invalid txs 0
github-actions[bot] commented 1 month ago

Test Results

464 tests  ±0   457 :white_check_mark: ±0   17m 26s :stopwatch: +31s 149 suites ±0     7 :zzz: ±0    5 files   ±0     0 :x: ±0 

Results for commit b7b27109. ± Comparison against base commit 1754effe.

:recycle: This comment has been updated with latest results.