-
Notifications
You must be signed in to change notification settings - Fork 88
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
The hydra node can publish hydra scripts via blockfrost using --blockfrost #1907
base: master
Are you sure you want to change the base?
Conversation
61346f9
to
2df6034
Compare
Transaction cost differencesNo cost or size differences found |
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 | 6093 | 10.98 | 3.42 | 0.53 |
2 | 6292 | 13.47 | 4.19 | 0.57 |
3 | 6496 | 15.50 | 4.80 | 0.60 |
5 | 6895 | 20.19 | 6.25 | 0.66 |
10 | 7907 | 30.97 | 9.53 | 0.82 |
40 | 13935 | 98.39 | 30.22 | 1.78 |
Commit
transaction costs
This uses ada-only outputs for better comparability.
UTxO | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 559 | 2.44 | 1.16 | 0.20 |
2 | 741 | 3.38 | 1.73 | 0.22 |
3 | 919 | 4.36 | 2.33 | 0.24 |
5 | 1279 | 6.41 | 3.60 | 0.28 |
10 | 2180 | 12.13 | 7.25 | 0.40 |
54 | 10074 | 98.61 | 68.52 | 1.88 |
CollectCom
transaction costs
Parties | UTxO (bytes) | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|---|
1 | 57 | 525 | 26.44 | 7.58 | 0.44 |
2 | 114 | 636 | 35.86 | 10.21 | 0.54 |
3 | 170 | 747 | 45.83 | 12.98 | 0.65 |
4 | 228 | 858 | 50.75 | 14.59 | 0.70 |
5 | 282 | 969 | 65.05 | 18.37 | 0.85 |
6 | 341 | 1081 | 78.87 | 22.07 | 0.99 |
7 | 393 | 1192 | 78.47 | 22.41 | 1.00 |
8 | 450 | 1307 | 85.04 | 24.47 | 1.07 |
9 | 504 | 1414 | 97.18 | 27.79 | 1.20 |
Cost of Increment Transaction
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 1818 | 25.03 | 8.22 | 0.49 |
2 | 1886 | 25.98 | 9.08 | 0.51 |
3 | 2149 | 29.83 | 11.08 | 0.57 |
5 | 2279 | 30.48 | 12.50 | 0.59 |
10 | 3161 | 44.25 | 20.39 | 0.79 |
38 | 7231 | 97.74 | 56.20 | 1.66 |
Cost of Decrement Transaction
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 601 | 23.71 | 7.54 | 0.42 |
2 | 696 | 23.72 | 8.18 | 0.43 |
3 | 958 | 28.33 | 10.14 | 0.49 |
5 | 1150 | 29.79 | 11.85 | 0.53 |
10 | 2023 | 41.95 | 18.55 | 0.71 |
40 | 6393 | 98.84 | 54.24 | 1.62 |
Close
transaction costs
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 658 | 30.95 | 9.68 | 0.50 |
2 | 790 | 32.84 | 10.92 | 0.53 |
3 | 925 | 34.67 | 12.15 | 0.56 |
5 | 1267 | 37.10 | 14.40 | 0.61 |
10 | 2244 | 50.11 | 22.32 | 0.81 |
35 | 5824 | 98.78 | 54.49 | 1.60 |
Contest
transaction costs
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 704 | 35.95 | 11.01 | 0.55 |
2 | 888 | 38.77 | 12.63 | 0.59 |
3 | 954 | 40.28 | 13.63 | 0.62 |
5 | 1216 | 44.67 | 16.27 | 0.68 |
10 | 2121 | 58.96 | 24.38 | 0.90 |
26 | 4469 | 97.36 | 47.01 | 1.47 |
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 | 5985 | 28.29 | 9.32 | 0.71 |
2 | 6145 | 38.57 | 12.75 | 0.82 |
3 | 6334 | 49.12 | 16.25 | 0.94 |
4 | 6322 | 56.26 | 18.54 | 1.02 |
5 | 6516 | 66.45 | 21.94 | 1.13 |
6 | 6581 | 72.21 | 23.79 | 1.19 |
7 | 6792 | 80.44 | 26.57 | 1.29 |
8 | 6902 | 88.34 | 29.19 | 1.38 |
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 | 5 | 283 | 6259 | 30.97 | 10.82 | 0.75 |
10 | 10 | 569 | 6431 | 41.88 | 15.03 | 0.88 |
10 | 20 | 1137 | 6769 | 62.72 | 23.14 | 1.12 |
10 | 30 | 1707 | 7111 | 84.22 | 31.47 | 1.37 |
10 | 37 | 2107 | 7350 | 97.56 | 36.72 | 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-03-31 12:54:13.610174901 UTC
Baseline Scenario
Number of nodes | 1 |
---|---|
Number of txs | 300 |
Avg. Confirmation Time (ms) | 4.676077710 |
P99 | 7.373029939999992ms |
P95 | 5.5698067ms |
P50 | 4.391006000000001ms |
Number of Invalid txs | 0 |
Memory data
Time | Used | Free |
---|---|---|
2025-03-31 12:52:57.400434775 UTC | 867M | 6564M |
2025-03-31 12:53:02.400420049 UTC | 1005M | 6367M |
2025-03-31 12:53:07.400370056 UTC | 1005M | 6366M |
2025-03-31 12:53:12.4003507 UTC | 1017M | 6353M |
2025-03-31 12:53:17.400363058 UTC | 1019M | 6351M |
2025-03-31 12:53:22.40033081 UTC | 1019M | 6351M |
Three local nodes
Number of nodes | 3 |
---|---|
Number of txs | 900 |
Avg. Confirmation Time (ms) | 32.738731897 |
P99 | 70.66948986000001ms |
P95 | 55.69975874999999ms |
P50 | 29.281999ms |
Number of Invalid txs | 0 |
Memory data
Time | Used | Free |
---|---|---|
2025-03-31 12:53:35.602454826 UTC | 933M | 6447M |
2025-03-31 12:53:40.602693724 UTC | 1199M | 6180M |
2025-03-31 12:53:45.603705754 UTC | 1249M | 6073M |
2025-03-31 12:53:50.602613631 UTC | 1259M | 6016M |
2025-03-31 12:53:55.602588537 UTC | 1260M | 6007M |
2025-03-31 12:54:00.60249345 UTC | 1265M | 6001M |
2025-03-31 12:54:05.602669264 UTC | 1267M | 5999M |
2025-03-31 12:54:10.602575873 UTC | 1267M | 5998M |
64da63c
to
e13dbf2
Compare
6e05445
to
6d70b75
Compare
@v0d1ch What issue concretely did you encounter with the instance overlap? i.e. which of our instances would overlap with this one? |
@ch1bo json instance for |
Okay. This works for me: diff --git a/hydra-node/src/Hydra/Network/Message.hs b/hydra-node/src/Hydra/Network/Message.hs
index b7ea84b91d..14c4441a70 100644
--- a/hydra-node/src/Hydra/Network/Message.hs
+++ b/hydra-node/src/Hydra/Network/Message.hs
@@ -45,8 +45,8 @@ data Message tx
deriving stock instance IsTx tx => Eq (Message tx)
deriving stock instance IsTx tx => Show (Message tx)
-deriving anyclass instance IsTx tx => ToJSON (Message tx)
-deriving anyclass instance IsTx tx => FromJSON (Message tx)
+deriving anyclass instance {-# OVERLAPPABLE #-} IsTx tx => ToJSON (Message tx)
+deriving anyclass instance {-# OVERLAPPABLE #-} IsTx tx => FromJSON (Message tx)
instance ArbitraryIsTx tx => Arbitrary (Message tx) where
arbitrary = genericArbitrary We should add an explanation though and ideally we would have more fine-grained constraints in the future as that would make it more clear that |
Hmm... I already tried using |
Yup, this is what I used to get too:
|
95a1748
to
d59b491
Compare
e09c820
to
f58c56b
Compare
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]>
We submit a tx and wait to see it returned from blockfrost. Then we get the tx output utxo and use that for the next tx. Signed-off-by: Sasha Bogicevic <[email protected]>
There is an json instance for (Maybe PoolMetadata) which overlaps with our instances for Maybe types. This is a ugly workaround but I couldn't find anything else that works. Signed-off-by: Sasha Bogicevic <[email protected]>
Remove extra diff and pragma Signed-off-by: Sasha Bogicevic <[email protected]>
Introduce a function to re-map from blockfrost to ledger GenesisParameters Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
- small refactor Signed-off-by: Sasha Bogicevic <[email protected]>
f58c56b
to
f5b5a55
Compare
This is another chunk of work related to building and posting txs responsible for creating Hydra script outputs using Blockfrost
Unfortunately I had to use a fork of the official library since I could not find a workaround for overlapping json instance https://github.com/blockfrost/blockfrost-haskell/blob/1a5360a51a1b61a14ffac4827f30c1ed525dedf3/blockfrost-api/src/Blockfrost/Types/Cardano/Pools.hs#L170
Work here contains initial efforts by @ffakenz Refactor PublishOptions to support Blockfrost options + building and submitting relevant txs and code to connect publishing of scripts in this way.
One could test it like so: