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

versioning hydra tx observations #1753

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ffakenz
Copy link
Contributor

@ffakenz ffakenz commented Nov 28, 2024

This PR parametrizes hydra-chain-observer with a SerializedScriptRegistry, which encapsulates the serialized scripts for Hydra contracts.

It also introduces utility functions for parsing SerializedScripts from Plutus cborHex and Aiken compiledCode.

This refactor enables the hydra-chain-observer to run using Hydra scripts from different releases.


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

Copy link

Transaction cost differences

No cost or size differences found

Copy link

github-actions bot commented Nov 28, 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-12-31 11:55:08.041439605 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 00a6ddbc130ab92f5b7cb8d1ccd8d79eca5bfe25f6843c07b62841f0 2667
νCommit 3e5a776bcee213e3dfd15806952a10ac5590e3e97d09d62eb99266b2 690
νHead 5350e9d521552ebfd9e846fd70c3b801f716fc14296134ec0fb71e97 14495
μHead 482c3ce15cde05bc905b915ccfa2546e500be1c5d722389026c37aa3* 5615
νDeposit de09cec5f84eedaf64186cb52ba4ee6e74e6fc368af25b90d457f352 1118
  • 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 6200 10.76 3.47 0.54
2 6401 12.28 3.91 0.56
3 6601 14.43 4.59 0.59
5 7004 18.67 5.93 0.65
10 8014 28.42 8.97 0.80
44 14843 98.21 30.92 1.82

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 556 2.45 1.17 0.20
2 743 3.40 1.74 0.22
3 920 4.39 2.34 0.24
5 1279 6.46 3.61 0.28
10 2173 12.24 7.28 0.40
54 10058 99.20 68.72 1.89

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 25.00 7.26 0.43
2 114 671 31.93 9.30 0.50
3 170 782 42.32 12.19 0.61
4 225 893 52.34 15.01 0.72
5 284 1004 58.97 16.97 0.79
6 338 1116 73.72 20.93 0.95
7 394 1227 77.31 22.14 0.99
8 449 1338 82.77 24.00 1.05
9 506 1449 95.20 27.33 1.18

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1847 24.05 8.01 0.48
2 2006 25.26 9.09 0.51
3 2169 27.95 10.65 0.55
5 2499 31.73 13.26 0.61
10 3025 36.66 18.05 0.71
43 8050 97.87 60.54 1.73

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 636 22.68 7.31 0.41
2 764 23.89 8.33 0.44
3 911 24.88 9.25 0.46
5 1208 28.83 11.69 0.52
10 2099 40.24 18.23 0.70
43 6837 98.55 56.54 1.65

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 678 28.60 9.15 0.48
2 842 30.35 10.37 0.51
3 980 30.18 11.06 0.52
5 1271 36.16 14.27 0.60
10 2142 44.73 20.79 0.76
39 6668 97.63 58.07 1.65

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 734 33.35 10.43 0.53
2 866 35.29 11.69 0.56
3 997 37.22 12.95 0.59
5 1334 42.42 16.07 0.67
10 2273 54.16 23.48 0.86
31 5147 97.76 51.20 1.54

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 6107 26.09 8.83 0.69
2 6160 31.52 10.60 0.75
3 6390 44.08 14.97 0.90
4 6472 53.18 18.01 0.99
5 6505 57.58 19.38 1.04
6 6626 66.18 22.32 1.14
7 6893 76.63 25.93 1.26
8 6990 86.36 29.25 1.37
9 7241 98.93 33.71 1.51

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 5 285 6367 27.82 10.09 0.73
10 20 1140 6877 57.20 21.90 1.07
10 40 2278 7558 95.81 37.45 1.53
10 42 2392 7626 99.94 39.10 1.58

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-12-31 11:58:38.639134614 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.780763220
P99 8.935218309999991ms
P95 6.400799800000001ms
P50 4.5932355000000005ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 24.789858453
P99 116.76123311999999ms
P95 29.83973085ms
P50 21.230594500000002ms
Number of Invalid txs 0

Copy link

github-actions bot commented Nov 28, 2024

Test Results

  5 files  ±0  165 suites  ±0   28m 30s ⏱️ - 2m 9s
563 tests ±0  557 ✅ ±0  6 💤 ±0  0 ❌ ±0 
565 runs  ±0  559 ✅ ±0  6 💤 ±0  0 ❌ ±0 

Results for commit 99f3406. ± Comparison against base commit 3cec2ff.

♻️ This comment has been updated with latest results.

@ffakenz ffakenz force-pushed the versioning-hydra-tx-observations branch 2 times, most recently from 2bd816d to 4264cd9 Compare November 29, 2024 08:19
@ffakenz ffakenz force-pushed the versioning-hydra-tx-observations branch from 4264cd9 to 77e980a Compare December 10, 2024 10:49
@ffakenz ffakenz force-pushed the versioning-hydra-tx-observations branch 4 times, most recently from 60cf58f to 4485c73 Compare December 18, 2024 20:07
@ffakenz ffakenz marked this pull request as ready for review December 18, 2024 20:07
@ffakenz ffakenz force-pushed the versioning-hydra-tx-observations branch from 9cb6d7a to 99f3406 Compare December 31, 2024 11:48
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.

2 participants