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

Add type class roots to weeder and remove unused type classes. #1767

Merged
merged 33 commits into from
Jan 2, 2025

Conversation

locallycompact
Copy link
Contributor

@locallycompact locallycompact commented Dec 19, 2024

No description provided.

@locallycompact locallycompact marked this pull request as draft December 19, 2024 19:53
Copy link

github-actions bot commented Dec 19, 2024

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 - - - -
3 - - - -
5 - - - -
10 - - - -
44 - - - -

Commit transaction costs

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

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 - - - - -
2 - - - - -
3 - - - - -
4 - - - - -
5 - - - - -
6 - - - - -
7 - - - - -
8 - - - - -

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - +0.39 +0.09 +0.01
5 - +0.39 +0.1 -
10 - - - -
43 - - - -

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
45 - - - -

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
41 - - - -

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
33 - - - -

Abort transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
4 - - - -
5 - - - -
6 - - - -
7 - - - -
8 - - - -
9 - - - -
10 - - - -

Copy link

github-actions bot commented Dec 19, 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-31 17:09:23.882792076 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 5350e9d521552ebfd9e846fd70c3b801f716fc14296134ec0fb71e97 14495
μHead 482c3ce15cde05bc905b915ccfa2546e500be1c5d722389026c37aa3* 5615
νDeposit de09cec5f84eedaf64186cb52ba4ee6e74e6fc368af25b90d457f352 1118
  • 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 6199 10.33 3.30 0.53
2 6398 12.21 3.88 0.56
3 6599 14.43 4.59 0.59
5 7008 18.19 5.75 0.65
10 8009 28.76 9.09 0.80
44 14846 98.11 30.88 1.82

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 741 3.40 1.74 0.22
3 923 4.39 2.34 0.24
5 1276 6.46 3.61 0.28
10 2173 12.24 7.28 0.40
54 10063 99.20 68.72 1.89

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 24.24 7.08 0.42
2 112 670 33.95 9.78 0.52
3 171 782 42.16 12.14 0.61
4 226 893 52.11 14.93 0.72
5 284 1004 60.74 17.42 0.81
6 336 1116 69.18 19.80 0.90
7 394 1227 77.55 22.16 0.99
8 451 1338 92.09 26.18 1.14

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1833 23.66 7.91 0.48
2 1987 25.18 9.05 0.51
3 2190 27.62 10.58 0.55
5 2553 32.57 13.61 0.62
10 3165 39.27 18.98 0.74
46 8201 99.09 62.43 1.76

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 632 22.72 7.32 0.41
2 780 23.43 8.18 0.43
3 1034 28.06 10.15 0.50
5 1198 27.83 11.41 0.51
10 1978 37.73 17.52 0.67
41 6857 98.41 55.23 1.65

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 686 28.65 9.16 0.48
2 912 30.96 10.67 0.52
3 1044 30.86 11.38 0.53
5 1306 34.09 13.72 0.58
10 2180 47.41 21.53 0.78
39 6627 99.20 58.50 1.67

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 705 33.39 10.43 0.53
2 931 35.95 12.00 0.57
3 998 37.33 12.98 0.59
5 1361 42.35 16.06 0.67
10 2061 52.69 22.67 0.83
31 5304 98.99 51.94 1.56

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 6087 26.25 8.87 0.69
2 6189 31.48 10.60 0.75
3 6360 40.91 13.84 0.86
4 6503 53.07 17.97 0.99
5 6465 56.87 19.10 1.03
6 6781 71.44 24.20 1.20
7 6916 77.68 26.28 1.27
8 7167 91.26 31.04 1.43
9 7169 95.64 32.37 1.47

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 6197 18.03 6.15 0.61
10 5 285 6367 27.09 9.82 0.72
10 10 570 6537 37.61 14.03 0.84
10 20 1138 6876 56.10 21.50 1.06
10 30 1705 7214 76.79 29.78 1.30
10 40 2277 7556 95.65 37.39 1.53
10 41 2334 7590 98.50 38.51 1.56

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-31 17:12:09.640316326 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.676047823
P99 7.906363959999981ms
P95 5.697665900000001ms
P50 4.51471ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 22.738358061
P99 108.54839083999997ms
P95 29.84868759999999ms
P50 20.7199885ms
Number of Invalid txs 0

@locallycompact
Copy link
Contributor Author

weeder apparently ignores the use of an associated type family when deciding whether a type class is used. I think I agree with that.

Copy link

github-actions bot commented Dec 19, 2024

Test Results

  5 files  ±0  165 suites  ±0   30m 38s ⏱️ -1s
563 tests ±0  557 ✅ ±0  6 💤 ±0  0 ❌ ±0 
565 runs  ±0  559 ✅ ±0  6 💤 ±0  0 ❌ ±0 

Results for commit 05e7721. ± Comparison against base commit 3cec2ff.

♻️ This comment has been updated with latest results.

@locallycompact locallycompact force-pushed the lc/remove-type-class-roots branch 7 times, most recently from b4050f8 to 5f25aa5 Compare December 20, 2024 10:20
@locallycompact locallycompact changed the title Be explicit about type-class-roots Add type class roots to weeder and remove unused type classes. Dec 20, 2024
@locallycompact locallycompact requested a review from a team December 20, 2024 10:28
@locallycompact locallycompact force-pushed the lc/remove-type-class-roots branch from 6d0955a to 5c2e2db Compare December 20, 2024 10:31
@locallycompact locallycompact marked this pull request as ready for review December 20, 2024 10:35
@noonio noonio force-pushed the lc/remove-type-class-roots branch from 5c2e2db to bb8c081 Compare December 30, 2024 14:13
weeder.toml Outdated Show resolved Hide resolved
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.

This mostly looks great; just a couple of comments and requests and one discussion about why some particular types have been unwrapped/removed.

@locallycompact locallycompact force-pushed the lc/remove-type-class-roots branch from 3022c9b to 90a4763 Compare December 31, 2024 16:58
@locallycompact locallycompact force-pushed the lc/remove-type-class-roots branch from 90a4763 to 05e7721 Compare December 31, 2024 17:07
weeder.toml Show resolved Hide resolved
weeder.toml Show resolved Hide resolved
weeder.toml Show resolved Hide resolved
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.

Looking good!

@locallycompact locallycompact added this pull request to the merge queue Jan 2, 2025
Merged via the queue into master with commit c3fe7c1 Jan 2, 2025
27 checks passed
@locallycompact locallycompact deleted the lc/remove-type-class-roots branch January 2, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants