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 multicast reqSn step on decrementTx #1536

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

ffakenz
Copy link
Contributor

@ffakenz ffakenz commented Jul 29, 2024

This PR reduces the number of network messages in the presence of decrementTx, by avoiding unnecessary snapshot signature round-trips between peers.

Removed multicast reqSn step on decrementTx from chain.

Since it is triggered by a chain observation, we expect/assume everyone will eventually observe it and continue cooperating.


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

@ffakenz ffakenz self-assigned this Jul 29, 2024
Copy link

github-actions bot commented Jul 29, 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-07-29 17:17:03.342501415 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 2fac819a1f4f14e29639d1414220d2a18b6abd6b8e444d88d0dda8ff 3799
νCommit 2043a9f1a685bcf491413a5f139ee42e335157c8c6bc8d9e4018669d 1743
νHead 7ae23bc9f0833a5689b9fc812dd92fbe9dac881a632f14b28e8eb8db 10193
μHead 3ebfb5b268e0c94200e2c8a8eeebf704aabf303a769af602edb3603a* 4607
  • 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 5188 5.75 2.27 0.44
2 5390 7.36 2.91 0.47
3 5588 8.41 3.32 0.49
5 5993 11.12 4.39 0.54
10 6999 18.30 7.24 0.66
56 16250 81.43 32.21 1.76

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 559 10.52 4.15 0.29
2 749 13.86 5.65 0.34
3 934 17.33 7.20 0.38
5 1310 24.65 10.44 0.48
10 2243 45.22 19.36 0.75
20 4119 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 549 22.14 8.66 0.42
2 114 659 32.17 12.76 0.53
3 170 769 44.11 17.70 0.67
4 227 883 60.85 24.51 0.86
5 283 989 72.19 29.45 0.99
6 339 1100 92.68 37.90 1.22

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 645 17.96 7.90 0.38
2 813 20.38 9.54 0.42
3 848 19.24 9.80 0.41
5 1238 25.56 13.74 0.51
10 1981 32.72 20.19 0.65
49 8043 97.89 73.83 1.83

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 653 21.02 9.41 0.42
2 837 22.57 10.96 0.45
3 918 23.96 12.22 0.47
5 1191 26.66 14.93 0.53
10 1991 35.38 23.02 0.69
49 7894 97.30 82.44 1.88

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 674 27.18 11.67 0.48
2 811 28.94 13.18 0.51
3 1046 31.55 15.39 0.56
5 1292 34.77 18.19 0.62
10 2092 44.50 26.55 0.79
39 6290 98.22 72.75 1.75

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 4978 13.91 5.81 0.52
2 5205 28.47 12.49 0.70
3 5402 43.89 19.49 0.88
4 5407 57.07 25.22 1.03
5 5748 80.00 35.75 1.31
6 5782 97.51 43.45 1.51

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 ₳
5 0 0 5022 7.95 3.36 0.46
5 1 57 5056 9.28 4.16 0.48
5 5 283 5191 13.80 7.01 0.54
5 10 570 5362 19.06 10.39 0.62
5 20 1140 5703 30.38 17.51 0.77
5 30 1708 6042 41.70 24.63 0.93
5 40 2278 6382 53.43 31.93 1.09
5 50 2849 6724 64.37 38.89 1.25
5 80 4555 7739 98.00 60.13 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-07-29 17:20:06.167497031 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.188430699
P99 6.779493459999981ms
P95 5.1406894ms
P50 4.020124ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.575620042
P99 117.57211335000004ms
P95 32.2091482ms
P50 20.7671535ms
Number of Invalid txs 0

@ffakenz ffakenz force-pushed the ensemble/dont-reqsn-on-decrementTx branch 2 times, most recently from 01e651f to dc81266 Compare July 29, 2024 11:50
Copy link

github-actions bot commented Jul 29, 2024

Test Results

464 tests   - 1   457 ✅  - 1   17m 57s ⏱️ +28s
149 suites ±0     7 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 978152f. ± Comparison against base commit e1745f2.

This pull request removes 1 test.
Hydra.HeadLogic/Coordinated Head Protocol/Decommit ‑ emits snapshot onDecrementTx with cleared decommitTx

♻️ This comment has been updated with latest results.

@ffakenz ffakenz marked this pull request as ready for review July 29, 2024 12:16
@ffakenz ffakenz changed the title Remove reqSn on decrementTx Remove multicast reqSn step on decrementTx Jul 29, 2024
@ffakenz ffakenz requested review from ch1bo and a team July 29, 2024 12:18
Copy link
Collaborator

@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.

It's a bit unfortunate that this is only one commit. In the end the rename should have been a separate PR.

hydra-plutus/scripts/mHead.plutus Outdated Show resolved Hide resolved
@ffakenz ffakenz force-pushed the ensemble/dont-reqsn-on-decrementTx branch from dc81266 to bf73a8e Compare July 29, 2024 16:46
@ffakenz ffakenz force-pushed the ensemble/dont-reqsn-on-decrementTx branch from bf73a8e to 978152f Compare July 29, 2024 16:48
Copy link
Collaborator

@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.

Good catch and thanks for explaining why in the PR description!

@ffakenz ffakenz merged commit a2cc96d into master Jul 30, 2024
21 checks passed
@ffakenz ffakenz deleted the ensemble/dont-reqsn-on-decrementTx branch July 30, 2024 07: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