Skip to content

Conversation

ffakenz
Copy link
Contributor

@ffakenz ffakenz commented Sep 12, 2025

🔑 Motivation

Follow up on #2217

🔄 Changes

  • Enable OnDepositTx chain observations at the node level, allowing deposits to be observed and recovered in all head states.
  • Add missing rollback handling at the node level, keeping the current slot in sync with the chain state.
  • Skip pending deposits from other heads when building ReqSn on tick observed, ensuring only deposits from the current head are considered.
  • Extract onChainTick from onOpenChainTick to update pending deposits on time advance in any head state.
  • Move NodeState, Deposit and PendingDeposits types to their own module for better organization.

📝 Notes

  • We no longer ignore a deposit tx of another head.
  • Pending deposits from other heads are:
    • Skipped when handling ReqSn and Ack network messages, preventing cross-head interference.
    • Still susceptible to having their status changed on tick observed.

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

@ffakenz ffakenz linked an issue Sep 12, 2025 that may be closed by this pull request
@ffakenz ffakenz self-assigned this Sep 12, 2025
@ffakenz ffakenz requested a review from a team September 12, 2025 11:28
@ffakenz ffakenz changed the title Follow up deposit recovering closed state Follow up: deposit recovering closed state Sep 12, 2025
Copy link

github-actions bot commented Sep 12, 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-09-23 11:45:58.758503944 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 a1442faf26d4ec409e2f62a685c1d4893f8d6bcbaf7bcb59d6fa1340 14599
μHead fd173b993e12103cd734ca6710d364e17120a5eb37a224c64ab2b188* 5284
ν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 5837 10.17 3.22 0.51
2 6037 12.25 3.87 0.54
3 6238 14.60 4.62 0.58
5 6640 18.50 5.83 0.63
10 7647 29.31 9.25 0.79
43 14279 99.14 30.99 1.80

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 740 3.38 1.73 0.22
3 917 4.36 2.33 0.24
5 1280 6.41 3.60 0.28
10 2174 12.13 7.25 0.40
54 10062 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 524 25.20 7.30 0.43
2 114 636 32.27 9.39 0.51
3 171 747 41.48 11.99 0.60
4 227 858 52.49 15.02 0.72
5 283 974 64.17 18.20 0.84
6 336 1081 64.68 18.80 0.86
7 394 1192 74.49 21.46 0.96
8 450 1303 96.87 27.27 1.19

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1803 24.29 7.69 0.48
2 1981 26.63 9.02 0.52
3 2017 25.87 9.47 0.52
5 2342 29.89 11.93 0.58
10 3198 42.22 18.72 0.77
39 7607 99.39 53.90 1.68

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 612 22.57 7.31 0.41
2 776 24.32 8.46 0.44
3 966 26.95 9.86 0.48
5 1274 30.19 12.08 0.54
10 1868 36.37 17.14 0.65
41 6668 98.22 55.04 1.63

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 702 27.54 8.47 0.46
2 774 28.51 9.39 0.48
3 1071 32.32 11.18 0.54
5 1302 37.73 13.99 0.61
10 2032 47.89 20.17 0.77
37 5917 97.01 51.92 1.57

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 666 33.83 10.15 0.53
2 764 35.21 11.18 0.55
3 900 37.24 12.41 0.58
5 1298 42.45 15.23 0.66
10 2047 54.80 22.03 0.84
30 4930 99.10 47.66 1.51

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 5800 27.09 9.09 0.69
2 5997 36.88 12.45 0.80
3 6180 46.72 15.82 0.91
4 6260 55.02 18.52 1.00
5 6321 59.57 19.95 1.05
6 6586 72.28 24.37 1.20
7 6788 85.03 28.74 1.34
8 6843 88.70 29.86 1.38
9 7041 99.54 33.48 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 0 0 5834 20.96 7.01 0.63
10 1 57 5869 22.10 7.52 0.64
10 5 284 6004 28.02 9.98 0.71
10 30 1708 6854 80.04 30.46 1.32
10 39 2221 7160 98.93 37.88 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-09-23 11:52:28.63666278 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 5.733428420
P99 10.629851289999975ms
P95 7.103169950000001ms
P50 5.4777135ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-09-23 11:51:07.659110052 UTC 1267M 4345M
2025-09-23 11:51:08.658968842 UTC 1268M 4344M
2025-09-23 11:51:09.658936777 UTC 1307M 4304M
2025-09-23 11:51:10.658965151 UTC 1351M 4235M
2025-09-23 11:51:11.65897278 UTC 1371M 4214M
2025-09-23 11:51:12.658945013 UTC 1377M 4204M
2025-09-23 11:51:13.658945771 UTC 1383M 4195M
2025-09-23 11:51:14.65888174 UTC 1383M 4195M
2025-09-23 11:51:15.658893374 UTC 1383M 4195M
2025-09-23 11:51:16.658959026 UTC 1384M 4194M
2025-09-23 11:51:17.658866266 UTC 1384M 4194M
2025-09-23 11:51:18.658965422 UTC 1384M 4194M
2025-09-23 11:51:19.658969225 UTC 1384M 4194M
2025-09-23 11:51:20.658956928 UTC 1384M 4194M
2025-09-23 11:51:21.658936911 UTC 1383M 4194M
2025-09-23 11:51:22.658895383 UTC 1383M 4194M
2025-09-23 11:51:23.658904405 UTC 1384M 4194M
2025-09-23 11:51:24.658961502 UTC 1384M 4194M
2025-09-23 11:51:25.658895256 UTC 1384M 4194M
2025-09-23 11:51:26.658890739 UTC 1386M 4191M
2025-09-23 11:51:27.658901133 UTC 1386M 4191M
2025-09-23 11:51:28.658904091 UTC 1386M 4191M
2025-09-23 11:51:29.65893372 UTC 1386M 4191M
2025-09-23 11:51:30.658898497 UTC 1386M 4191M
2025-09-23 11:51:31.658897091 UTC 1386M 4191M
2025-09-23 11:51:32.658890081 UTC 1386M 4191M
2025-09-23 11:51:33.658892829 UTC 1386M 4191M
2025-09-23 11:51:34.658872701 UTC 1386M 4191M

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 36.518326473
P99 65.25761596999999ms
P95 54.52561844999999ms
P50 34.430832ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-09-23 11:51:46.613291671 UTC 1307M 4305M
2025-09-23 11:51:47.613235169 UTC 1309M 4304M
2025-09-23 11:51:48.613278608 UTC 1314M 4299M
2025-09-23 11:51:49.613142909 UTC 1462M 4072M
2025-09-23 11:51:50.613115279 UTC 1486M 4047M
2025-09-23 11:51:51.613555194 UTC 1521M 4012M
2025-09-23 11:51:52.614759962 UTC 1538M 3992M
2025-09-23 11:51:53.61399684 UTC 1563M 3956M
2025-09-23 11:51:54.61421509 UTC 1585M 3924M
2025-09-23 11:51:55.613536077 UTC 1590M 3910M
2025-09-23 11:51:56.613634748 UTC 1597M 3893M
2025-09-23 11:51:57.613569227 UTC 1616M 3864M
2025-09-23 11:51:58.613787075 UTC 1629M 3841M
2025-09-23 11:51:59.613355256 UTC 1644M 3815M
2025-09-23 11:52:00.613997523 UTC 1645M 3805M
2025-09-23 11:52:01.613992501 UTC 1661M 3780M
2025-09-23 11:52:02.627677594 UTC 1660M 3775M
2025-09-23 11:52:03.614039553 UTC 1668M 3761M
2025-09-23 11:52:04.613110819 UTC 1669M 3761M
2025-09-23 11:52:05.61313518 UTC 1668M 3761M
2025-09-23 11:52:06.61315813 UTC 1668M 3761M
2025-09-23 11:52:07.613148396 UTC 1668M 3761M
2025-09-23 11:52:08.61314948 UTC 1668M 3761M
2025-09-23 11:52:09.613109115 UTC 1669M 3760M
2025-09-23 11:52:10.613127633 UTC 1668M 3760M
2025-09-23 11:52:11.61313324 UTC 1668M 3760M
2025-09-23 11:52:12.61315325 UTC 1668M 3760M
2025-09-23 11:52:13.613121047 UTC 1668M 3760M
2025-09-23 11:52:14.613113095 UTC 1668M 3760M
2025-09-23 11:52:15.613181811 UTC 1676M 3752M
2025-09-23 11:52:16.613127248 UTC 1676M 3751M
2025-09-23 11:52:17.613121009 UTC 1676M 3751M
2025-09-23 11:52:18.61312063 UTC 1676M 3751M
2025-09-23 11:52:19.613108895 UTC 1676M 3751M
2025-09-23 11:52:20.61302796 UTC 1676M 3751M
2025-09-23 11:52:21.613100298 UTC 1676M 3751M
2025-09-23 11:52:22.613108674 UTC 1675M 3751M
2025-09-23 11:52:23.613130522 UTC 1675M 3751M
2025-09-23 11:52:24.613108027 UTC 1675M 3751M
2025-09-23 11:52:25.613299533 UTC 1688M 3738M
2025-09-23 11:52:26.61309684 UTC 1688M 3738M
2025-09-23 11:52:27.613093271 UTC 1688M 3737M

Copy link

Transaction cost differences

No cost or size differences found

@ffakenz ffakenz moved this to In progress 🕐 in ☕ Hydra Team Work Sep 17, 2025
@ffakenz ffakenz force-pushed the follow-up-deposit-recovering-closed-state branch from 3615469 to 31f3b70 Compare September 17, 2025 18:18
@ffakenz ffakenz marked this pull request as ready for review September 17, 2025 18:18
@ffakenz ffakenz moved this from In progress 🕐 to In review 👀 in ☕ Hydra Team Work Sep 17, 2025
@ffakenz ffakenz changed the title Follow up: deposit recovering closed state Follow up: deposit recovering in all states Sep 17, 2025
@ffakenz ffakenz force-pushed the follow-up-deposit-recovering-closed-state branch 4 times, most recently from 04323b2 to b4becf7 Compare September 19, 2025 16:03
Copy link
Contributor

@v0d1ch v0d1ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ffakenz ffakenz force-pushed the follow-up-deposit-recovering-closed-state branch from 44d3e69 to db79852 Compare September 23, 2025 08:31
@ffakenz ffakenz force-pushed the follow-up-deposit-recovering-closed-state branch from 85e1bcd to 24eb754 Compare September 23, 2025 11:38
@ffakenz ffakenz merged commit 63046df into master Sep 23, 2025
38 of 41 checks passed
@ffakenz ffakenz deleted the follow-up-deposit-recovering-closed-state branch September 23, 2025 12:32
@github-project-automation github-project-automation bot moved this from In review 👀 to Done ✔ in ☕ Hydra Team Work Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done ✔

Development

Successfully merging this pull request may close these issues.

Enable recovering in closed state too

3 participants