Skip to content

Use a directory name that is the hash of the clusterPeers for etcd state #1965

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

Merged
merged 2 commits into from
May 12, 2025

Conversation

locallycompact
Copy link
Contributor

@locallycompact locallycompact commented Apr 25, 2025

This should function as an "auto-clear" when connecting to a new cluster configuration.

Copy link

github-actions bot commented Apr 25, 2025

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 - - - -
43 - - - -

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 - - - - -
9 - - - - -

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - $${\color{green}-0.38}$$ $${\color{green}-0.09}$$ -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
43 - - - -

Cost of Decrement Transaction

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

Close transaction costs

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

Contest transaction costs

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

FanOut transaction costs

UTxO, Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
(0, 10) - - - - -
(1, 10) - - - - -
(5, 10) - - - - -
(10, 10) - - - - -
(20, 10) - - - - -
(38, 10) - - - - -

Copy link

github-actions bot commented Apr 25, 2025

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 2025-05-12 11:30:12.289904719 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial c8a101a5c8ac4816b0dceb59ce31fc2258e387de828f02961d2f2045 2652
νCommit 61458bc2f297fff3cc5df6ac7ab57cefd87763b0b7bd722146a1035c 685
νHead be6ebc744208c660bf0fdc1cfbb5157477cd305de5b1777e575cbb4c 14665
μHead 1f47a42d1d6edc32ccd834acb19d5db3b2a5232f0bd7eaa8908dc519* 5284
νDeposit ae01dade3a9c346d5c93ae3ce339412b90a0b8f83f94ec6baa24e30c 1102
  • 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 5841 10.32 3.27 0.51
2 6037 12.62 4.00 0.55
3 6238 14.68 4.64 0.58
5 6645 18.38 5.79 0.63
10 7647 29.06 9.16 0.79
43 14279 98.94 30.92 1.80

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 558 2.44 1.16 0.20
2 743 3.38 1.73 0.22
3 918 4.36 2.33 0.24
5 1280 6.41 3.60 0.28
10 2179 12.13 7.25 0.40
54 10060 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 529 24.46 7.13 0.42
2 114 636 34.27 9.87 0.53
3 170 747 43.52 12.46 0.62
4 227 858 50.57 14.55 0.70
5 282 969 64.47 18.31 0.85
6 340 1081 75.37 21.35 0.96
7 396 1192 84.22 23.75 1.05
8 450 1303 92.02 26.10 1.14
9 506 1414 89.18 25.94 1.12

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1823 24.16 8.04 0.48
2 1887 24.65 8.79 0.50
3 2101 27.72 10.58 0.54
5 2460 32.82 13.65 0.62
10 3209 41.23 19.73 0.77
41 7655 97.16 58.50 1.69

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 631 22.77 7.34 0.41
2 796 25.52 8.77 0.45
3 828 24.02 9.00 0.45
5 1235 30.11 12.03 0.53
10 1961 38.53 17.72 0.68
39 6264 99.14 53.82 1.61

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 678 28.99 9.25 0.48
2 816 29.07 10.00 0.49
3 906 30.02 10.87 0.51
5 1314 37.44 14.73 0.62
10 2053 44.99 20.69 0.75
37 6187 99.00 56.43 1.63

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 683 33.69 10.49 0.53
2 834 35.73 11.79 0.56
3 961 37.74 13.07 0.59
5 1340 43.06 16.23 0.67
10 2041 53.66 22.89 0.84
29 4882 98.12 49.78 1.52

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 5732 27.01 9.04 0.69
2 5837 35.71 11.96 0.78
3 6028 45.36 15.24 0.89
4 6074 53.03 17.78 0.97
5 6284 63.57 21.33 1.09
6 6427 73.88 24.83 1.21
7 6507 78.87 26.38 1.26
8 6692 93.04 31.21 1.42
9 6707 94.63 31.69 1.44

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 5834 18.31 6.11 0.60
10 1 57 5868 21.67 7.37 0.64
10 5 284 6004 29.80 10.58 0.73
10 20 1140 6514 59.57 22.38 1.08
10 30 1708 6854 80.53 30.62 1.32
10 38 2163 7125 96.69 37.00 1.51

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 2025-05-12 11:29:56.617442478 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 12.417348876
P99 164.76112458999924ms
P95 10.51352595000001ms
P50 4.3835215000000005ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-05-12 11:28:39.618775228 UTC 889M 2898M
2025-05-12 11:28:44.618629973 UTC 952M 2807M
2025-05-12 11:28:49.618652452 UTC 966M 2786M
2025-05-12 11:28:54.618571513 UTC 966M 2786M
2025-05-12 11:28:59.618573477 UTC 985M 2766M
2025-05-12 11:29:04.618629841 UTC 987M 2763M

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 28.097840596
P99 41.78991084ms
P95 37.09491689999999ms
P50 27.007438999999998ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-05-12 11:29:18.60038049 UTC 891M 2895M
2025-05-12 11:29:23.600412162 UTC 1126M 2580M
2025-05-12 11:29:28.600663754 UTC 1201M 2447M
2025-05-12 11:29:33.600505755 UTC 1223M 2371M
2025-05-12 11:29:38.600405344 UTC 1224M 2370M
2025-05-12 11:29:43.600470515 UTC 1225M 2368M
2025-05-12 11:29:48.600473433 UTC 1227M 2366M
2025-05-12 11:29:53.600438934 UTC 1227M 2365M

@locallycompact locallycompact force-pushed the lc/etcd-hash-dir branch 2 times, most recently from 844e85d to a484a90 Compare April 25, 2025 12:51
Copy link
Member

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

Does this help with #1937?

@locallycompact
Copy link
Contributor Author

What is sufficient to test for #1937 ? Run an ABC cluster, shut down, run an ABD cluster, and pass if it doesn't crash?

@ch1bo
Copy link
Member

ch1bo commented Apr 28, 2025

What is sufficient to test for #1937 ? Run an ABC cluster, shut down, run an ABD cluster, and pass if it doesn't crash?

There are steps to reproduce in the issue. I'd expect a fix to the bug to have a user journey more closer to the expected behavior. As discussed when grooming it, removing the state directory or making it unique (as in this PR) could be part of the solution.


This PR automatically results in new etcd<hash> directories whenever changing cluster topology. How could I tell them apart? i.e. is there a way to find out which is which? Not sure if users need to know, but I'm not sure if I'd be happy about it as a user.

@locallycompact locallycompact force-pushed the lc/etcd-hash-dir branch 9 times, most recently from 5009357 to 31111cb Compare April 28, 2025 13:09
@locallycompact
Copy link
Contributor Author

Swtiched to use cardano-crypto-class and added a smoke test for multiple etcd clusters.

@github-project-automation github-project-automation bot moved this from Triage 🏥 to In progress 🕐 in ☕ Hydra Team Work May 1, 2025
@locallycompact locallycompact force-pushed the lc/etcd-hash-dir branch 5 times, most recently from 6c61b57 to 793c93f Compare May 7, 2025 13:44
@locallycompact locallycompact requested a review from a team May 8, 2025 10:54
@locallycompact locallycompact force-pushed the lc/etcd-hash-dir branch 2 times, most recently from f4b3f35 to e7ea0d4 Compare May 8, 2025 14:13
@locallycompact locallycompact enabled auto-merge (squash) May 8, 2025 15:16
@locallycompact locallycompact requested a review from ch1bo May 8, 2025 15:18
Copy link
Member

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

Also tried it manually and seems to work 👍

One thing I noticed: The errors of cluster mismatch are coming in OFTEN (sub millisecond on my local setup). We might want to fix that before we cut a release.

@github-project-automation github-project-automation bot moved this from In progress 🕐 to In review 👀 in ☕ Hydra Team Work May 8, 2025
@locallycompact locallycompact force-pushed the lc/etcd-hash-dir branch 7 times, most recently from 042c0c3 to e6258b6 Compare May 12, 2025 11:11
@locallycompact locallycompact merged commit a3047c8 into master May 12, 2025
47 of 50 checks passed
@locallycompact locallycompact deleted the lc/etcd-hash-dir branch May 12, 2025 12:11
@github-project-automation github-project-automation bot moved this from In review 👀 to Done ✔ in ☕ Hydra Team Work May 12, 2025
v0d1ch pushed a commit that referenced this pull request May 14, 2025
…ate (#1965)

This should function as an "auto-clear" when connecting to a new cluster
configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✔
Development

Successfully merging this pull request may close these issues.

3 participants