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

Match function names from plutus-script-utils #1669

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

locallycompact
Copy link
Contributor

This is one step on the way to making it easier to test with different ScriptContexts.

Copy link

github-actions bot commented Sep 30, 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-10-04 13:03:25.311208071 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial d08c4d074d2155de1d5127a718fc61a7acbc8648b6032b3d0571f209 3799
νCommit 187ae86376f0acb38df9da73271bef525aed468dcd1771f0e98cee88 1743
νHead 2ee477c60839936be49a50030690865b5bed4db8cd2f05bf255ac680 10068
μHead 26decf82220fb7f84ff10eacccaa36ffd7ee29a34d5b80300a7a53d4* 4508
νDeposit c2117fd9ebdee3e96b81fd67ff7092d638926415c10f1f7e5a267ad0 2791
  • 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 5096 5.61 2.21 0.44
2 5301 7.23 2.86 0.46
3 5500 8.51 3.36 0.49
5 5901 11.12 4.39 0.53
10 6906 18.21 7.20 0.65
57 16355 82.85 32.77 1.78

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 567 10.52 4.15 0.29
2 756 13.86 5.65 0.34
3 942 17.33 7.20 0.38
5 1320 24.65 10.44 0.48
10 2255 45.22 19.36 0.75
20 4127 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 21.46 8.41 0.41
2 114 671 33.90 13.40 0.55
3 169 782 47.23 18.85 0.70
4 227 893 59.14 23.90 0.84
5 283 1004 77.98 31.61 1.05
6 339 1116 93.82 38.35 1.23

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 632 17.95 7.88 0.38
2 791 19.30 9.15 0.41
3 910 20.70 10.42 0.43
5 1280 24.36 13.22 0.50
10 2042 33.77 20.58 0.66
49 8131 99.03 74.28 1.84

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 653 20.07 9.01 0.41
2 797 21.53 10.43 0.43
3 873 22.62 11.49 0.45
5 1250 26.10 14.88 0.52
10 1926 33.98 22.26 0.67
50 7915 98.19 83.12 1.89

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 698 25.93 11.15 0.47
2 897 28.03 13.00 0.51
3 994 29.91 14.51 0.54
5 1280 33.57 17.66 0.61
10 2025 42.75 25.63 0.77
39 6469 98.11 73.12 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 4894 13.98 5.84 0.52
2 5053 27.43 11.95 0.68
3 5168 40.56 17.80 0.83
4 5455 59.65 26.51 1.06
5 5519 76.11 33.81 1.25
6 5568 85.95 37.99 1.36

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 4934 7.70 3.25 0.45
5 1 57 4969 9.22 4.13 0.47
5 5 285 5105 13.35 6.81 0.53
5 10 569 5273 19.20 10.45 0.61
5 20 1139 5613 30.33 17.48 0.77
5 30 1705 5952 41.25 24.44 0.92
5 40 2274 6291 52.98 31.73 1.08
5 50 2849 6636 64.31 38.86 1.24
5 81 4608 7682 99.47 60.99 1.73

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-10-04 13:05:06.467589339 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.111958509
P99 8.822179869999982ms
P95 4.910030349999999ms
P50 3.893139ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 22.398178098
P99 115.9221777ms
P95 28.9302237ms
P50 19.6744225ms
Number of Invalid txs 0

Copy link

github-actions bot commented Sep 30, 2024

Test Results

503 tests  ±0   497 ✅ ±0   21m 57s ⏱️ + 1m 20s
160 suites ±0     6 💤 ±0 
  7 files   ±0     0 ❌ ±0 

Results for commit 2862fc9. ± Comparison against base commit 4aacf31.

♻️ This comment has been updated with latest results.

noonio
noonio previously requested changes Sep 30, 2024
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.

Seems good; just need to understand why the cbox has changed on a few of the golden files!

@noonio
Copy link
Contributor

noonio commented Oct 2, 2024

@locallycompact re this: "plutus team says it's fine"; can you provide a link? Would just be good to keep the context around so we know why!

Otherwise, happy to merge.

@locallycompact
Copy link
Contributor Author

We were informed over slack

@ch1bo
Copy link
Collaborator

ch1bo commented Oct 2, 2024

@locallycompact re this: "plutus team says it's fine"; can you provide a link? Would just be good to keep the context around so we know why!

Otherwise, happy to merge.

We asked the plutus team why would the scripts change if we rename functions only and someone responded that they are actually not surprised by it. Seems like we have been assuming this wrongly and some step in the plutus-tx compilation pipeline (they did not know provide details) would be sensitive to renames.

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.

Change is fine as we learned that renaming affect the compiled scripts.

To merge this changes though, we need to keep a note in the CHANGELOG.md about this breaking change of the script hashes (see past entries)

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

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.

3 participants