-
Notifications
You must be signed in to change notification settings - Fork 90
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
base: blockfrost-time-handle
Are you sure you want to change the base?
Conversation
v0d1ch
commented
Apr 16, 2025
•
edited
Loading
edited
- 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
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 | - | - | - | - |
5 | - | - | - | - |
10 | - | - | - | - |
43 | - | +0.38 | +0.09 | +0.01 |
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 | 5837 | 10.81 | 3.44 | 0.52 |
2 | 6037 | 12.41 | 3.92 | 0.54 |
3 | 6236 | 14.73 | 4.66 | 0.58 |
5 | 6646 | 18.80 | 5.94 | 0.64 |
10 | 7646 | 29.09 | 9.17 | 0.79 |
43 | 14279 | 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 | 561 | 2.44 | 1.16 | 0.20 |
2 | 740 | 3.38 | 1.73 | 0.22 |
3 | 920 | 4.36 | 2.33 | 0.24 |
5 | 1280 | 6.41 | 3.60 | 0.28 |
10 | 2177 | 12.13 | 7.25 | 0.40 |
54 | 10056 | 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.26 | 9.63 | 0.52 |
3 | 171 | 747 | 43.74 | 12.51 | 0.63 |
4 | 226 | 858 | 48.12 | 13.94 | 0.68 |
5 | 283 | 974 | 60.88 | 17.41 | 0.81 |
6 | 339 | 1081 | 68.27 | 19.58 | 0.89 |
7 | 395 | 1192 | 75.57 | 21.90 | 0.97 |
8 | 449 | 1303 | 98.92 | 27.76 | 1.21 |
9 | 508 | 1414 | 93.43 | 26.84 | 1.16 |
Cost of Increment Transaction
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 1810 | 24.16 | 8.03 | 0.48 |
2 | 1959 | 25.35 | 9.11 | 0.51 |
3 | 2021 | 26.18 | 9.93 | 0.52 |
5 | 2333 | 30.15 | 12.59 | 0.59 |
10 | 3218 | 41.31 | 19.75 | 0.77 |
39 | 7280 | 91.79 | 55.29 | 1.61 |
Cost of Decrement Transaction
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 589 | 22.50 | 7.27 | 0.41 |
2 | 756 | 23.59 | 8.21 | 0.43 |
3 | 878 | 24.98 | 9.27 | 0.46 |
5 | 1312 | 31.80 | 12.54 | 0.56 |
10 | 1896 | 38.62 | 17.75 | 0.67 |
40 | 6454 | 94.24 | 53.22 | 1.58 |
Close
transaction costs
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 665 | 28.99 | 9.24 | 0.48 |
2 | 774 | 28.43 | 9.71 | 0.48 |
3 | 986 | 33.22 | 11.99 | 0.55 |
5 | 1300 | 34.76 | 13.88 | 0.59 |
10 | 1956 | 43.79 | 20.12 | 0.74 |
38 | 6265 | 99.83 | 57.32 | 1.65 |
Contest
transaction costs
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 667 | 33.73 | 10.50 | 0.53 |
2 | 814 | 35.77 | 11.79 | 0.56 |
3 | 1042 | 39.09 | 13.67 | 0.61 |
5 | 1262 | 42.38 | 15.91 | 0.66 |
10 | 2036 | 54.33 | 23.17 | 0.85 |
30 | 4983 | 99.06 | 50.61 | 1.53 |
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 | 5789 | 26.97 | 9.03 | 0.69 |
2 | 5917 | 35.84 | 12.00 | 0.79 |
3 | 6128 | 46.41 | 15.63 | 0.91 |
4 | 6144 | 53.22 | 17.81 | 0.98 |
5 | 6352 | 64.87 | 21.75 | 1.11 |
6 | 6442 | 72.83 | 24.36 | 1.20 |
7 | 6700 | 85.63 | 28.87 | 1.34 |
8 | 6584 | 81.52 | 27.22 | 1.29 |
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 | 5835 | 19.19 | 6.41 | 0.61 |
10 | 1 | 57 | 5868 | 21.67 | 7.37 | 0.64 |
10 | 5 | 284 | 6003 | 29.10 | 10.35 | 0.72 |
10 | 10 | 569 | 6173 | 38.38 | 14.07 | 0.83 |
10 | 20 | 1139 | 6513 | 59.76 | 22.45 | 1.08 |
10 | 30 | 1707 | 6853 | 79.64 | 30.32 | 1.31 |
10 | 38 | 2164 | 7127 | 96.50 | 36.94 | 1.51 |
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 08:30:57.261396813 UTC
Baseline Scenario
Number of nodes | 1 |
---|---|
Number of txs | 300 |
Avg. Confirmation Time (ms) | 4.148266246 |
P99 | 5.730023859999962ms |
P95 | 4.7965254ms |
P50 | 4.012975ms |
Number of Invalid txs | 0 |
Memory data
Time | Used | Free |
---|---|---|
2025-05-21 08:29:42.54098802 UTC | 730M | 6721M |
2025-05-21 08:29:47.54090114 UTC | 841M | 6569M |
2025-05-21 08:29:52.540869667 UTC | 833M | 6576M |
2025-05-21 08:29:57.5408578 UTC | 833M | 6576M |
2025-05-21 08:30:02.540848191 UTC | 838M | 6571M |
2025-05-21 08:30:07.540765002 UTC | 839M | 6570M |
Three local nodes
Number of nodes | 3 |
---|---|
Number of txs | 900 |
Avg. Confirmation Time (ms) | 26.894312210 |
P99 | 39.91703951ms |
P95 | 35.39602984999999ms |
P50 | 25.973728ms |
Number of Invalid txs | 0 |
Memory data
Time | Used | Free |
---|---|---|
2025-05-21 08:30:20.504030364 UTC | 757M | 6687M |
2025-05-21 08:30:25.506700768 UTC | 974M | 6387M |
2025-05-21 08:30:30.505757064 UTC | 1029M | 6266M |
2025-05-21 08:30:35.504218951 UTC | 1033M | 6224M |
2025-05-21 08:30:40.504291134 UTC | 1034M | 6221M |
2025-05-21 08:30:45.504141598 UTC | 1036M | 6218M |
2025-05-21 08:30:50.504284745 UTC | 1035M | 6218M |
2025-05-21 08:30:55.504118425 UTC | 1036M | 6217M |
216e88e
to
e7abdd1
Compare
44147b7
to
a86a429
Compare
5b31919
to
c3b71c3
Compare
Added function to wait for specific UTxO. I'd like to refactor blockfrost client and keep only the least amount of code possible. 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]>
Also a small refactor in the faucet. Signed-off-by: Sasha Bogicevic <[email protected]>
Make queryUTxOByTxIn take in tx hash as Text Increase utxo amounts in test to cover for script execution. Small refactors here and there Signed-off-by: Sasha Bogicevic <[email protected]>
Problem was that we were starting from scratch each time because of retry. Using TMVar to record block hash solved this problem. Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
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
"18a22e4400bb478fec5dcad29b32aabd00b822aa721dccf8c9821354aabea153", | ||
"d0bafe586ebb838b9f8f8bb533892be0cb740a68d6f2b77b9f2d4f2c9ce08464", | ||
"b6fa856a9c21da5be600bda4da3b31dbbe213b0fe97f62340551e465fea3d963", | ||
"a726aedba74a0dc5f3ead4dc662fac9dfe1e566f88a9f7b9ebe7bf47e569df39" |
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.
What's happening here? Why so many script tx ids?
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 guess the generator does it. I'll see if anything changed there.
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]>