-
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
Don't keep deposit script utxo in local state #1692
Conversation
f18f2a3
to
f24954d
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 | 5096 | 5.61 | 2.21 | 0.44 |
2 | 5302 | 7.40 | 2.93 | 0.46 |
3 | 5498 | 8.41 | 3.32 | 0.48 |
5 | 5901 | 11.12 | 4.39 | 0.53 |
10 | 6906 | 18.11 | 7.16 | 0.65 |
57 | 16359 | 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 | 569 | 10.84 | 4.26 | 0.29 |
2 | 758 | 14.31 | 5.80 | 0.34 |
3 | 944 | 17.92 | 7.39 | 0.39 |
5 | 1319 | 25.56 | 10.73 | 0.49 |
10 | 2253 | 47.11 | 19.97 | 0.77 |
19 | 3937 | 94.71 | 39.81 | 1.38 |
CollectCom
transaction costs
Parties | UTxO (bytes) | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|---|
1 | 57 | 560 | 19.87 | 7.59 | 0.39 |
2 | 114 | 671 | 28.85 | 10.97 | 0.49 |
3 | 171 | 782 | 37.75 | 14.35 | 0.59 |
4 | 227 | 893 | 43.68 | 16.61 | 0.66 |
5 | 283 | 1004 | 48.66 | 18.55 | 0.72 |
6 | 337 | 1116 | 58.69 | 22.36 | 0.83 |
7 | 393 | 1227 | 71.34 | 27.08 | 0.98 |
8 | 448 | 1338 | 83.83 | 31.78 | 1.12 |
9 | 504 | 1449 | 80.85 | 30.80 | 1.09 |
Cost of Decrement Transaction
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 644 | 18.68 | 8.17 | 0.39 |
2 | 727 | 18.46 | 8.82 | 0.40 |
3 | 952 | 22.35 | 11.14 | 0.45 |
5 | 1233 | 24.21 | 13.36 | 0.50 |
10 | 2047 | 34.44 | 21.25 | 0.67 |
49 | 7902 | 99.38 | 76.57 | 1.85 |
Close
transaction costs
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 643 | 20.83 | 9.31 | 0.41 |
2 | 847 | 22.68 | 11.10 | 0.45 |
3 | 910 | 23.70 | 12.18 | 0.47 |
5 | 1226 | 26.89 | 15.34 | 0.53 |
10 | 1984 | 35.00 | 23.25 | 0.69 |
49 | 7848 | 96.89 | 83.94 | 1.88 |
Contest
transaction costs
Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
---|---|---|---|---|
1 | 705 | 26.76 | 11.48 | 0.48 |
2 | 806 | 28.53 | 13.02 | 0.51 |
3 | 945 | 30.35 | 14.59 | 0.54 |
5 | 1250 | 34.20 | 17.99 | 0.61 |
10 | 1933 | 43.08 | 25.79 | 0.77 |
39 | 6109 | 96.94 | 73.19 | 1.73 |
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 | 4894 | 12.53 | 5.11 | 0.50 |
2 | 5049 | 21.33 | 9.09 | 0.61 |
3 | 5208 | 28.48 | 12.29 | 0.70 |
4 | 5448 | 36.26 | 15.83 | 0.80 |
5 | 5485 | 42.60 | 18.49 | 0.87 |
6 | 5597 | 48.98 | 21.28 | 0.95 |
7 | 5817 | 55.48 | 24.24 | 1.03 |
8 | 5914 | 58.28 | 25.26 | 1.06 |
9 | 6181 | 72.72 | 31.88 | 1.24 |
10 | 6137 | 75.12 | 32.65 | 1.26 |
11 | 6188 | 82.96 | 35.94 | 1.35 |
12 | 6344 | 85.98 | 37.24 | 1.39 |
13 | 6625 | 97.87 | 42.68 | 1.54 |
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 | 9.79 | 4.09 | 0.48 |
10 | 1 | 56 | 5122 | 11.75 | 5.15 | 0.51 |
10 | 5 | 285 | 5259 | 15.83 | 7.79 | 0.57 |
10 | 10 | 569 | 5428 | 21.87 | 11.49 | 0.65 |
10 | 20 | 1138 | 5768 | 33.16 | 18.55 | 0.81 |
10 | 30 | 1710 | 6112 | 45.04 | 25.88 | 0.97 |
10 | 40 | 2278 | 6450 | 56.74 | 33.12 | 1.13 |
10 | 50 | 2845 | 6786 | 68.44 | 40.36 | 1.29 |
10 | 77 | 4386 | 7707 | 99.46 | 59.69 | 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-10 10:28:47.72750292 UTC
Baseline Scenario
Number of nodes | 1 |
---|---|
Number of txs | 3000 |
Avg. Confirmation Time (ms) | 4.699305991 |
P99 | 9.231895039999998ms |
P95 | 5.954034199999999ms |
P50 | 4.447392499999999ms |
Number of Invalid txs | 0 |
Three local nodes
Number of nodes | 3 |
---|---|
Number of txs | 9000 |
Avg. Confirmation Time (ms) | 25.201241084 |
P99 | 71.64419447000175ms |
P95 | 34.662336349999975ms |
P50 | 22.7915835ms |
Number of Invalid txs | 0 |
860231f
to
f5e5309
Compare
7bd5743
to
0a36f5b
Compare
We don't need to keep the deposit script utxo around since it is already observed thus we can find it in the chain UTxO state
Different changes all related to removal of unneeded fields
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 great!
463fd6f
to
2943ad0
Compare
Why
This is a leftover from off-chain changes needed to implement #199
We kept in the local state a map of UTxO we already observed so this simplifies the code around that since the observed UTxO is already to be found in the chain state UTxO. Now we keep a list of
[(TxId, UTxO)]
where UTxO is just there to check off-chain if the next snapshot is snapshotting exactly what we saw already as (utxoToCommit
).What
Remove the local map and fields in the observations for increment/recover and rely completely on observed UTxO (
spendableUTxO
)