Skip to content

Conversation

@v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Apr 2, 2025

  • We should not prevent any on-chain information from propagating further since the only source of truth is actually what we observe from L1. This PR removes some parts of the code that made some assumptions using local state of a hydra-node which we can't really trust.

This PR goes together with the one removing related check from the hydra specification #1930


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

@github-actions
Copy link

github-actions bot commented Apr 2, 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 - - - -
40 - - - -

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 - +0.39 +0.09 -
2 - - - -
3 - - - -
5 - $${\color{green}-0.39}$$ $${\color{green}-0.09}$$ -
10 - $${\color{green}-0.39}$$ $${\color{green}-0.09}$$ $${\color{green}-0.01}$$
37 - - - -

Cost of Decrement Transaction

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

Close transaction costs

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

Contest transaction costs

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

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) - - - - -
(37, 10) - - - - -

@github-actions
Copy link

github-actions bot commented Apr 2, 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-04-10 10:57:25.415506063 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 0e35115a2c7c13c68ecd8d74e4987c04d4539e337643be20bb3274bd 14756
μHead 57166715eadb8d3135964325c016eea546c21e1c0aae974ca67df9a5* 5541
ν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 6091 11.02 3.43 0.53
2 6299 13.74 4.28 0.57
3 6500 15.28 4.73 0.59
5 6895 20.38 6.31 0.66
10 7903 30.97 9.53 0.82
40 13935 98.27 30.17 1.77

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 742 3.38 1.73 0.22
3 923 4.36 2.33 0.24
5 1279 6.41 3.60 0.28
10 2171 12.13 7.25 0.40
54 10078 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 529 25.64 7.39 0.43
2 113 636 34.89 9.99 0.53
3 170 747 43.26 12.38 0.62
4 228 862 56.51 15.96 0.76
5 284 969 64.76 18.37 0.85
6 340 1081 76.71 21.55 0.97
7 393 1192 80.52 22.90 1.02
8 452 1303 95.28 27.02 1.17

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1787 25.03 8.22 0.49
2 1931 26.64 9.38 0.52
3 2017 27.16 10.15 0.53
5 2478 33.87 13.75 0.63
10 3226 43.83 20.32 0.79
39 7322 95.96 56.29 1.65

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 597 23.71 7.54 0.42
2 815 26.46 8.97 0.46
3 903 28.41 10.16 0.49
5 1127 29.72 11.83 0.53
10 1900 39.76 17.94 0.68
39 6197 98.25 53.40 1.60

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 690 29.15 9.21 0.48
2 782 32.85 10.92 0.53
3 930 34.71 12.16 0.56
5 1444 39.20 15.35 0.64
10 1935 49.48 21.50 0.79
34 5387 99.16 53.18 1.57

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 628 35.29 10.70 0.54
2 808 38.07 12.30 0.58
3 904 39.54 13.31 0.61
5 1286 45.37 16.59 0.69
10 2030 57.51 23.75 0.88
27 4529 97.41 47.53 1.48

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 6004 28.29 9.33 0.71
2 6050 36.38 11.95 0.80
3 6355 48.94 16.23 0.94
4 6326 56.44 18.58 1.02
5 6526 66.81 22.09 1.14
6 6590 69.26 22.86 1.16
7 6723 82.04 27.02 1.30
8 6891 96.96 32.13 1.47

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 6092 19.66 6.46 0.62
10 5 285 6261 30.97 10.82 0.75
10 10 567 6428 41.61 14.95 0.88
10 30 1705 7108 84.03 31.40 1.37
10 37 2102 7344 98.48 37.03 1.54

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-04-10 11:00:09.402675533 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.392931530
P99 6.7976263599999935ms
P95 5.4041033ms
P50 4.218446999999999ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-04-10 10:58:54.409843994 UTC 902M 2920M
2025-04-10 10:58:59.409689716 UTC 996M 2817M
2025-04-10 10:59:04.409665133 UTC 998M 2816M
2025-04-10 10:59:09.409670072 UTC 1008M 2805M
2025-04-10 10:59:14.409665603 UTC 1008M 2805M
2025-04-10 10:59:19.40967258 UTC 1009M 2803M

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 27.762516286
P99 41.82732957ms
P95 36.180953049999985ms
P50 26.819914ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-04-10 10:59:32.409296971 UTC 906M 2915M
2025-04-10 10:59:37.410954639 UTC 1174M 2643M
2025-04-10 10:59:42.411277751 UTC 1226M 2523M
2025-04-10 10:59:47.409266426 UTC 1247M 2460M
2025-04-10 10:59:52.409280502 UTC 1254M 2452M
2025-04-10 10:59:57.409288569 UTC 1249M 2457M
2025-04-10 11:00:02.40929206 UTC 1251M 2454M
2025-04-10 11:00:07.409275118 UTC 1254M 2450M

@v0d1ch v0d1ch changed the title Don't rely on local state when observing decrement tx Don't rely on local state when observing decrement and recover txs Apr 2, 2025
@v0d1ch v0d1ch force-pushed the dont-prevent-observations branch 9 times, most recently from 34ef54a to 045b901 Compare April 7, 2025 09:52
@v0d1ch v0d1ch moved this from Triage 🏥 to In progress 🕐 in ☕ Hydra Team Work Apr 7, 2025
@v0d1ch v0d1ch moved this from In progress 🕐 to In review 👀 in ☕ Hydra Team Work Apr 7, 2025
@v0d1ch v0d1ch added this to the 0.21.0 milestone Apr 7, 2025
@v0d1ch v0d1ch marked this pull request as ready for review April 7, 2025 09:59
@v0d1ch v0d1ch requested a review from ch1bo April 7, 2025 09:59
@v0d1ch v0d1ch force-pushed the dont-prevent-observations branch 5 times, most recently from 6f8a9fe to b0380c4 Compare April 7, 2025 16:21
@v0d1ch v0d1ch requested a review from a team April 7, 2025 16:24
@v0d1ch v0d1ch force-pushed the dont-prevent-observations branch 2 times, most recently from d63bbe0 to 815f08c Compare April 8, 2025 07:12
@noonio noonio force-pushed the dont-prevent-observations branch from 65143da to f3a5711 Compare April 8, 2025 15:36
@v0d1ch v0d1ch force-pushed the dont-prevent-observations branch 3 times, most recently from 39c15cd to b0067d7 Compare April 10, 2025 08:27
v0d1ch added 13 commits April 10, 2025 12:56
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
If we want to remove local decommit information and rely on the on-chain
observations we need to have a way to display relevant information when
observing some increment. Easiest is to display decremented outputs
since we don't have any decommit tx information any more.

Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
With the removed checks the test is green now since we don't
expect any local state to match with what we observe on-chain.

Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
It is hard to expose error when local deposit was not found on recover
since as soon as node observes OnDepositTx it populates the local state.

Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
@v0d1ch v0d1ch force-pushed the dont-prevent-observations branch from 03f91f8 to faefa8d Compare April 10, 2025 10:56
@v0d1ch v0d1ch merged commit e236147 into master Apr 10, 2025
20 checks passed
@v0d1ch v0d1ch deleted the dont-prevent-observations branch April 10, 2025 11:27
@github-project-automation github-project-automation bot moved this from In review 👀 to Done ✔ in ☕ Hydra Team Work Apr 10, 2025
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.

Increment/Decrement transaction observation should not depend on off-chain state

5 participants