-
Notifications
You must be signed in to change notification settings - Fork 87
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
API: Full transaction in SnapshotConfirmed #1685
Conversation
cd0c211
to
2c97e77
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 | 5097 | 5.81 | 2.30 | 0.44 |
2 | 5295 | 7.18 | 2.84 | 0.46 |
3 | 5499 | 8.56 | 3.39 | 0.49 |
5 | 5899 | 11.12 | 4.39 | 0.53 |
10 | 6910 | 18.10 | 7.16 | 0.65 |
57 | 16355 | 82.91 | 32.79 | 1.78 |
Commit
transaction costs
This uses ada-only outputs for better comparability.
UTxO | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 567 | 10.84 | 4.26 | 0.29 |
2 | 758 | 14.31 | 5.80 | 0.34 |
3 | 941 | 17.92 | 7.39 | 0.39 |
5 | 1321 | 25.56 | 10.73 | 0.49 |
10 | 2257 | 47.11 | 19.97 | 0.77 |
19 | 3945 | 94.71 | 39.81 | 1.38 |
CollectCom
transaction costs
Parties | UTxO (bytes) | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|---|
1 | 57 | 560 | 19.84 | 7.58 | 0.39 |
2 | 114 | 671 | 27.94 | 10.64 | 0.48 |
3 | 171 | 782 | 36.57 | 13.91 | 0.58 |
4 | 227 | 893 | 46.50 | 17.65 | 0.69 |
5 | 281 | 1009 | 56.49 | 21.43 | 0.81 |
6 | 340 | 1116 | 57.72 | 21.98 | 0.82 |
7 | 396 | 1227 | 73.64 | 27.94 | 1.00 |
8 | 452 | 1338 | 75.21 | 28.61 | 1.02 |
9 | 504 | 1449 | 90.57 | 34.38 | 1.19 |
10 | 560 | 1560 | 87.11 | 33.23 | 1.16 |
Cost of Decrement Transaction
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 628 | 18.40 | 8.06 | 0.38 |
2 | 755 | 19.77 | 9.37 | 0.41 |
3 | 938 | 21.52 | 10.75 | 0.44 |
5 | 1163 | 23.48 | 13.09 | 0.49 |
10 | 2191 | 36.91 | 22.16 | 0.70 |
49 | 7858 | 97.26 | 75.79 | 1.83 |
Close
transaction costs
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 649 | 20.79 | 9.29 | 0.41 |
2 | 821 | 22.72 | 11.09 | 0.45 |
3 | 941 | 23.82 | 12.25 | 0.47 |
5 | 1288 | 27.43 | 15.74 | 0.54 |
10 | 1964 | 34.91 | 23.05 | 0.68 |
50 | 8103 | 98.76 | 86.10 | 1.93 |
Contest
transaction costs
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 705 | 26.81 | 11.50 | 0.48 |
2 | 815 | 28.57 | 13.03 | 0.51 |
3 | 994 | 30.76 | 14.92 | 0.55 |
5 | 1318 | 34.64 | 18.36 | 0.62 |
10 | 2099 | 44.31 | 26.83 | 0.79 |
39 | 6727 | 99.60 | 75.91 | 1.80 |
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 | 4967 | 15.47 | 6.61 | 0.54 |
2 | 5165 | 22.55 | 9.78 | 0.63 |
3 | 5176 | 25.69 | 10.95 | 0.66 |
4 | 5334 | 32.65 | 14.06 | 0.75 |
5 | 5509 | 42.26 | 18.37 | 0.87 |
6 | 5623 | 46.98 | 20.36 | 0.92 |
7 | 5815 | 56.41 | 24.61 | 1.04 |
8 | 5876 | 61.49 | 26.73 | 1.10 |
9 | 5907 | 59.52 | 25.52 | 1.08 |
10 | 6154 | 73.03 | 31.62 | 1.24 |
11 | 6379 | 82.65 | 36.11 | 1.36 |
12 | 6538 | 95.05 | 41.61 | 1.51 |
13 | 6707 | 98.22 | 43.02 | 1.55 |
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 | 5089 | 10.38 | 4.35 | 0.49 |
10 | 1 | 57 | 5123 | 11.55 | 5.07 | 0.51 |
10 | 5 | 285 | 5260 | 15.83 | 7.79 | 0.57 |
10 | 10 | 567 | 5426 | 21.08 | 11.15 | 0.64 |
10 | 20 | 1139 | 5768 | 33.44 | 18.68 | 0.81 |
10 | 30 | 1708 | 6109 | 45.52 | 26.08 | 0.97 |
10 | 40 | 2275 | 6447 | 56.74 | 33.12 | 1.13 |
10 | 50 | 2847 | 6788 | 68.72 | 40.49 | 1.30 |
10 | 76 | 4326 | 7670 | 99.47 | 59.48 | 1.72 |
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 2024-10-08 13:19:34.596131108 UTC
Baseline Scenario
Number of nodes | 1 |
---|---|
Number of txs | 3000 |
Avg. Confirmation Time (ms) | 4.432376369 |
P99 | 14.755218669999996ms |
P95 | 5.317036999999997ms |
P50 | 4.115134ms |
Number of Invalid txs | 0 |
Three local nodes
Number of nodes | 3 |
---|---|
Number of txs | 9000 |
Avg. Confirmation Time (ms) | 24.493858477 |
P99 | 118.22389684000002ms |
P95 | 33.204540049999956ms |
P50 | 20.996691ms |
Number of Invalid txs | 0 |
2c97e77
to
d7e984f
Compare
hydra-cluster failing here: https://github.com/cardano-scaling/hydra/actions/runs/11213268280/job/31165965017?pr=1685#step:5:2493 |
d7e984f
to
08cc773
Compare
08cc773
to
fe95a5b
Compare
Test Results543 tests +25 537 ✅ +25 32m 20s ⏱️ + 1m 34s Results for commit a125d9b. ± Comparison against base commit 5862033. This pull request removes 4 and adds 29 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Added a commit fixing hydraw to use I tested this myself by:
( pressing
|
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.
Looks good; and can confirm that it works as well!
This also updates TxValid to only include the transaction id, such that transactions are only submitted once per client still. Hence, this will not change the overall bandwidth requirement on websocket clients, but will make their implementation significantly easier. Before, if clients wanted to act on transactions this was a lot easier to do upon seing `TxValid`. However, this was only confirming local ledger application and not consensus / enforcability of this transaction onto the L1. The new API suggests to do the right thing by making it straight-forward to act upon seeing a transaction in a `SnapshotConfirmed`.
9fccdc2
to
a125d9b
Compare
Updates
SnapshotConfirmed
server output to contain full transactions (instead of only transaction ids). This also updates TxValid to only include the transaction id, such that transactions are only submitted once per client still. Hence, this will not change the overall bandwidth requirement on websocket clients, but will make their implementation significantly easier.Before, if clients wanted to act on transactions this was a lot easier to do upon seing
TxValid
. However, this was only confirming local ledger application and not consensus / enforcability of this transaction onto the L1.The new API suggests to do the right thing by making it straight-forward to act upon seeing a transaction in a
SnapshotConfirmed
.TBD: Changed
ServerOutput
field namesnapshotNumber
->number
to be consistent withversion
(and the internal Haskell data type names). Does anyone likeversion
->snapshotVersion
better as an alternative?TBD: The field holding the transaction id in
TxValid
is calledtransactionId
now. The transaction (envelop) itself though containstxId
. This feels a bit inconsistent, which of the two should be renamed?This will also make #1612 easier (is mentioned as a sub-task there).