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 inlineDatumRaw to transaction outputs in API #1684

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

ch1bo
Copy link
Collaborator

@ch1bo ch1bo commented Oct 4, 2024

Addresses #1543 and tests whether IntersectMBO/cardano-api#632 results in GET /snapshot/utxo to contain inlineDatumRaw.

Bonus: First step on consolidating TxOut and UTxO generators (deduplicating and moving them to a common module)

TODO: Somehow get IntersectMBO/cardano-api@17eb46f into this branch. Most likely requiring #1680 (which updates to most recent cardano-api release 9.30) and a source-repository-package onto some unreleased cardano-api.


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

@ch1bo ch1bo marked this pull request as draft October 4, 2024 17:47
@ch1bo ch1bo linked an issue Oct 4, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Oct 4, 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-09 12:13:38.601124253 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial b512161ccb0652d7e9a0b540e4a3c808f73d6558a4bcabf374d85880 3969
νCommit ea444d37d226e71eef73ac78d149750da977feb588900135bf9e8221 692
νHead 2253ddd95837c7aacc8635a971caaea743434152dd8dd2849bdf4162 10797
μHead 4d648ca239040b0e87901835aa11423e7aa3bd947ce6befe7db1bae8* 4508
νDeposit 1a011f23b139a6426767026bde10319546485d553219a5848cdac4e5 2993
  • 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 5097 5.81 2.30 0.44
2 5295 7.09 2.80 0.46
3 5503 8.73 3.46 0.49
5 5899 11.22 4.43 0.53
10 6906 18.21 7.20 0.65
57 16356 82.81 32.75 1.78

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 564 10.84 4.26 0.29
2 759 14.31 5.80 0.34
3 947 17.92 7.39 0.39
5 1323 25.56 10.73 0.49
10 2259 47.11 19.97 0.77
19 3927 94.71 39.81 1.38

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 20.62 7.86 0.40
2 112 675 28.97 11.02 0.49
3 170 782 37.75 14.35 0.59
4 228 893 47.05 17.86 0.70
5 283 1004 50.78 19.35 0.74
6 340 1120 65.14 24.71 0.90
7 393 1227 67.75 25.78 0.94
8 451 1338 75.87 28.89 1.03
9 506 1449 83.73 31.86 1.12
10 560 1564 99.24 37.66 1.29

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 644 18.64 8.16 0.39
2 736 18.54 8.85 0.40
3 905 20.71 10.45 0.43
5 1158 23.52 13.11 0.49
10 2028 33.13 20.68 0.66
48 7649 96.47 74.76 1.81

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 652 20.87 9.33 0.41
2 745 21.86 10.41 0.43
3 1026 24.55 12.87 0.49
5 1315 27.95 16.12 0.55
10 2148 35.85 23.99 0.71
49 7618 95.67 82.75 1.85

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 681 26.76 11.46 0.48
2 811 28.61 13.05 0.51
3 981 30.76 14.92 0.55
5 1348 34.89 18.55 0.63
10 2133 44.52 27.01 0.80
39 6366 98.66 74.84 1.77

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 4975 15.30 6.55 0.54
2 5100 21.90 9.41 0.62
3 5212 28.37 12.24 0.70
4 5408 35.23 15.34 0.78
5 5654 44.16 19.42 0.90
6 5649 49.32 21.44 0.95
7 5800 56.16 24.51 1.04
8 5852 58.85 25.45 1.07
9 6057 68.43 29.75 1.18
10 6138 77.86 33.87 1.29
11 6399 85.61 37.50 1.39
12 6318 87.95 38.09 1.41
13 6506 92.80 40.12 1.48

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 5090 10.38 4.35 0.49
10 1 57 5123 11.44 5.02 0.50
10 5 285 5260 16.03 7.87 0.57
10 10 569 5428 21.87 11.49 0.65
10 20 1139 5768 33.44 18.68 0.81
10 30 1706 6108 44.85 25.79 0.97
10 40 2277 6448 56.54 33.03 1.13
10 50 2846 6787 68.44 40.36 1.29
10 76 4322 7666 98.49 59.05 1.71

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-09 12:17:57.73131255 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.896898468
P99 15.489228199999962ms
P95 6.855646299999989ms
P50 4.455847ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 26.146099690
P99 116.51278471000002ms
P95 37.32752714999998ms
P50 23.212589ms
Number of Invalid txs 0

@locallycompact locallycompact force-pushed the inline-datum-raw branch 4 times, most recently from 9042a42 to 8da09c6 Compare October 8, 2024 16:44
@locallycompact locallycompact requested a review from a team October 8, 2024 18:53
Copy link
Contributor

@v0d1ch v0d1ch left a comment

Choose a reason for hiding this comment

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

Left a comment

hydra-tx/testlib/Test/Hydra/Tx/Gen.hs Show resolved Hide resolved
@locallycompact locallycompact force-pushed the inline-datum-raw branch 3 times, most recently from bf9e06a to 30e0ce8 Compare October 9, 2024 10:02
Copy link

github-actions bot commented Oct 9, 2024

Test Results

544 tests  +1   538 ✅ +1   26m 14s ⏱️ - 5m 50s
162 suites ±0     6 💤 ±0 
  7 files   ±0     0 ❌ ±0 

Results for commit 73adb2d. ± Comparison against base commit 3bd4fc3.

This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.
Hydra.Ledger.Cardano/Generators ‑ genUTxOAlonzo does not generate collapsing values
Hydra.API.HTTPServer/API should respond correctly/GET /snapshot/utxo ‑ has inlineDatumRaw
Hydra.Ledger.Cardano/Generators ‑ genUTxO does not generate collapsing values

♻️ This comment has been updated with latest results.

ch1bo and others added 4 commits October 9, 2024 12:02
This is the intended new schema. Updated versions as API will be
extended.
The api specification contains inlineDatumRaw, but only as an optional
field so we need to unit test when we would expect it.
@locallycompact locallycompact added this pull request to the merge queue Oct 9, 2024
Merged via the queue into master with commit 7dc7899 Oct 9, 2024
28 checks passed
@locallycompact locallycompact deleted the inline-datum-raw branch October 9, 2024 12:39
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.

Raw CBOR datum in transaction outputs
4 participants