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

Prevent empty decommits #1534

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Prevent empty decommits #1534

merged 1 commit into from
Jul 26, 2024

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Jul 25, 2024

fix #1502

Add a test that convinces us empty inputs in decommit tx are prevented.


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

@v0d1ch v0d1ch self-assigned this Jul 25, 2024
@v0d1ch v0d1ch requested a review from a team July 25, 2024 12:26
Copy link

github-actions bot commented Jul 25, 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-26 07:49:08.76202285 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 5189 5.81 2.30 0.44
2 5389 7.03 2.77 0.46
3 5588 8.73 3.46 0.49
5 5991 11.36 4.50 0.54
10 6998 18.11 7.16 0.66
56 16244 81.70 32.32 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 936 17.33 7.20 0.38
5 1311 24.65 10.44 0.48
10 2239 45.22 19.36 0.75
20 4121 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 552 22.14 8.66 0.42
2 113 659 32.95 13.05 0.54
3 169 769 44.13 17.71 0.67
4 226 883 62.47 25.13 0.87
5 284 989 73.31 29.88 1.00
6 340 1100 88.70 36.45 1.18

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 614 17.93 7.87 0.38
2 826 20.27 9.50 0.42
3 987 22.67 11.15 0.46
5 1252 24.37 13.22 0.50
10 2096 34.73 20.94 0.67
49 7930 98.47 74.06 1.83

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 677 20.94 9.40 0.42
2 788 22.41 10.79 0.44
3 1020 24.71 12.88 0.49
5 1243 27.21 15.41 0.54
10 2087 36.30 23.74 0.71
50 7922 98.90 83.34 1.90

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 670 27.10 11.64 0.48
2 763 28.48 12.83 0.51
3 1041 31.47 15.35 0.56
5 1251 34.68 18.06 0.62
10 2150 44.85 26.87 0.80
38 6102 97.11 71.39 1.72

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 5057 17.32 7.53 0.57
2 5202 28.50 12.50 0.70
3 5250 40.47 17.76 0.84
4 5490 59.48 26.43 1.06
5 5652 78.45 34.99 1.29
6 5703 96.17 42.77 1.49

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.56 3.20 0.46
5 1 57 5057 8.88 3.99 0.47
5 5 285 5192 13.60 6.92 0.54
5 10 568 5360 19.26 10.48 0.62
5 20 1141 5703 30.58 17.60 0.78
5 30 1708 6043 41.70 24.63 0.93
5 40 2276 6381 53.03 31.76 1.09
5 50 2843 6717 64.76 39.06 1.25
5 81 4610 7771 99.73 61.10 1.74

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-26 07:52:53.176598981 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.449763389
P99 7.662502699999967ms
P95 5.54327105ms
P50 4.258623ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 24.583076019
P99 112.04886166000007ms
P95 33.812985600000005ms
P50 21.936645ms
Number of Invalid txs 0

Copy link

github-actions bot commented Jul 25, 2024

Test Results

465 tests  +1   458 ✅ +1   17m 49s ⏱️ +18s
149 suites +1     7 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit ce61a12. ± Comparison against base commit 713db26.

♻️ This comment has been updated with latest results.

hydra-node/test/Hydra/HeadLogicSpec.hs Outdated Show resolved Hide resolved
@ch1bo
Copy link
Collaborator

ch1bo commented Jul 26, 2024

Signed-off-by: Sasha Bogicevic <[email protected]>
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.

Nice

@ch1bo ch1bo merged commit 2f4ac12 into master Jul 26, 2024
21 checks passed
@ch1bo ch1bo deleted the prevent-empty-decommits branch July 26, 2024 09:47
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.

Prevent empty decommits
2 participants