Repository navigation
Not observe invalid transactions - #1953
Conversation
Fixes hydra-tx observations used in hydra-node and hydra-explorer to never make an observation on invalid transactions. This avoids situations where adversaries may create transactions that do not pass on-chain validators, but deliberately mark the transaction with isValid = false to trick off-chain components.
b5cbbd2 to
c06345f
Compare
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 | 6091 | 11.23 | 3.50 | 0.53 |
| 2 | 6292 | 13.04 | 4.04 | 0.56 |
| 3 | 6493 | 15.28 | 4.73 | 0.59 |
| 5 | 6897 | 20.34 | 6.30 | 0.66 |
| 10 | 7904 | 31.40 | 9.68 | 0.82 |
| 40 | 13936 | 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 | 561 | 2.44 | 1.16 | 0.20 |
| 2 | 743 | 3.38 | 1.73 | 0.22 |
| 3 | 923 | 4.36 | 2.33 | 0.24 |
| 5 | 1277 | 6.41 | 3.60 | 0.28 |
| 10 | 2170 | 12.13 | 7.25 | 0.40 |
| 54 | 10059 | 98.61 | 68.52 | 1.88 |
CollectCom transaction costs
| Parties | UTxO (bytes) | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|---|
| 1 | 57 | 525 | 25.64 | 7.39 | 0.43 |
| 2 | 114 | 636 | 34.81 | 9.96 | 0.53 |
| 3 | 171 | 751 | 45.86 | 13.00 | 0.65 |
| 4 | 226 | 858 | 49.99 | 14.38 | 0.70 |
| 5 | 283 | 969 | 60.72 | 17.40 | 0.81 |
| 6 | 338 | 1081 | 79.34 | 22.25 | 1.00 |
| 7 | 396 | 1192 | 88.85 | 24.89 | 1.10 |
| 8 | 450 | 1303 | 98.25 | 27.48 | 1.20 |
Cost of Increment Transaction
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 1807 | 25.12 | 8.24 | 0.49 |
| 2 | 1886 | 25.98 | 9.08 | 0.51 |
| 3 | 2059 | 28.65 | 10.64 | 0.55 |
| 5 | 2364 | 32.51 | 13.26 | 0.61 |
| 10 | 3176 | 43.44 | 20.19 | 0.79 |
| 36 | 7145 | 97.54 | 55.07 | 1.65 |
Cost of Decrement Transaction
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 617 | 23.71 | 7.55 | 0.42 |
| 2 | 730 | 24.81 | 8.48 | 0.44 |
| 3 | 824 | 25.31 | 9.28 | 0.46 |
| 5 | 1129 | 30.37 | 12.03 | 0.53 |
| 10 | 1919 | 41.59 | 18.46 | 0.70 |
| 38 | 6046 | 94.64 | 51.72 | 1.55 |
Close transaction costs
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 711 | 29.19 | 9.23 | 0.48 |
| 2 | 775 | 32.84 | 10.92 | 0.53 |
| 3 | 949 | 32.77 | 11.64 | 0.54 |
| 5 | 1377 | 40.77 | 15.64 | 0.65 |
| 10 | 2001 | 50.54 | 21.96 | 0.80 |
| 31 | 5193 | 96.83 | 50.84 | 1.53 |
Contest transaction costs
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 696 | 35.95 | 11.01 | 0.55 |
| 2 | 768 | 37.49 | 12.02 | 0.57 |
| 3 | 1058 | 41.69 | 14.26 | 0.64 |
| 5 | 1248 | 45.21 | 16.53 | 0.69 |
| 10 | 2025 | 57.32 | 23.70 | 0.87 |
| 27 | 4645 | 99.41 | 48.43 | 1.51 |
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 | 5987 | 28.20 | 9.30 | 0.71 |
| 2 | 6138 | 38.45 | 12.72 | 0.82 |
| 3 | 6206 | 46.51 | 15.35 | 0.91 |
| 4 | 6445 | 57.94 | 19.21 | 1.04 |
| 5 | 6372 | 58.51 | 19.24 | 1.04 |
| 6 | 6805 | 78.78 | 26.11 | 1.27 |
| 7 | 6895 | 87.79 | 29.18 | 1.37 |
| 8 | 6993 | 96.66 | 31.96 | 1.47 |
| 9 | 6959 | 95.27 | 31.43 | 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 | 0 | 0 | 6091 | 20.58 | 6.77 | 0.63 |
| 10 | 5 | 285 | 6261 | 30.97 | 10.82 | 0.75 |
| 10 | 10 | 569 | 6430 | 40.96 | 14.72 | 0.87 |
| 10 | 38 | 2162 | 7381 | 99.70 | 37.55 | 1.55 |
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-04-16 19:56:14.407067516 UTC
Baseline Scenario
| Number of nodes | 1 |
|---|---|
| Number of txs | 300 |
| Avg. Confirmation Time (ms) | 4.476598286 |
| P99 | 6.682495559999993ms |
| P95 | 5.108360500000001ms |
| P50 | 4.1440725ms |
| Number of Invalid txs | 0 |
Memory data
| Time | Used | Free |
|---|---|---|
| 2025-04-16 19:54:58.658304677 UTC | 908M | 6323M |
| 2025-04-16 19:55:03.65829799 UTC | 1026M | 6112M |
| 2025-04-16 19:55:08.65826024 UTC | 1029M | 6110M |
| 2025-04-16 19:55:13.658338883 UTC | 1029M | 6109M |
| 2025-04-16 19:55:18.658305667 UTC | 1037M | 6101M |
| 2025-04-16 19:55:23.658310364 UTC | 1038M | 6100M |
Three local nodes
| Number of nodes | 3 |
|---|---|
| Number of txs | 900 |
| Avg. Confirmation Time (ms) | 31.210330968 |
| P99 | 72.91683242999997ms |
| P95 | 54.807220650000005ms |
| P50 | 27.5184135ms |
| Number of Invalid txs | 0 |
Memory data
| Time | Used | Free |
|---|---|---|
| 2025-04-16 19:55:37.49487945 UTC | 965M | 6182M |
| 2025-04-16 19:55:42.496047425 UTC | 1210M | 5930M |
| 2025-04-16 19:55:47.497614397 UTC | 1267M | 5808M |
| 2025-04-16 19:55:52.494973485 UTC | 1273M | 5764M |
| 2025-04-16 19:55:57.494983348 UTC | 1275M | 5762M |
| 2025-04-16 19:56:02.494915408 UTC | 1279M | 5757M |
| 2025-04-16 19:56:07.494902967 UTC | 1279M | 5756M |
| 2025-04-16 19:56:12.49493856 UTC | 1281M | 5753M |
Transaction cost differencesScript summary
|
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | - | - | - | - |
| 2 | - | - | - | - |
| 3 | - | - | - | - |
| 5 | - | - | - | - |
| 10 | - | - | - | - |
| 40 | - | - | - | - |
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 | - | - | - | - | - |
Cost of Increment Transaction
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | - | - | - | - |
| 2 | - | - | - | - |
| 3 | - | - | - | - |
| 5 | - | - | ||
| 10 | - | |||
| 37 | - | +0.38 | +0.09 | - |
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 | - | - | - | - |
| 34 | - | - | - | - |
Contest transaction costs
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | - | - | - | - |
| 2 | - | - | - | - |
| 3 | - | - | - | - |
| 5 | - | - | - | - |
| 10 | - | - | - | - |
| 27 | - | - | - | - |
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) | - | - | - | - | - |
Fixes hydra-tx observations used in hydra-node and hydra-explorer to never make an observation on invalid transactions.
This avoids situations where adversaries may create transactions that do not pass on-chain validators, but deliberately mark the transaction with isValid = false to trick off-chain components.