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

Remove unused functions #1762

Merged
merged 57 commits into from
Dec 17, 2024
Merged

Remove unused functions #1762

merged 57 commits into from
Dec 17, 2024

Conversation

locallycompact
Copy link
Contributor

@locallycompact locallycompact commented Dec 8, 2024

Every function that is not used in this codebase has been removed, with the few exceptions listed in the weeder roots.

A weeder check has been added to ensure no unused functions sneak back in.

Anything that is actually really needed can either be readded from history, or upstreamed to a library or form a new library so that it can be discovered in hoogle.


  • CHANGELOG updated or not needed
  • Documentation updated or not needed
  • Haddocks updated or not needed
  • No new TODOs introduced or explained herafter

Copy link

github-actions bot commented Dec 8, 2024

Transaction cost differences

No cost or size differences found

Copy link

github-actions bot commented Dec 8, 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-12-17 14:06:10.335399847 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 00a6ddbc130ab92f5b7cb8d1ccd8d79eca5bfe25f6843c07b62841f0 2667
νCommit 3e5a776bcee213e3dfd15806952a10ac5590e3e97d09d62eb99266b2 690
νHead 8fc2a74df32d01d1db56b3acb561831ef9c9970123079423abfcb86e 12622
μHead c40e78e78083a4c137734abe9ac4070cc978842e9755fe88e0c7b922* 11133
νDeposit 2feb47889a4f658dc593cefcb0e37d584b9431944f08a687f3dab4af 4865
  • 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 11717 9.25 3.04 0.76
2 11916 10.94 3.58 0.79
3 12117 12.38 4.03 0.81
5 12521 16.50 5.41 0.87
10 13527 24.59 7.99 1.00
24 16343 49.13 15.96 1.38

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 561 2.45 1.17 0.20
2 740 3.40 1.74 0.22
3 919 4.39 2.34 0.24
5 1282 6.46 3.61 0.29
10 2168 12.24 7.28 0.40
54 10072 99.20 68.72 1.89

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 24.83 7.22 0.43
2 114 671 33.79 9.76 0.52
3 169 782 39.57 11.52 0.59
4 227 893 49.75 14.35 0.69
5 283 1004 60.37 17.31 0.81
6 340 1116 65.69 19.05 0.87
7 395 1227 85.50 24.17 1.07
8 448 1342 82.40 23.87 1.05
9 506 1453 96.31 27.44 1.19

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 646 22.63 7.31 0.41
2 763 23.76 8.30 0.44
3 863 23.84 8.96 0.45
5 1168 28.47 11.61 0.52
10 1822 34.96 16.75 0.63
45 7047 97.87 57.76 1.67

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 673 24.38 8.03 0.43
2 786 25.94 9.18 0.46
3 956 28.11 10.62 0.50
5 1293 31.71 13.21 0.56
10 2049 40.73 19.60 0.71
43 6808 96.13 59.94 1.66

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 695 30.47 9.65 0.50
2 841 32.31 10.89 0.53
3 988 34.70 12.38 0.56
5 1436 39.65 15.49 0.65
10 1944 48.32 21.35 0.78
34 5759 99.99 54.57 1.60

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 11631 25.67 8.74 0.93
2 11706 31.13 10.54 0.99
3 11881 43.30 14.77 1.13
4 11968 48.81 16.57 1.19
5 12205 61.51 21.00 1.34
6 12221 66.02 22.49 1.38
7 12348 75.90 25.80 1.49
8 12484 84.44 28.75 1.59
9 12869 99.60 34.03 1.77
10 12529 97.09 32.89 1.72

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 11714 17.34 5.93 0.85
10 1 57 11748 19.19 6.70 0.87
10 5 285 11884 27.12 9.93 0.96
10 10 568 12053 37.32 14.09 1.08
10 20 1139 12393 54.54 21.23 1.29
10 30 1707 12733 72.91 28.78 1.51
10 40 2277 13073 90.87 36.19 1.72
10 44 2505 13209 98.28 39.24 1.81

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-12-17 14:09:02.445530309 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 3.888677020
P99 7.069562449999987ms
P95 4.474042450000001ms
P50 3.7419314999999997ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 23.314100513
P99 118.09942983ms
P95 32.08553775ms
P50 20.273186ms
Number of Invalid txs 0

Copy link

github-actions bot commented Dec 8, 2024

Test Results

  5 files  ±0  162 suites  ±0   32m 32s ⏱️ -59s
556 tests +1  550 ✅ +1  6 💤 ±0  0 ❌ ±0 
558 runs  +1  552 ✅ +1  6 💤 ±0  0 ❌ ±0 

Results for commit 0a7d463. ± Comparison against base commit d85f526.

♻️ This comment has been updated with latest results.

@locallycompact locallycompact force-pushed the lc/remove-unused-functions branch 4 times, most recently from a7591dc to cf7893f Compare December 8, 2024 15:16
@locallycompact locallycompact requested a review from a team December 8, 2024 16:13
@locallycompact locallycompact force-pushed the lc/remove-unused-functions branch 16 times, most recently from db28f63 to a9b4b63 Compare December 9, 2024 05:52
@noonio noonio force-pushed the lc/remove-unused-functions branch from 9ee86e6 to 6f939f4 Compare December 17, 2024 12:46
Copy link
Contributor

@noonio noonio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@noonio noonio added this pull request to the merge queue Dec 17, 2024
Merged via the queue into master with commit 9bb093a Dec 17, 2024
27 checks passed
@noonio noonio deleted the lc/remove-unused-functions branch December 17, 2024 14:53
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