input-output-hk / hydra

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

Remove redundant fee calculation. #1447

Closed locallycompact closed 1 month ago

locallycompact commented 1 month ago

This does not seem to affect the benchmarks.


github-actions[bot] commented 1 month ago

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-05-22 11:27:39.357911711 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial bccf2a430c016bc960fbf31b02694011cd399d20da8882aac9d33611 4110
νCommit 56b0f0b597150e619c76bed60683f3b1e42d7bc0685ed951b882bfc5 1975
νHead 86bff95ba20e9d1d1b34899a56d86bbacc9fed999260b27dcc92d128 9351
μHead 88f533cf67cd0fc93d7d9ccf0a8b1d69ffd1208a825efbebbc1d36ba* 4213
Parties Tx size % max Mem % max CPU Min fee ₳
1 4792 8.78 3.35 0.46
2 4993 10.81 4.13 0.49
3 5197 12.70 4.86 0.52
5 5600 16.43 6.29 0.57
10 6605 26.12 10.01 0.72
48 14248 99.77 38.28 1.86

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 559 10.24 4.04 0.29
2 745 13.88 5.64 0.34
3 937 17.66 7.29 0.39
5 1310 25.66 10.74 0.49
10 2241 48.19 20.30 0.78
19 3939 97.83 40.79 1.41

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 544 16.52 6.53 0.35
2 113 658 27.39 10.90 0.48
3 171 764 38.96 15.65 0.61
4 227 874 54.25 21.87 0.78
5 283 984 67.99 27.63 0.94
6 341 1095 87.73 35.70 1.16

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 593 8.34 4.61 0.28
2 735 9.04 5.68 0.30
3 949 10.07 7.06 0.32
5 1224 11.39 9.16 0.36
10 1958 16.11 15.34 0.48
50 4571 39.28 23.49 0.84

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 614 8.69 4.74 0.28
2 745 9.34 5.78 0.30
3 955 10.51 7.22 0.33
5 1247 12.33 9.66 0.37
10 1873 15.60 14.70 0.46
50 8000 51.05 62.97 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 4584 13.89 5.75 0.51
2 4786 27.78 12.11 0.67
3 4950 42.28 18.56 0.84
4 5020 56.21 24.67 1.00
5 5089 72.20 31.67 1.19
6 5357 97.67 43.05 1.49

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 4627 8.27 3.45 0.45
5 1 57 4661 9.00 3.99 0.46
5 5 285 4798 13.61 6.84 0.52
5 10 570 4967 19.16 10.31 0.60
5 20 1136 5304 30.69 17.44 0.76
5 30 1707 5646 42.43 24.67 0.92
5 40 2277 5986 53.96 31.81 1.08
5 50 2846 6326 65.29 38.86 1.24
5 79 4495 7308 99.21 59.77 1.70

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-05-22 11:29:51.106265295 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.487332236
P99 7.6383627299999945ms
P95 5.43188325ms
P50 4.2198744999999995ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 20.910332317
P99 45.783171950000295ms
P95 28.91570675ms
P50 19.123257000000002ms
Number of Invalid txs 0