Skip to content
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

WIP: Increment validator and corresponding mutations #1715

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Oct 18, 2024


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

@v0d1ch v0d1ch self-assigned this Oct 18, 2024
@v0d1ch v0d1ch force-pushed the increment-mutations branch 14 times, most recently from fbdb64f to 81df483 Compare October 23, 2024 09:29
Copy link

github-actions bot commented Oct 24, 2024

Transaction cost differences

Script summary

Name Size (Bytes)
νInitial -
νCommit -
νHead +1024
μHead -
νDeposit $${\color{green}-1978.00}$$

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
57 - - - -

Commit transaction costs

UTxO Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
19 - - - -

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 - - +0.11 +0.03 -
2 - - +0.28 +0.09 +0.01
3 - - +0.43 +0.14 +0.01
4 - - +4.4 +1.59 +0.05
5 - - +0.17 +0.01 -
6 - - $${\color{green}-2.66}$$ $${\color{green}-1.01}$$ $${\color{green}-0.03}$$
7 - - $${\color{green}-7.08}$$ $${\color{green}-2.61}$$ $${\color{green}-0.07}$$
8 - - $${\color{green}-8.16}$$ $${\color{green}-3.06}$$ $${\color{green}-0.09}$$
9 - - +2.84 +1.0 +0.03

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 +1180 1.33 0.88 0.07
2 +1148 0.51 0.68 0.06
3 +1121 0.17 0.66 0.06
5 +1306 2.77 2.2 0.1
10 +1121 0.63 2.13 0.07
50 +1122 0.28 7.88 0.11

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 +9.0 $${\color{green}-2.07}$$ $${\color{green}-1.10}$$ $${\color{green}-0.02}$$
2 +27.0 $${\color{green}-1.27}$$ $${\color{green}-0.94}$$ $${\color{green}-0.01}$$
3 $${\color{green}-8.00}$$ $${\color{green}-1.83}$$ $${\color{green}-1.43}$$ $${\color{green}-0.03}$$
5 +57.0 $${\color{green}-2.32}$$ $${\color{green}-1.42}$$ $${\color{green}-0.03}$$
10 +77.0 $${\color{green}-1.25}$$ $${\color{green}-2.34}$$ $${\color{green}-0.03}$$

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 $${\color{green}-43.00}$$ $${\color{green}-5.86}$$ $${\color{green}-2.14}$$ $${\color{green}-0.06}$$
2 $${\color{green}-17.00}$$ $${\color{green}-6.14}$$ $${\color{green}-2.22}$$ $${\color{green}-0.07}$$
3 +103.0 $${\color{green}-5.72}$$ $${\color{green}-1.67}$$ $${\color{green}-0.05}$$
5 $${\color{green}-167.00}$$ $${\color{green}-7.89}$$ $${\color{green}-3.27}$$ $${\color{green}-0.09}$$
10 $${\color{green}-67.00}$$ $${\color{green}-8.76}$$ $${\color{green}-3.19}$$ $${\color{green}-0.09}$$

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 $${\color{green}-4280.00}$$ +11.56 +4.95 $${\color{green}-0.06}$$
2 $${\color{green}-4294.00}$$ +6.9 +3.7 $${\color{green}-0.11}$$
3 $${\color{green}-4244.00}$$ +6.79 +4.52 $${\color{green}-0.09}$$
5 $${\color{green}-4171.00}$$ $${\color{green}-5.01}$$ +1.09 $${\color{green}-0.21}$$
10 $${\color{green}-3970.00}$$ $${\color{green}-25.38}$$ $${\color{green}-3.29}$$ $${\color{green}-0.41}$$

Abort transaction costs

Parties % max CPU % max Mem Min fee ₳ Tx size UTxO UTxO (bytes)

@v0d1ch v0d1ch force-pushed the increment-mutations branch 4 times, most recently from 041c291 to 966bb79 Compare October 25, 2024 10:25
Copy link

github-actions bot commented Oct 28, 2024

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 2024-11-08 11:37:50.32178 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial b512161ccb0652d7e9a0b540e4a3c808f73d6558a4bcabf374d85880 3969
νCommit ea444d37d226e71eef73ac78d149750da977feb588900135bf9e8221 692
νHead f3547e4acb813bd45148f4ca83517ef15e09aa3fce72b394b02af9b1 11821
μHead 506f56c2d16e45a268a379ce182a85767827ad6b723ade546b476da2* 4508
νDeposit de09cec5f84eedaf64186cb52ba4ee6e74e6fc368af25b90d457f352 1118
  • 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 5096 5.71 2.25 0.44
2 5298 7.17 2.84 0.46
3 5499 8.59 3.40 0.49
5 5901 11.39 4.51 0.53
10 6907 18.30 7.24 0.65
57 16355 82.85 32.77 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 754 14.31 5.80 0.34
3 940 17.92 7.39 0.39
5 1316 25.56 10.73 0.49
10 2252 47.11 19.97 0.77
19 3929 94.71 39.81 1.38

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 564 20.75 7.90 0.40
2 114 671 27.11 10.33 0.47
3 171 786 35.62 13.55 0.57
4 226 893 47.47 17.98 0.70
5 281 1004 54.49 20.68 0.78
6 339 1120 63.48 24.05 0.89
7 394 1227 73.19 27.76 1.00
8 450 1338 76.58 29.12 1.04

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1870 20.10 9.11 0.46
2 1938 20.67 10.04 0.47
3 2182 23.21 12.25 0.52
5 2476 27.26 15.72 0.59
10 3367 36.75 24.47 0.77
49 9067 99.54 85.10 1.97

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 636 18.72 8.18 0.39
2 798 19.44 9.17 0.41
3 921 20.76 10.47 0.43
5 1385 27.34 14.60 0.54
10 1827 30.48 19.70 0.62
49 7872 96.77 75.58 1.82

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 653 20.95 9.36 0.42
2 783 22.47 10.82 0.44
3 940 23.82 12.24 0.47
5 1290 27.58 15.80 0.54
10 2100 36.21 24.08 0.71
48 7590 95.15 82.08 1.84

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 704 26.86 11.52 0.48
2 884 29.08 13.42 0.52
3 998 30.73 14.91 0.55
5 1243 34.32 18.03 0.61
10 2156 44.98 27.27 0.81
39 6243 97.96 74.11 1.75

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.49 6.62 0.54
2 5141 22.29 9.67 0.63
3 5231 28.39 12.25 0.70
4 5474 36.50 15.93 0.80
5 5549 40.90 17.78 0.85
6 5642 48.34 21.05 0.94
7 5803 57.40 24.99 1.05
8 6005 64.78 28.36 1.14
9 5886 63.67 27.42 1.12
10 6233 79.95 34.89 1.32
11 6230 84.75 36.84 1.37
12 6605 93.96 41.05 1.50

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.48 4.38 0.49
10 1 57 5124 10.78 4.73 0.50
10 5 285 5259 15.47 7.63 0.56
10 10 570 5429 21.51 11.33 0.64
10 20 1137 5766 33.79 18.82 0.81
10 30 1707 6108 45.08 25.89 0.97
10 40 2278 6449 56.97 33.22 1.13
10 50 2845 6786 68.28 40.29 1.29
10 76 4326 7670 99.09 59.31 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-11-08 11:40:11.433617107 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.679222803
P99 12.144181359999962ms
P95 6.474701850000001ms
P50 4.292377500000001ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 22.661040173
P99 40.11060869ms
P95 31.624636099999986ms
P50 21.259454499999997ms
Number of Invalid txs 0

@v0d1ch v0d1ch force-pushed the increment-mutations branch 3 times, most recently from efb9d72 to 01db7c4 Compare October 30, 2024 11:28
v0d1ch and others added 23 commits October 30, 2024 15:38
Currently failing because of missing script input so we need to
make sure to provide all needed UTxO when generating txs.
It still doesn't evaluate in terms of tx size but we will get there.
Seems like this redeemer is needed to cover all posible scenarios
and it is not captured in the spec so we will need to add this in.
Remove the haskell validator and connect the new aiken one. What is
outstanding is the check on Recover redeemer.
This step makes the rewrite final
Add Healthy module for contest mutations and ContestUnusedDec module for
corresponding mutations.
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.

2 participants