-
Notifications
You must be signed in to change notification settings - Fork 106
Blockfrost chain integration #1952
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
Blockfrost chain integration #1952
Conversation
246d10f to
5bd73a1
Compare
5e64ad8 to
05a0e8d
Compare
5bd73a1 to
5a7a1cd
Compare
05a0e8d to
255c4d0
Compare
255c4d0 to
216e88e
Compare
Transaction cost differencesScript summary
|
| 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 | - | - | ||
| 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) | - | - | - | - | - |
Transaction costsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Script summary
|
| 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 |
216e88e to
e7abdd1
Compare
44147b7 to
a86a429
Compare
5b31919 to
c3b71c3
Compare
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]>
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]>
0d4048c to
dc053c3
Compare
ffakenz
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
255cb60 to
5bf925f
Compare
Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
5bf925f to
8f29167
Compare
Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
3a5be18 to
19d1ae7
Compare
Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
19d1ae7 to
c7e3cb9
Compare
| - 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. |
There was a problem hiding this comment.
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
noonio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
Uh oh!
There was an error while loading. Please reload this page.