cardano-scaling / hydra

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

Revert "Move hydra-spec to input repository (#1512)" #1542

Closed locallycompact closed 1 month ago

locallycompact commented 1 month ago

This reverts commit b39102012ae183f60efc0183634ed1c9a6ec7b06.

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-07-31 11:03:25.710571405 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 5189 5.88 2.33 0.44
2 5389 7.09 2.80 0.46
3 5590 8.37 3.30 0.49
5 5993 11.45 4.53 0.54
10 6996 18.11 7.16 0.66
56 16246 81.43 32.21 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 749 13.86 5.65 0.34
3 937 17.33 7.20 0.38
5 1310 24.65 10.44 0.48
10 2243 45.22 19.36 0.75
20 4121 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 549 22.17 8.68 0.42
2 113 659 32.95 13.05 0.54
3 170 769 44.09 17.69 0.67
4 225 883 57.47 23.28 0.82
5 284 989 75.46 30.69 1.02
6 339 1100 88.19 36.24 1.17

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 639 17.71 7.79 0.38
2 721 17.84 8.52 0.39
3 942 20.69 10.33 0.43
5 1243 25.28 13.63 0.51
10 2000 33.05 20.32 0.65
47 7645 96.34 71.78 1.78

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 638 20.98 9.39 0.42
2 815 22.82 11.12 0.45
3 961 24.34 12.54 0.48
5 1171 26.78 14.97 0.53
10 2076 35.97 23.53 0.70
50 7867 97.95 83.06 1.89

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 666 27.18 11.67 0.48
2 763 28.56 12.86 0.51
3 894 30.22 14.32 0.54
5 1203 34.19 17.68 0.61
10 1899 43.36 25.53 0.77
38 6253 96.77 71.51 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 5081 17.32 7.55 0.57
2 5128 27.59 12.01 0.69
3 5289 41.61 18.34 0.85
4 5494 58.19 25.81 1.05
5 5581 76.14 33.81 1.25
6 5804 98.99 44.17 1.52

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 5023 7.56 3.20 0.46
5 1 57 5056 8.88 3.99 0.47
5 5 285 5192 13.30 6.79 0.54
5 10 569 5361 19.06 10.39 0.62
5 20 1139 5701 30.97 17.76 0.78
5 30 1708 6042 42.10 24.80 0.94
5 40 2278 6383 53.03 31.76 1.09
5 50 2849 6723 64.56 38.97 1.25
5 81 4608 7769 99.53 61.01 1.74

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 11:05:38.149076054 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.639560088
P99 8.03271115999996ms
P95 6.3491551999999984ms
P50 4.4118200000000005ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.561367000
P99 54.83958938000007ms
P95 31.732385849999975ms
P50 21.488575ms
Number of Invalid txs 0