Skip to content

Handle better Blockfrost no funds error on hydra setup - #2261

Merged
noonio merged 8 commits into
masterfrom
vrom911/2194-blockfrost-no-funds-better-error
Sep 26, 2025
Merged

noonio merged 8 commits into
masterfrom
vrom911/2194-blockfrost-no-funds-better-error

Conversation

@vrom911

@vrom911 vrom911 commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

Resolves #2194

Before these changes, if we freshly create an address and try to run publish we would get the following error

> cabal run hydra-node -- publish-scripts --blockfrost blockfrost-project.txt --cardano-signing-key fresh.sk
hydra-node: BlockfrostAPIError {context = "queryUTxOFor", errorMsg = "BlockfrostNotFound"}

which doesn't provide much info.

With the changes I made, we now receive:

> cabal run hydra-node -- publish-scripts --blockfrost blockfrost-project.txt --cardano-signing-key fresh.sk
Could not find any funds for address addr_test1vq8e5c3w22t0kuwxc6jqr7dt9h3rkxzl9ez52mpdrugt8cc24hxqd. Please ensure the address has funds and is on-chain. Error: BlockfrostAPIError "BlockfrostNotFound"

If I fund the address and rerun the command, I successfully get:

cabal run hydra-node -- publish-scripts --blockfrost blockfrost-project.txt --cardano-signing-key fresh.sk
99ee6484db13ca1df75c821bd88861ad280916e3e0562351da2e6d1232957bf1,edff321386634e684428fa79af72881f02bcc122a39ea1eeefab1226485a7fd9,7aa2a683c005142e63878905106cc006c8ff7ba6e0ac39473ae0c3817b96bfb4

This PR introduces a better description of the error for the user's benefit.


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

@vrom911 vrom911 self-assigned this Sep 17, 2025
@vrom911
vrom911 requested a review from a team September 17, 2025 13:38
@github-actions

github-actions Bot commented Sep 17, 2025 •

Copy link
Copy Markdown

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-26 10:48:23.739626536 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 5834 10.93 3.49 0.52
2 6035 12.23 3.86 0.54
3 6239 14.29 4.51 0.57
5 6640 18.60 5.87 0.64
10 7646 29.57 9.34 0.79
43 14282 98.95 30.93 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 738 3.38 1.73 0.22
3 921 4.36 2.33 0.24
5 1269 6.41 3.60 0.28
10 2176 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 24.46 7.13 0.42
2 114 636 34.30 9.88 0.53
3 171 747 41.22 11.92 0.60
4 225 862 50.72 14.59 0.70
5 281 969 62.39 17.75 0.82
6 337 1081 72.09 20.53 0.93
7 394 1192 75.74 21.76 0.97
8 451 1303 86.18 24.86 1.08
9 504 1414 95.81 27.46 1.18

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1823 23.92 7.60 0.48
2 1949 25.84 8.78 0.51
3 2015 25.94 9.49 0.52
5 2428 32.02 12.53 0.61
10 3110 40.96 18.34 0.75
41 7775 99.98 55.44 1.70

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 637 22.77 7.36 0.42
2 744 24.31 8.46 0.44
3 972 27.04 9.88 0.48
5 1221 29.08 11.77 0.52
10 2105 40.53 18.31 0.70
42 6651 95.91 55.01 1.61

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 683 27.51 8.47 0.46
2 774 28.51 9.39 0.48
3 921 32.68 11.22 0.54
5 1230 34.26 13.01 0.58
10 1885 46.02 19.61 0.75
37 6166 99.10 52.61 1.60

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 691 33.79 10.15 0.53
2 852 36.64 11.62 0.57
3 900 37.16 12.39 0.58
5 1259 42.64 15.28 0.66
10 2056 54.21 21.85 0.84
31 5032 99.88 48.50 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 5816 27.08 9.09 0.69
2 5964 37.09 12.51 0.80
3 6184 46.74 15.83 0.91
4 6249 53.69 18.06 0.99
5 6389 60.00 20.15 1.06
6 6476 69.48 23.38 1.17
7 6682 81.45 27.32 1.30
8 6919 91.88 31.07 1.42

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 19.82 6.63 0.61
10 5 284 6004 29.53 10.50 0.73
10 10 569 6173 38.18 14.00 0.83
10 20 1137 6511 59.98 22.53 1.08
10 39 2219 7158 98.05 37.58 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-09-26 10:51:40.524173342 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 5.290706606
P99 7.562685379999988ms
P95 6.3797539500000005ms
P50 5.1072595ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-09-26 10:50:25.397025793 UTC 1325M 6821M
2025-09-26 10:50:26.39693976 UTC 1350M 6795M
2025-09-26 10:50:27.396890517 UTC 1414M 6657M
2025-09-26 10:50:28.396946011 UTC 1432M 6639M
2025-09-26 10:50:29.396940447 UTC 1437M 6630M
2025-09-26 10:50:30.396887419 UTC 1451M 6613M
2025-09-26 10:50:31.396894932 UTC 1451M 6613M
2025-09-26 10:50:32.396888855 UTC 1451M 6613M
2025-09-26 10:50:33.396871326 UTC 1451M 6613M
2025-09-26 10:50:34.396979749 UTC 1451M 6613M
2025-09-26 10:50:35.396991143 UTC 1451M 6613M
2025-09-26 10:50:36.396966864 UTC 1451M 6613M
2025-09-26 10:50:37.396865558 UTC 1450M 6613M
2025-09-26 10:50:38.39695184 UTC 1450M 6613M
2025-09-26 10:50:39.396931366 UTC 1450M 6613M
2025-09-26 10:50:40.396924109 UTC 1451M 6612M
2025-09-26 10:50:41.39698091 UTC 1450M 6612M
2025-09-26 10:50:42.396967608 UTC 1450M 6612M
2025-09-26 10:50:43.396947899 UTC 1450M 6612M
2025-09-26 10:50:44.396949134 UTC 1450M 6612M
2025-09-26 10:50:45.396944029 UTC 1450M 6612M
2025-09-26 10:50:46.396932462 UTC 1450M 6612M
2025-09-26 10:50:47.396891476 UTC 1450M 6612M
2025-09-26 10:50:48.396884066 UTC 1450M 6612M
2025-09-26 10:50:49.396948251 UTC 1450M 6612M
2025-09-26 10:50:50.396984463 UTC 1454M 6608M
2025-09-26 10:50:51.396967447 UTC 1454M 6608M
2025-09-26 10:50:52.396948727 UTC 1454M 6608M

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 33.047136705
P99 56.36277875999999ms
P95 46.90846579999999ms
P50 31.493246499999998ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-09-26 10:51:03.701875687 UTC 1369M 6729M
2025-09-26 10:51:04.701842727 UTC 1369M 6729M
2025-09-26 10:51:05.701896972 UTC 1388M 6710M
2025-09-26 10:51:06.701886129 UTC 1530M 6489M
2025-09-26 10:51:07.701749574 UTC 1539M 6480M
2025-09-26 10:51:08.702865026 UTC 1569M 6449M
2025-09-26 10:51:09.702066993 UTC 1593M 6421M
2025-09-26 10:51:10.702387837 UTC 1614M 6389M
2025-09-26 10:51:11.701851662 UTC 1640M 6352M
2025-09-26 10:51:12.702985661 UTC 1654M 6327M
2025-09-26 10:51:13.702538878 UTC 1664M 6307M
2025-09-26 10:51:14.702620106 UTC 1673M 6287M
2025-09-26 10:51:15.70239729 UTC 1682M 6267M
2025-09-26 10:51:16.702950934 UTC 1702M 6236M
2025-09-26 10:51:17.702915915 UTC 1704M 6223M
2025-09-26 10:51:18.703420811 UTC 1706M 6213M
2025-09-26 10:51:19.701855314 UTC 1727M 6188M
2025-09-26 10:51:20.701851458 UTC 1732M 6183M
2025-09-26 10:51:21.701898664 UTC 1732M 6183M
2025-09-26 10:51:22.701849313 UTC 1732M 6183M
2025-09-26 10:51:23.701883237 UTC 1733M 6181M
2025-09-26 10:51:24.70190426 UTC 1733M 6181M
2025-09-26 10:51:25.70192395 UTC 1733M 6181M
2025-09-26 10:51:26.701788433 UTC 1733M 6181M
2025-09-26 10:51:27.701751351 UTC 1733M 6181M
2025-09-26 10:51:28.701860499 UTC 1733M 6181M
2025-09-26 10:51:29.701831024 UTC 1732M 6181M
2025-09-26 10:51:30.701798755 UTC 1732M 6181M
2025-09-26 10:51:31.701763136 UTC 1732M 6181M
2025-09-26 10:51:32.701853584 UTC 1732M 6181M
2025-09-26 10:51:33.701846863 UTC 1732M 6181M
2025-09-26 10:51:34.701933847 UTC 1732M 6181M
2025-09-26 10:51:35.701855992 UTC 1732M 6180M
2025-09-26 10:51:36.701829684 UTC 1732M 6180M
2025-09-26 10:51:37.701920948 UTC 1732M 6180M
2025-09-26 10:51:38.701736348 UTC 1733M 6179M
2025-09-26 10:51:39.701773617 UTC 1732M 6179M

@github-actions

Copy link
Copy Markdown

Transaction cost differences

No cost or size differences found

Comment thread hydra-node/src/Hydra/Chain/ScriptRegistry.hs
@vrom911
vrom911 requested a review from v0d1ch September 18, 2025 08:37
Comment thread hydra-node/src/Hydra/Chain/Blockfrost/Client.hs Outdated
@vrom911
vrom911 force-pushed the vrom911/2194-blockfrost-no-funds-better-error branch 2 times, most recently from 1224598 to ecea953 Compare September 22, 2025 10:10
@vrom911
vrom911 force-pushed the vrom911/2194-blockfrost-no-funds-better-error branch from ecea953 to 3e69d35 Compare September 22, 2025 10:21
@vrom911
vrom911 requested a review from v0d1ch September 22, 2025 10:55
@noonio
noonio enabled auto-merge September 26, 2025 10:43
@noonio
noonio merged commit 1d19dc4 into master Sep 26, 2025
18 of 19 checks passed
@noonio
noonio deleted the vrom911/2194-blockfrost-no-funds-better-error branch September 26, 2025 11:00
@noonio

noonio commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

I believe GitHub erroneously merged this; so I pushed directly to master to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlockfrostAPIError "BlockfrostNotFound" encountered immediately after Hydra node startup

3 participants