cardano-scaling / hydra

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

New docs changes #1565

Closed ch1bo closed 4 weeks ago

ch1bo commented 1 month ago

Various changes which occurred to me while reviewing (also ahead of #1558):

image

image

image


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-15 08:15:36.763171496 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.61 2.21 0.44
2 5387 6.99 2.76 0.46
3 5591 8.55 3.38 0.49
5 5993 11.17 4.41 0.54
10 7002 18.06 7.14 0.66
56 16244 81.52 32.24 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 935 17.33 7.20 0.38
5 1310 24.65 10.44 0.48
10 2247 45.22 19.36 0.75
20 4118 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 553 21.46 8.41 0.41
2 113 659 33.97 13.43 0.55
3 168 768 46.00 18.39 0.69
4 228 879 57.76 23.38 0.82
5 285 989 77.98 31.61 1.05
6 339 1100 90.13 36.97 1.19

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 641 17.96 7.89 0.38
2 826 20.22 9.49 0.42
3 942 21.74 10.81 0.45
5 1292 25.16 13.51 0.51
10 2089 35.03 21.03 0.68
46 7361 92.53 69.70 1.72

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 654 21.02 9.41 0.42
2 782 22.41 10.79 0.44
3 918 23.84 12.17 0.47
5 1334 28.03 16.01 0.55
10 2108 36.46 23.89 0.71
49 7624 95.42 80.47 1.84

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 662 27.18 11.67 0.48
2 864 29.32 13.52 0.52
3 956 30.62 14.67 0.55
5 1195 34.19 17.68 0.61
10 1941 43.67 25.82 0.77
38 6161 96.53 71.28 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 5065 17.36 7.55 0.57
2 5224 29.45 12.98 0.71
3 5350 42.54 18.83 0.87
4 5384 52.45 23.07 0.98
5 5596 72.90 32.31 1.22
6 5776 97.45 43.42 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 5023 7.56 3.20 0.46
5 1 57 5056 9.08 4.08 0.48
5 5 285 5193 13.01 6.67 0.53
5 10 568 5360 18.87 10.31 0.61
5 20 1138 5700 30.38 17.51 0.77
5 30 1709 6044 41.70 24.63 0.93
5 40 2280 6385 53.62 32.01 1.10
5 50 2847 6721 64.37 38.89 1.25
5 81 4615 7776 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-08-15 08:18:00.377536149 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 5.365816672
P99 11.884030669999994ms
P95 7.447764049999996ms
P50 4.6040814999999995ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 24.664853178
P99 56.0429396500004ms
P95 34.05472524999999ms
P50 22.4816035ms
Number of Invalid txs 0
github-actions[bot] commented 1 month ago

Test Results

468 tests  ±0   461 :white_check_mark: ±0   16m 47s :stopwatch: -37s 149 suites ±0     7 :zzz: ±0    5 files   ±0     0 :x: ±0 

Results for commit 3a351548. ± Comparison against base commit e0cc2c13.