cardano-scaling / hydra

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

Incremental commits off-chain #1541

Open noonio opened 1 month ago

noonio commented 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-09-14 08:53:59.590401439 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 92eba1d473b3616388b42f80f77469c5d67a10b34b296d73c8f7bd44 10311
μHead 9b12a3f55e523a1d87a6335ef083af78a77249ea233796e518b15f61* 4555
νDeposit e0091235d453844ca593223db7d93b67b27afff4aac13bda443e0e16 2791
Parties Tx size % max Mem % max CPU Min fee ₳
1 5143 5.84 2.31 0.44
2 5349 7.17 2.84 0.46
3 5546 8.46 3.34 0.49
5 5949 11.32 4.48 0.54
10 6954 18.38 7.28 0.66
56 16202 81.57 32.27 1.75

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 566 10.52 4.15 0.29
2 758 13.86 5.65 0.34
3 941 17.33 7.20 0.38
5 1320 24.65 10.44 0.48
10 2255 45.22 19.36 0.75
20 4128 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 21.46 8.41 0.41
2 113 671 33.89 13.40 0.55
3 171 782 46.04 18.41 0.69
4 226 893 58.72 23.73 0.84
5 282 1004 76.06 30.89 1.03
6 338 1116 92.19 37.74 1.22

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 653 17.70 7.84 0.38
2 731 17.87 8.63 0.39
3 862 19.15 9.90 0.41
5 1349 27.37 14.63 0.54
10 2144 36.32 21.97 0.70
48 7883 99.97 76.08 1.85

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 637 22.02 9.57 0.43
2 843 23.92 11.38 0.46
3 946 25.48 12.84 0.49
5 1169 28.19 15.46 0.54
10 2120 38.16 24.76 0.73
46 7653 99.38 82.73 1.89

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 734 28.55 12.15 0.50
2 842 30.48 13.74 0.53
3 1061 32.77 15.70 0.57
5 1238 36.09 18.51 0.63
10 2089 46.71 27.65 0.82
36 6209 99.55 72.97 1.75

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 5027 17.49 7.60 0.57
2 5192 29.39 12.96 0.71
3 5269 41.43 18.27 0.85
4 5532 59.33 26.41 1.06
5 5584 75.97 33.77 1.25
6 5599 90.18 40.01 1.41

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 4981 8.12 3.44 0.46
5 1 57 5015 8.47 3.81 0.47
5 5 285 5151 13.19 6.74 0.53
5 10 568 5319 19.04 10.38 0.61
5 20 1137 5658 30.36 17.50 0.77
5 30 1708 6002 41.68 24.62 0.93
5 40 2275 6338 53.60 32.00 1.09
5 50 2843 6676 64.34 38.87 1.24
5 81 4608 7728 99.51 61.00 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-09-14 08:56:54.549629371 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.151041118
P99 6.576178489999965ms
P95 4.9889929ms
P50 4.0202415ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.282148431
P99 57.51565698000002ms
P95 32.4138411ms
P50 21.0381635ms
Number of Invalid txs 0
ch1bo commented 3 weeks ago

@noonio When we continue work here, we should take a step back again given the new overall design of #199 with details from #1571. The overall off-chain story has not changed much, but is basically separated in two parts: