Skip to content

Constant memory adr #1799

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

Merged
merged 3 commits into from
Jan 27, 2025
Merged

Constant memory adr #1799

merged 3 commits into from
Jan 27, 2025

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Jan 27, 2025

fix #1717


  • 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 Jan 27, 2025
@v0d1ch v0d1ch requested a review from a team January 27, 2025 09:52
Copy link

github-actions bot commented Jan 27, 2025

Transaction cost differences

Script summary

Name Size (Bytes)
νInitial -
νCommit -
νHead -
μHead -
νDeposit -

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
44 - - - -

Commit transaction costs

UTxO Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
54 - - - -

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 - - - - -
2 - - - - -
3 - - - - -
4 - - - - -
5 - - - - -
6 - - - - -
7 - - - - -
8 - - - - -
9 - - - - -
10 - - - - -

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - +0.39 +0.09 -
2 - - - -
3 - $${\color{green}-0.38}$$ $${\color{green}-0.09}$$ -
5 - +0.39 +0.09 -
10 - - - -
43 - +0.39 +0.09 +0.01

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
45 - - - -

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
41 - - - -

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
33 - - - -

FanOut transaction costs

UTxO, Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
(0, 10) - - - - -
(1, 10) - - - - -
(5, 10) - - - - -
(10, 10) - - - - -
(20, 10) - - - - -
(40, 10) - - - - -
(41, 10) - - - - -

Copy link

github-actions bot commented Jan 27, 2025

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 2025-01-27 16:15:09.864579318 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial c8a101a5c8ac4816b0dceb59ce31fc2258e387de828f02961d2f2045 2652
νCommit 61458bc2f297fff3cc5df6ac7ab57cefd87763b0b7bd722146a1035c 685
νHead 5350e9d521552ebfd9e846fd70c3b801f716fc14296134ec0fb71e97 14492
μHead 6b49dc4e571207d615dba01996548cb610b0caa85c30423d169d0091* 5612
νDeposit ae01dade3a9c346d5c93ae3ce339412b90a0b8f83f94ec6baa24e30c 1102
  • 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 6164 10.24 3.26 0.53
2 6365 12.04 3.82 0.56
3 6564 14.16 4.49 0.59
5 6966 18.36 5.81 0.65
10 7975 28.42 8.97 0.80
44 14810 98.04 30.85 1.82

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 561 2.44 1.16 0.20
2 743 3.38 1.73 0.22
3 916 4.36 2.33 0.24
5 1273 6.41 3.60 0.28
10 2171 12.13 7.25 0.40
54 10051 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 529 25.00 7.26 0.43
2 114 636 31.89 9.29 0.50
3 168 747 39.44 11.48 0.58
4 227 862 49.25 14.27 0.69
5 282 969 57.12 16.52 0.77
6 338 1081 63.48 18.44 0.84
7 395 1192 74.15 21.52 0.96
8 448 1303 93.37 26.43 1.15
9 507 1414 95.33 27.25 1.18

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1785 23.74 7.93 0.48
2 1996 26.26 9.47 0.52
3 2069 26.52 10.16 0.53
5 2481 31.78 13.29 0.61
10 3259 42.32 20.14 0.78
42 7969 97.73 59.84 1.72

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 597 22.44 7.26 0.41
2 729 24.13 8.39 0.44
3 874 24.89 9.25 0.46
5 1348 32.03 12.60 0.56
10 1940 38.41 17.70 0.67
44 6910 99.96 57.61 1.68

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 681 27.03 8.73 0.46
2 786 30.35 10.36 0.50
3 963 30.34 11.11 0.52
5 1337 34.58 13.99 0.59
10 2117 46.84 21.38 0.78
40 6474 98.45 58.50 1.65

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 696 33.35 10.43 0.53
2 812 35.30 11.68 0.56
3 980 37.86 13.23 0.59
5 1221 41.09 15.47 0.65
10 2021 52.49 22.61 0.83
31 5319 98.63 51.63 1.55

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 6070 26.04 8.82 0.69
2 6169 34.53 11.68 0.78
3 6329 43.96 14.92 0.89
4 6376 48.70 16.44 0.94
5 6546 60.57 20.47 1.08
6 6664 67.33 22.71 1.15
7 6865 80.50 27.35 1.30
8 6980 89.55 30.28 1.40
9 7023 91.15 30.73 1.42

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 6163 18.76 6.42 0.62
10 1 57 6196 20.72 7.21 0.64
10 5 285 6332 27.45 9.95 0.72
10 10 570 6502 38.34 14.29 0.85
10 20 1138 6841 57.20 21.90 1.07
10 30 1710 7184 77.10 29.90 1.30
10 40 2271 7515 96.02 37.53 1.53
10 41 2334 7555 99.08 38.72 1.56

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 2025-01-27 16:18:07.656537951 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.506678120
P99 12.341764009999997ms
P95 6.084641700000007ms
P50 4.1258455ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 22.903170962
P99 113.71039999999999ms
P95 30.050074949999996ms
P50 20.704182000000003ms
Number of Invalid txs 0

Copy link

github-actions bot commented Jan 27, 2025

Test Results

  5 files  ±0  165 suites  ±0   29m 13s ⏱️ -22s
563 tests ±0  561 ✅ ±0  2 💤 ±0  0 ❌ ±0 
565 runs  ±0  563 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 2255724. ± Comparison against base commit f339ed1.

♻️ This comment has been updated with latest results.

@noonio
Copy link
Contributor

noonio commented Jan 27, 2025

Looks great; I think add the couple of links and we can merge and start working on this!

@v0d1ch v0d1ch added this pull request to the merge queue Jan 27, 2025
Merged via the queue into master with commit 56274fa Jan 27, 2025
27 checks passed
@v0d1ch v0d1ch deleted the constant-memory-adr branch January 27, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Write an ADR describing changing the architecture of hydra-node such that the APIServer is an interpreter of StateEvent stream
2 participants