Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hydra-plutus: Remove unused functions #1699

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

locallycompact
Copy link
Contributor

@locallycompact locallycompact commented Oct 10, 2024

These are no longer used.

Copy link

github-actions bot commented Oct 10, 2024

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-10-14 07:09:37.434791895 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial b512161ccb0652d7e9a0b540e4a3c808f73d6558a4bcabf374d85880 3969
νCommit ea444d37d226e71eef73ac78d149750da977feb588900135bf9e8221 692
νHead 2253ddd95837c7aacc8635a971caaea743434152dd8dd2849bdf4162 10797
μHead 4d648ca239040b0e87901835aa11423e7aa3bd947ce6befe7db1bae8* 4508
νDeposit 1a011f23b139a6426767026bde10319546485d553219a5848cdac4e5 2993
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per head.

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 5094 5.71 2.25 0.44
2 5298 7.09 2.80 0.46
3 5496 8.37 3.30 0.48
5 5901 11.12 4.39 0.53
10 6907 18.10 7.16 0.65
57 16355 82.91 32.79 1.78

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 569 10.84 4.26 0.29
2 755 14.31 5.80 0.34
3 941 17.92 7.39 0.39
5 1317 25.56 10.73 0.49
10 2257 47.11 19.97 0.77
19 3945 94.71 39.81 1.38

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 20.58 7.85 0.40
2 114 671 28.89 10.99 0.49
3 170 782 36.80 14.01 0.58
4 226 893 44.10 16.77 0.67
5 281 1004 55.46 21.06 0.79
6 336 1120 67.01 25.40 0.92
7 393 1227 64.06 24.44 0.90
8 450 1342 83.59 31.68 1.11
9 505 1449 77.97 29.73 1.06

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 643 18.68 8.17 0.39
2 831 21.03 9.84 0.43
3 926 20.75 10.47 0.43
5 1350 25.78 13.93 0.52
10 2075 33.36 20.76 0.66
49 8033 98.87 76.35 1.85

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 648 20.79 9.29 0.41
2 783 22.22 10.73 0.44
3 906 23.78 12.21 0.47
5 1234 27.05 15.41 0.53
10 1904 34.45 22.69 0.68
50 7982 98.97 85.86 1.92

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 674 26.76 11.46 0.48
2 807 28.53 13.01 0.51
3 985 30.72 14.91 0.55
5 1379 35.01 18.69 0.63
10 2040 43.74 26.42 0.78
38 6203 96.54 72.91 1.73

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 5000 15.51 6.64 0.54
2 5123 21.94 9.44 0.62
3 5164 27.93 11.97 0.69
4 5381 32.65 14.09 0.75
5 5416 39.08 16.77 0.83
6 5794 50.77 22.31 0.98
7 5787 56.49 24.62 1.04
8 5988 63.99 27.96 1.13
9 6225 69.28 30.49 1.20
10 6142 72.89 31.58 1.24
11 6253 78.68 34.13 1.31
12 6522 93.20 40.78 1.48

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 ₳
10 0 0 5089 10.27 4.30 0.49
10 1 57 5124 10.94 4.80 0.50
10 5 285 5260 16.62 8.13 0.57
10 10 571 5431 21.47 11.32 0.64
10 20 1139 5768 32.96 18.47 0.80
10 30 1708 6110 45.04 25.88 0.97
10 40 2279 6450 56.74 33.12 1.13
10 50 2845 6787 68.44 40.36 1.29
10 76 4327 7671 99.08 59.31 1.72

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-10-14 07:11:04.441004699 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.017921890
P99 5.997654409999961ms
P95 4.71238535ms
P50 3.8714684999999998ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 21.480453413
P99 42.11395108999932ms
P95 28.352324399999997ms
P50 19.593608500000002ms
Number of Invalid txs 0

Copy link

github-actions bot commented Oct 10, 2024

Test Results

544 tests  ±0   538 ✅ ±0   25m 35s ⏱️ -19s
162 suites ±0     6 💤 ±0 
  7 files   ±0     0 ❌ ±0 

Results for commit d45c7fe. ± Comparison against base commit 4801d02.

♻️ This comment has been updated with latest results.

@locallycompact locallycompact force-pushed the lc/remove-unused-functions branch 2 times, most recently from 6af57b7 to 9d68f7b Compare October 14, 2024 06:04
@locallycompact locallycompact force-pushed the lc/remove-unused-functions branch from 9d68f7b to d45c7fe Compare October 14, 2024 07:03
Copy link

Transaction cost differences

Script summary

Name Size (Bytes)
νInitial -
νCommit -
νHead -
μHead -
νDeposit -

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - +0.23 +0.1 -
3 +2 +0.32 +0.14 +0.01
5 $${\color{green}-3.00}$$ $${\color{green}-0.19}$$ $${\color{green}-0.08}$$ -
10 - $${\color{green}-0.19}$$ $${\color{green}-0.08}$$ -
57 $${\color{green}-1.00}$$ $${\color{green}-0.09}$$ $${\color{green}-0.03}$$ -

Commit transaction costs

UTxO Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 +2 - - -
5 +2 - - -
10 +6 - - -
19 - - - -

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 - +4 $${\color{green}-0.74}$$ $${\color{green}-0.27}$$ $${\color{green}-0.01}$$
2 +2 +1 $${\color{green}-0.01}$$ - -
3 - - - - -
4 +1 - $${\color{green}-2.47}$$ $${\color{green}-0.91}$$ $${\color{green}-0.03}$$
5 +1 $${\color{green}-5.00}$$ +6.67 +2.48 +0.07
6 +4 +4 +5.07 +1.85 +0.05
7 $${\color{green}-1.00}$$ - $${\color{green}-6.10}$$ $${\color{green}-2.25}$$ $${\color{green}-0.07}$$
8 - $${\color{green}-4.00}$$ +13.42 +4.94 +0.14
9 +2 - +13.43 +4.92 +0.14
10 - - $${\color{green}-3.79}$$ $${\color{green}-1.44}$$ $${\color{green}-0.04}$$

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 +28.0 $${\color{green}-0.04}$$ - +0.01
2 $${\color{green}-13.00}$$ $${\color{green}-0.49}$$ $${\color{green}-0.27}$$ -
3 $${\color{green}-70.00}$$ $${\color{green}-1.40}$$ $${\color{green}-0.60}$$ $${\color{green}-0.02}$$
5 +62.0 +2.04 +0.84 +0.02
10 +51.0 +1.13 +0.4 +0.02

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 $${\color{green}-1.00}$$ +0.04 - -
2 $${\color{green}-17.00}$$ $${\color{green}-0.41}$$ $${\color{green}-0.33}$$ $${\color{green}-0.01}$$
3 $${\color{green}-92.00}$$ $${\color{green}-0.29}$$ $${\color{green}-0.33}$$ $${\color{green}-0.01}$$
5 $${\color{green}-43.00}$$ $${\color{green}-0.37}$$ $${\color{green}-0.32}$$ $${\color{green}-0.01}$$
10 $${\color{green}-329.00}$$ $${\color{green}-2.00}$$ $${\color{green}-1.75}$$ $${\color{green}-0.05}$$
50 $${\color{green}-281.00}$$ $${\color{green}-0.79}$$ $${\color{green}-1.10}$$ $${\color{green}-0.02}$$

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 +11 $${\color{green}-0.04}$$ - -
2 $${\color{green}-70.00}$$ $${\color{green}-0.41}$$ $${\color{green}-0.36}$$ $${\color{green}-0.01}$$
3 $${\color{green}-43.00}$$ $${\color{green}-0.49}$$ $${\color{green}-0.37}$$ $${\color{green}-0.01}$$
5 +26 $${\color{green}-0.16}$$ $${\color{green}-0.05}$$ -
10 $${\color{green}-208.00}$$ $${\color{green}-1.62}$$ $${\color{green}-1.36}$$ $${\color{green}-0.03}$$
39 $${\color{green}-26.00}$$ +0.31 $${\color{green}-0.10}$$ -

Abort transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 +9 $${\color{green}-0.17}$$ $${\color{green}-0.07}$$ -
2 +19 $${\color{green}-0.03}$$ - -
3 +75 +0.57 +0.34 +0.01
4 $${\color{green}-109.00}$$ $${\color{green}-1.08}$$ $${\color{green}-0.63}$$ $${\color{green}-0.02}$$
5 $${\color{green}-231.00}$$ $${\color{green}-7.62}$$ $${\color{green}-3.78}$$ $${\color{green}-0.10}$$
6 +87 +1.35 +0.73 +0.02
7 $${\color{green}-169.00}$$ $${\color{green}-3.74}$$ $${\color{green}-1.94}$$ $${\color{green}-0.05}$$
8 $${\color{green}-89.00}$$ +2.42 +0.96 +0.02
9 +103 +2.38 +1.18 +0.03
10 $${\color{green}-24.00}$$ +3.69 +1.67 +0.04
11 $${\color{green}-51.00}$$ +1.18 +0.37 +0.01
12 +29 +3.72 +1.7 +0.04
13 +194 +8.32 +3.9 +0.11

FanOut transaction costs

Parties UTxO UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
10 - - +1 +0.39 +0.17 -
10 - - +1 +0.5 +0.21 -
10 - +2 +2 $${\color{green}-0.20}$$ $${\color{green}-0.08}$$ $${\color{green}-0.01}$$
10 - +1 +2 $${\color{green}-0.19}$$ $${\color{green}-0.08}$$ -
10 - $${\color{green}-2.00}$$ $${\color{green}-2.00}$$ +0.37 +0.16 -
10 - $${\color{green}-1.00}$$ $${\color{green}-1.00}$$ +0.39 +0.17 -
10 - - - - - -
10 - $${\color{green}-3.00}$$ $${\color{green}-3.00}$$ +0.2 +0.08 -
10 - $${\color{green}-8.00}$$ $${\color{green}-9.00}$$ +0.56 +0.25 +0.01

@locallycompact locallycompact requested a review from a team October 15, 2024 11:50
@locallycompact locallycompact added this pull request to the merge queue Oct 15, 2024
Merged via the queue into master with commit b5b80ef Oct 15, 2024
29 checks passed
@locallycompact locallycompact deleted the lc/remove-unused-functions branch October 15, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants