Skip to content

Conversation

@v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Apr 16, 2025

  • Final step for the blockfrost integration.

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

@v0d1ch v0d1ch added this to the 0.22.0 milestone Apr 16, 2025
@v0d1ch v0d1ch self-assigned this Apr 16, 2025
@v0d1ch v0d1ch changed the base branch from master to blockfrost-time-handle April 16, 2025 09:25
@v0d1ch v0d1ch moved this from Triage 🏥 to In progress 🕐 in ☕ Hydra Team Work Apr 16, 2025
@v0d1ch v0d1ch force-pushed the blockfrost-time-handle branch from 246d10f to 5bd73a1 Compare April 16, 2025 11:49
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch 2 times, most recently from 5e64ad8 to 05a0e8d Compare April 16, 2025 12:26
@v0d1ch v0d1ch force-pushed the blockfrost-time-handle branch from 5bd73a1 to 5a7a1cd Compare April 16, 2025 12:28
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch from 05a0e8d to 255c4d0 Compare April 16, 2025 12:29
@v0d1ch v0d1ch marked this pull request as ready for review April 16, 2025 12:30
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch from 255c4d0 to 216e88e Compare April 16, 2025 12:31
@github-actions
Copy link

github-actions bot commented Apr 16, 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 - - - -
43 - - - -

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

Cost of Increment Transaction

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

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

Contest transaction costs

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

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 16, 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-05-21 11:00:59.009590843 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 be6ebc744208c660bf0fdc1cfbb5157477cd305de5b1777e575cbb4c 14665
μHead 1f47a42d1d6edc32ccd834acb19d5db3b2a5232f0bd7eaa8908dc519* 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 5841 10.35 3.28 0.51
2 6035 12.29 3.88 0.54
3 6238 14.35 4.53 0.57
5 6640 18.38 5.79 0.63
10 7646 29.09 9.17 0.79
43 14281 98.73 30.85 1.80

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 558 2.44 1.16 0.20
2 739 3.38 1.73 0.22
3 922 4.36 2.33 0.24
5 1280 6.41 3.60 0.28
10 2178 12.13 7.25 0.40
54 10070 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 525 25.20 7.30 0.43
2 114 636 33.25 9.63 0.52
3 171 747 41.50 12.01 0.61
4 227 858 47.61 13.82 0.67
5 283 969 56.04 16.26 0.76
6 338 1081 73.67 20.91 0.94
7 395 1192 72.42 20.97 0.94
8 451 1307 83.56 24.27 1.06
9 506 1414 98.37 28.13 1.21

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1789 24.16 8.03 0.48
2 1887 24.32 8.71 0.49
3 2123 27.64 10.57 0.54
5 2437 31.98 13.31 0.61
10 3036 38.31 18.59 0.73
41 7778 97.91 58.79 1.71

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 625 22.50 7.27 0.41
2 806 25.02 8.64 0.45
3 899 25.48 9.44 0.46
5 1201 29.66 11.93 0.53
10 1846 36.58 17.17 0.65
42 6746 99.48 56.02 1.65

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 606 28.36 8.95 0.47
2 774 28.43 9.71 0.48
3 872 31.91 11.38 0.53
5 1194 36.06 14.10 0.60
10 2302 47.95 22.00 0.80
36 5871 94.94 54.16 1.57

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 687 33.73 10.51 0.53
2 850 36.29 12.05 0.57
3 984 38.38 13.35 0.60
5 1268 42.43 15.92 0.66
10 1971 53.03 22.58 0.83
29 4975 98.47 49.97 1.52

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 5790 26.97 9.03 0.69
2 5853 34.68 11.57 0.77
3 6099 45.67 15.36 0.90
4 6197 51.91 17.42 0.97
5 6364 64.39 21.63 1.11
6 6499 73.75 24.76 1.21
7 6560 78.75 26.39 1.27
8 6816 94.73 31.96 1.45

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 1 57 5869 22.30 7.58 0.64
10 5 285 6005 29.80 10.58 0.73
10 10 568 6173 38.20 14.00 0.83
10 20 1137 6511 59.57 22.38 1.08
10 30 1709 6855 79.83 30.38 1.32
10 39 2221 7160 98.11 37.59 1.53

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-05-21 11:04:28.628204723 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.159833000
P99 7.677654179999976ms
P95 4.851177400000001ms
P50 3.9982515000000003ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-05-21 11:03:07.928652115 UTC 772M 6612M
2025-05-21 11:03:12.92849302 UTC 888M 6445M
2025-05-21 11:03:17.928555349 UTC 888M 6445M
2025-05-21 11:03:22.928473545 UTC 888M 6445M
2025-05-21 11:03:27.928523442 UTC 898M 6435M
2025-05-21 11:03:32.928567574 UTC 898M 6435M

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 34.011854232
P99 74.04987032000001ms
P95 58.18456699999999ms
P50 29.4427965ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-05-21 11:03:46.506372011 UTC 803M 6564M
2025-05-21 11:03:51.50668122 UTC 1029M 6255M
2025-05-21 11:03:56.507964523 UTC 1090M 6134M
2025-05-21 11:04:01.506675968 UTC 1095M 6084M
2025-05-21 11:04:06.506474345 UTC 1096M 6082M
2025-05-21 11:04:11.506606892 UTC 1100M 6078M
2025-05-21 11:04:16.506628253 UTC 1102M 6075M
2025-05-21 11:04:21.506536084 UTC 1103M 6074M
2025-05-21 11:04:26.506516395 UTC 1104M 6073M

@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch from 216e88e to e7abdd1 Compare April 16, 2025 13:01
@v0d1ch v0d1ch moved this from In progress 🕐 to In review 👀 in ☕ Hydra Team Work Apr 16, 2025
@v0d1ch v0d1ch requested a review from a team April 16, 2025 13:31
@ch1bo ch1bo added the stacked Stacked diff. Review it, but leave merging to the author. label Apr 17, 2025
@github-project-automation github-project-automation bot moved this from In review 👀 to In progress 🕐 in ☕ Hydra Team Work Apr 17, 2025
@v0d1ch v0d1ch requested a review from ch1bo April 17, 2025 08:08
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch 6 times, most recently from 44147b7 to a86a429 Compare April 23, 2025 16:17
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch from 5b31919 to c3b71c3 Compare April 24, 2025 14:00
v0d1ch added 8 commits May 20, 2025 10:36
This slightly improves the design by adding BackendOps
instances for underlying types and then have one instance for
ChainBackend. Too bad we can't derive this instance (yet).

Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch from 0d4048c to dc053c3 Compare May 20, 2025 09:40
Copy link
Contributor

@ffakenz ffakenz left a comment

Choose a reason for hiding this comment

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

nice job!

excited to see this in action already!

import Hydra.Chain.CardanoClient qualified as CardanoClient
import Hydra.Tx (ScriptRegistry)

class ChainBackend a where
Copy link
Contributor

Choose a reason for hiding this comment

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

in love with this type class! <3

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a fan of this kind of lawless overloading, but if we must do this then it should be a monad class. methods should not have constraints in the context.

An example of this kind of style is in pandoc:

https://hackage-content.haskell.org/package/pandoc-3.7.0.1/docs/Text-Pandoc-Class.html#t:PandocMonad

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@locallycompact I lean towards your approach but even more I think handles would be appropriate considering the our coding style. Let's do the changes as a follow up if you agree since this PR is dragging for a long time.

@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch 6 times, most recently from 255cb60 to 5bf925f Compare May 20, 2025 13:10
v0d1ch added 2 commits May 20, 2025 15:25
Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch from 5bf925f to 8f29167 Compare May 20, 2025 13:25
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch from 3a5be18 to 19d1ae7 Compare May 21, 2025 10:22
@v0d1ch v0d1ch force-pushed the blockfrost-load-chain-context branch from 19d1ae7 to c7e3cb9 Compare May 21, 2025 10:57
- Change to the `ReqSn` message in the Hydra network protocol
- Added `DepositExpired` for when a deposit was deemed expired.

- Enable blockfrost integration for hydra-node.
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add an issue to add a documentation section about how to use it

Copy link
Contributor

@noonio noonio left a comment

Choose a reason for hiding this comment

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

🥳

@noonio noonio merged commit b9c1ba8 into blockfrost-time-handle May 21, 2025
22 of 23 checks passed
@noonio noonio deleted the blockfrost-load-chain-context branch May 21, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blockfrost stacked Stacked diff. Review it, but leave merging to the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants