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 9 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

github-actions bot commented Nov 28, 2024

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 - - - - -

Cost of Increment Transaction

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

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 - - - -

Abort transaction costs

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

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 2025-01-03 00:13:56.92102153 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 6199 10.07 3.20 0.53
2 6398 12.21 3.88 0.56
3 6602 14.55 4.63 0.59
5 7001 18.19 5.75 0.65
10 8009 28.42 8.97 0.80
44 14845 98.38 30.98 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.45 1.17 0.20
2 740 3.40 1.74 0.22
3 922 4.39 2.34 0.24
5 1280 6.46 3.61 0.28
10 2182 12.24 7.28 0.40
54 10054 99.20 68.72 1.89

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 564 24.24 7.08 0.42
2 114 671 32.91 9.53 0.51
3 171 782 39.81 11.58 0.59
4 225 893 49.40 14.31 0.69
5 283 1004 60.66 17.40 0.81
6 337 1116 67.14 19.32 0.88
7 395 1227 84.19 23.79 1.06
8 450 1338 84.66 24.35 1.07

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1851 24.13 8.02 0.48
2 1993 25.60 9.16 0.51
3 2164 28.09 10.68 0.55
5 2507 31.48 13.21 0.61
10 3277 41.27 19.75 0.77
43 8111 99.11 60.82 1.75

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 645 22.44 7.26 0.41
2 755 24.21 8.41 0.44
3 998 27.77 10.07 0.49
5 1242 29.42 11.88 0.53
10 1979 38.05 17.61 0.67
42 7003 99.83 56.30 1.67

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 676 28.64 9.16 0.48
2 852 28.68 9.91 0.49
3 1028 30.90 11.38 0.53
5 1345 36.65 14.55 0.61
10 2144 46.79 21.36 0.78
38 6458 96.48 56.85 1.62

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 713 33.35 10.42 0.53
2 870 35.34 11.70 0.56
3 975 37.33 12.97 0.59
5 1335 41.77 15.79 0.66
10 2080 52.69 22.68 0.83
32 5401 99.79 52.72 1.57

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 6087 26.25 8.87 0.69
2 6166 31.43 10.58 0.75
3 6344 43.23 14.61 0.88
4 6572 53.53 18.25 1.00
5 6591 58.32 19.74 1.05
6 6716 69.84 23.66 1.18
7 6967 77.42 26.27 1.27
8 6856 84.34 28.37 1.34
9 7094 98.73 33.43 1.50

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 6197 16.93 5.75 0.60
10 1 57 6231 19.41 6.73 0.63
10 5 284 6366 27.82 10.09 0.73
10 10 569 6537 37.98 14.16 0.85
10 30 1709 7219 76.42 29.65 1.30
10 40 2277 7556 96.39 37.66 1.53
10 42 2390 7623 99.57 38.97 1.57

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-03 00:16:46.640635233 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 5.847848483
P99 10.402261709999992ms
P95 8.1004117ms
P50 5.5933735ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 23.511434941
P99 33.0928713ms
P95 29.55249975ms
P50 22.7038285ms
Number of Invalid txs 0

Copy link

github-actions bot commented Nov 28, 2024

Test Results

  5 files  ±0  165 suites  ±0   33m 16s ⏱️ + 2m 43s
563 tests ±0  557 ✅ ±0  6 💤 ±0  0 ❌ ±0 
565 runs  ±0  559 ✅ ±0  6 💤 ±0  0 ❌ ±0 

Results for commit 15ead59. ± Comparison against base commit 15e16b3.

♻️ 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 2 times, most recently from 99f3406 to 7e51ea4 Compare January 2, 2025 12:01
@ffakenz ffakenz force-pushed the versioning-hydra-tx-observations branch from ab38cfe to 15ead59 Compare January 3, 2025 00:06
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