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

cardano-api: 8.46 -> 9.0 #1497

Merged
merged 3 commits into from
Jul 15, 2024
Merged

cardano-api: 8.46 -> 9.0 #1497

merged 3 commits into from
Jul 15, 2024

Conversation

locallycompact
Copy link
Contributor

@locallycompact locallycompact commented Jul 10, 2024

Notable changes:

  • cardano-api deprecated ProtocolParameters and upstreamed JSON encoding to PParams type from ledger. We follow suit and use that type everywhere now.

  • mkTermToEvaluate moved into PlutusLanguage type class in ledger Add mkTermToEvaluate on PlutusLanguage class IntersectMBO/cardano-ledger#4480. Temporarily requires a source-repository-package until released upstream.

  • evaluateTransactionExecutionUnits returns a log now, which we do NOT use right now.


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

@locallycompact locallycompact force-pushed the lc/cardano-api-9.0 branch 2 times, most recently from a9917a0 to 963fa03 Compare July 10, 2024 17:47
Copy link

github-actions bot commented Jul 10, 2024

Transactions 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-15 12:32:46.805912916 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial e6685648e63ab510b49d2ce632c570d2ef53f44f3cbdf82ed553906c 4081
νCommit fce3b967fb72f4a3be8dfa30defe413258ff453e5d32d6752d83f9cf 2060
νHead 10a116037de398d6b0721152336d602f0ea653eb3dfe540d5da63fe4 9367
μHead 4f93fdfeda690e005d3f5a180208edd3f65ddd0892466ad7f4dd678b* 4236
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per Head.

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 4815 5.71 2.25 0.42
2 5019 6.99 2.76 0.45
3 5224 8.65 3.42 0.47
5 5622 11.12 4.39 0.52
10 6627 18.21 7.20 0.64
58 16275 84.37 33.37 1.79

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 559 9.25 3.68 0.28
2 749 11.94 4.93 0.32
3 931 14.70 6.20 0.35
5 1313 20.44 8.83 0.44
10 2247 36.05 15.86 0.65
26 5246 98.14 42.75 1.48

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 544 14.13 5.69 0.33
2 114 654 22.75 9.24 0.43
3 170 764 31.99 13.14 0.54
4 226 874 42.81 17.73 0.66
5 284 984 58.17 24.11 0.84
6 338 1095 71.14 29.74 0.99
7 396 1205 85.51 35.98 1.15

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 590 8.04 4.51 0.27
2 738 8.78 5.59 0.29
3 819 9.02 6.29 0.30
5 1243 11.57 9.40 0.37
10 2102 16.39 16.01 0.49
50 4870 40.63 25.08 0.87

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 654 8.40 4.67 0.28
2 800 9.46 6.02 0.31
3 843 9.42 6.45 0.31
5 1197 11.56 9.20 0.36
10 2066 16.75 15.89 0.49
50 7996 49.92 62.58 1.36

Cost of Abort Transaction

Some variation because of random mixture of still initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 4607 13.41 5.59 0.50
2 4843 27.78 12.28 0.68
3 4879 38.75 17.02 0.80
4 5168 57.50 25.57 1.03
5 5342 76.38 34.03 1.25
6 5471 98.88 44.02 1.51

Cost of FanOut Transaction

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 4651 7.43 3.12 0.44
5 1 57 4684 9.14 4.07 0.46
5 5 284 4819 13.41 6.80 0.52
5 10 569 4989 19.00 10.30 0.60
5 20 1140 5330 29.59 17.07 0.75
5 30 1708 5670 41.46 24.38 0.91
5 40 2276 6008 52.76 31.46 1.07
5 50 2847 6349 63.45 38.28 1.22
5 82 4666 7432 99.23 60.77 1.72

End-To-End Benchmark Results

This page is intended to collect the latest end-to-end benchmarks results produced by Hydra's Continuous Integration system from the latest master code.

Please take those results with a grain of salt as they are currently produced from very limited cloud VMs and not controlled hardware. Instead of focusing on the absolute results, the emphasis should be on relative results, eg. how the timings for a scenario evolve as the code changes.

Generated at 2024-07-15 12:34:54.107918892 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.923652077
P99 10.95909777999994ms
P95 6.588603449999997ms
P50 4.232136499999999ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 21.609250384
P99 46.618050460000035ms
P95 30.191878900000003ms
P50 19.590749000000002ms
Number of Invalid txs 0

@locallycompact locallycompact force-pushed the lc/cardano-api-9.0 branch 4 times, most recently from 277b8b6 to 5686333 Compare July 11, 2024 10:34
@locallycompact locallycompact changed the title cardano-api: 9.0 cardano-api: 8.46 -> 9.0 Jul 11, 2024
Copy link

github-actions bot commented Jul 11, 2024

Test Results

437 tests  ±0   425 ✅ ±0   14m 57s ⏱️ +24s
143 suites ±0    12 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit d15bab8. ± Comparison against base commit 0d5b516.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
Hydra.Ledger.Cardano/ProtocolParameters ‑ Roundtrip JSON encoding
Hydra.Ledger.Cardano/PParamss ‑ Roundtrip JSON encoding

♻️ This comment has been updated with latest results.

@locallycompact locallycompact marked this pull request as draft July 11, 2024 11:34
@locallycompact locallycompact marked this pull request as ready for review July 15, 2024 09:08
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.

Changes look good in principle.

I would prefer if we use the new "Log" from the evaluateTransaction... function, but this is fine for now.

@locallycompact locallycompact force-pushed the lc/cardano-api-9.0 branch 4 times, most recently from 76da28e to 875fe2e Compare July 15, 2024 12:12
@locallycompact locallycompact merged commit 6b1ef6d into master Jul 15, 2024
21 checks passed
@locallycompact locallycompact deleted the lc/cardano-api-9.0 branch July 15, 2024 12:51
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.

None yet

2 participants