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

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - +0.38 +0.09 +0.01
3 - - - -
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 - - - -

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 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-07 10:33:33.45751744 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 6165 10.24 3.26 0.53
2 6366 12.21 3.88 0.56
3 6566 14.24 4.52 0.59
5 6969 18.36 5.81 0.65
10 7974 28.42 8.97 0.80
44 14811 98.45 31.01 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 743 3.40 1.74 0.22
3 923 4.39 2.34 0.24
5 1280 6.46 3.61 0.28
10 2176 12.24 7.28 0.40
54 10075 99.20 68.72 1.89

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 524 25.00 7.26 0.43
2 112 635 31.97 9.32 0.50
3 170 747 39.90 11.62 0.59
4 226 858 49.33 14.26 0.69
5 282 969 55.56 16.15 0.76
6 337 1081 63.56 18.42 0.84
7 395 1192 81.39 23.07 1.03
8 449 1303 79.13 22.92 1.01

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1801 23.75 7.93 0.48
2 1947 25.48 9.13 0.51
3 2176 28.92 11.01 0.56
5 2398 31.02 12.95 0.60
10 3162 39.97 19.28 0.75
42 7995 97.81 59.92 1.72

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 604 22.72 7.32 0.41
2 779 24.94 8.63 0.45
3 827 23.92 8.98 0.44
5 1199 28.78 11.68 0.52
10 2108 40.13 18.20 0.70
45 7049 99.00 58.07 1.68

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 639 28.61 9.15 0.48
2 884 29.25 10.20 0.50
3 907 29.69 10.80 0.51
5 1295 34.09 13.74 0.58
10 2174 44.67 20.80 0.76
40 6523 98.11 58.48 1.65

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 628 32.78 10.14 0.52
2 885 35.95 11.99 0.57
3 941 37.29 12.96 0.59
5 1277 41.61 15.74 0.66
10 2175 54.64 23.57 0.86
33 5329 99.90 53.04 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 6067 26.21 8.87 0.69
2 6221 35.55 12.08 0.80
3 6195 39.24 13.16 0.83
4 6497 50.74 17.20 0.97
5 6543 58.22 19.68 1.05
6 6696 70.20 23.71 1.18
7 6915 80.37 27.27 1.30
8 7042 89.50 30.31 1.40
9 7145 93.07 31.54 1.44

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 6162 17.66 6.02 0.61
10 1 57 6196 19.62 6.80 0.63
10 5 284 6331 27.45 9.95 0.72
10 10 568 6500 36.88 13.76 0.83
10 20 1137 6839 57.20 21.90 1.07
10 40 2280 7525 95.65 37.39 1.52
10 42 2394 7592 99.94 39.10 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-07 10:37:08.643836181 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 5.400592196
P99 9.340957009999979ms
P95 6.669903650000001ms
P50 5.1955215ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 22.571800562
P99 40.29306138999999ms
P95 30.539678099999996ms
P50 21.168709999999997ms
Number of Invalid txs 0

Copy link

github-actions bot commented Nov 28, 2024

Test Results

  5 files  ±0  165 suites  ±0   31m 5s ⏱️ - 1m 8s
563 tests ±0  557 ✅ ±0  6 💤 ±0  0 ❌ ±0 
565 runs  ±0  559 ✅ ±0  6 💤 ±0  0 ❌ ±0 

Results for commit 5555307. ± Comparison against base commit e0dc991.

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