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

Increment validator and corresponding mutations #1715

Open
wants to merge 75 commits into
base: master
Choose a base branch
from

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Oct 18, 2024

This PR includes many changes and they are all related to incremental commits and needed changes to make this possible.

❄️ On-chain parts of the code
❄️ Rewrite of deposit and initial script to aiken (this was needed to try to cut down on the tx sizes and try to publish scripts together)
❄️ Publish scripts separately (In the end all needed scripts didn't fit into the publishing transaction so we publish separately)


  • CHANGELOG updated or not needed
  • Documentation updated or not needed
  • Haddocks updated or not needed
  • No new TODOs introduced or explained herafter
    • some todo's left so we can revisit/improve on some code

@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 +1521
μHead $${\color{green}-5518.00}$$
νDeposit $${\color{green}-3747.00}$$

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 $${\color{green}-5518.00}$$ 1.3 0.34 $${\color{green}-0.23}$$
2 $${\color{green}-5518.00}$$ 1.58 0.42 $${\color{green}-0.22}$$
3 $${\color{green}-5518.00}$$ 1.87 0.49 $${\color{green}-0.22}$$
5 $${\color{green}-5518.00}$$ 2.45 0.63 $${\color{green}-0.22}$$
10 $${\color{green}-5518.00}$$ 3.9 1 $${\color{green}-0.20}$$

Commit transaction costs

UTxO Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
54 $${\color{green}-1.00}$$ - - -

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 - - +0.17 +0.04 -
2 - - +0.28 +0.07 +0.01
3 - - +1.41 +0.34 +0.01
4 - - $${\color{green}-2.60}$$ $${\color{green}-0.63}$$ $${\color{green}-0.03}$$
5 - - +0.24 +0.05 -
6 - - +0.64 +0.15 +0.01
7 - - +9.58 +2.28 +0.09
8 - - $${\color{green}-5.69}$$ $${\color{green}-1.37}$$ $${\color{green}-0.06}$$
9 - - +7.76 +1.84 +0.07

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1176 1.42 0.69 0.07
2 1144 0.59 0.51 0.06
3 1117 0.45 0.53 0.06
5 1302 3.63 1.75 0.09
10 1117 0.7 1.32 0.07

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 +9.0 $${\color{green}-1.66}$$ $${\color{green}-0.68}$$ $${\color{green}-0.01}$$
2 +27.0 $${\color{green}-0.69}$$ $${\color{green}-0.48}$$ $${\color{green}-0.01}$$
3 $${\color{green}-8.00}$$ $${\color{green}-1.23}$$ $${\color{green}-0.82}$$ $${\color{green}-0.02}$$
5 +57.0 $${\color{green}-1.45}$$ $${\color{green}-0.74}$$ $${\color{green}-0.01}$$
10 +77.0 $${\color{green}-0.62}$$ $${\color{green}-1.29}$$ $${\color{green}-0.01}$$

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 $${\color{green}-9.00}$$ $${\color{green}-3.50}$$ $${\color{green}-0.93}$$ $${\color{green}-0.04}$$
2 +17.0 $${\color{green}-3.74}$$ $${\color{green}-0.99}$$ $${\color{green}-0.04}$$
3 +138.0 $${\color{green}-2.81}$$ $${\color{green}-0.48}$$ $${\color{green}-0.02}$$
5 $${\color{green}-133.00}$$ $${\color{green}-5.53}$$ $${\color{green}-1.75}$$ $${\color{green}-0.06}$$
10 $${\color{green}-33.00}$$ $${\color{green}-5.25}$$ $${\color{green}-1.42}$$ $${\color{green}-0.06}$$

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 $${\color{green}-10871.00}$$ +5.97 +1.22 $${\color{green}-0.42}$$
2 $${\color{green}-10884.00}$$ $${\color{green}-0.60}$$ $${\color{green}-0.41}$$ $${\color{green}-0.49}$$
3 $${\color{green}-10835.00}$$ $${\color{green}-1.62}$$ $${\color{green}-0.13}$$ $${\color{green}-0.49}$$
5 $${\color{green}-10762.00}$$ $${\color{green}-17.85}$$ $${\color{green}-4.31}$$ $${\color{green}-0.65}$$
10 $${\color{green}-10561.00}$$ $${\color{green}-45.64}$$ $${\color{green}-10.48}$$ $${\color{green}-0.91}$$

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-12-06 15:42:41.070642873 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 00a6ddbc130ab92f5b7cb8d1ccd8d79eca5bfe25f6843c07b62841f0 2667
νCommit 3e5a776bcee213e3dfd15806952a10ac5590e3e97d09d62eb99266b2 690
νHead 4a8ce8925063be4ed17f90ec7b590dc17b3eb9f5ea34cd6c54afe107 14143
μHead 9a23ace1f3840c06493e9214016a2f3d29aba853fbdf72e1aecd0957* 5615
ν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 6200 10.17 3.24 0.53
2 6398 12.21 3.88 0.56
3 6602 14.55 4.63 0.59
5 7004 18.50 5.87 0.65
10 8010 28.98 9.18 0.80
44 14843 98.38 30.98 1.82

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 558 2.45 1.17 0.20
2 741 3.40 1.74 0.22
3 923 4.39 2.34 0.24
5 1283 6.46 3.61 0.29
10 2171 12.24 7.28 0.40
54 10071 99.20 68.72 1.89

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 24.20 7.07 0.42
2 114 671 34.07 9.83 0.53
3 169 782 41.13 11.91 0.60
4 227 893 49.28 14.25 0.69
5 282 1004 60.79 17.37 0.81
6 340 1116 70.16 20.12 0.91
7 396 1227 77.77 22.25 0.99
8 453 1338 93.54 26.42 1.16
9 504 1449 93.45 26.86 1.16

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1873 24.05 8.01 0.48
2 1980 25.18 9.06 0.51
3 2172 27.91 10.64 0.55
5 2327 28.59 12.08 0.57
10 3190 39.48 19.16 0.75
41 7854 97.55 59.01 1.71

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 646 22.72 7.33 0.42
2 861 25.43 8.75 0.46
3 965 25.92 9.54 0.47
5 1186 28.32 11.55 0.51
10 1977 38.20 17.65 0.67
42 6844 98.59 55.92 1.65

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 707 26.97 8.72 0.46
2 851 29.19 10.17 0.50
3 949 30.12 11.04 0.51
5 1298 34.15 13.74 0.58
10 2016 43.51 20.21 0.74
40 6519 98.59 58.56 1.66

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 705 31.60 9.94 0.51
2 925 34.01 11.47 0.55
3 977 35.23 12.40 0.57
5 1327 39.85 15.32 0.64
10 2112 50.06 21.98 0.81
32 5343 95.23 51.35 1.52

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 6084 26.21 8.86 0.69
2 6244 35.46 12.06 0.80
3 6417 44.05 14.97 0.90
4 6563 54.05 18.35 1.01
5 6424 52.84 17.70 0.99
6 6674 63.94 21.61 1.12
7 6978 80.88 27.45 1.31
8 6990 85.76 28.96 1.36

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 6197 17.66 6.02 0.61
10 1 56 6230 20.15 7.00 0.64
10 5 283 6366 27.09 9.82 0.72
10 10 569 6537 36.88 13.76 0.84
10 20 1139 6876 57.56 22.04 1.08
10 30 1710 7220 76.06 29.51 1.30
10 40 2275 7554 95.65 37.39 1.53
10 42 2387 7621 99.21 38.84 1.57

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-12-06 15:46:05.636445454 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 5.058727013
P99 14.887631659999991ms
P95 6.6888975ms
P50 4.6055635ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 25.276212930
P99 45.95562416999997ms
P95 33.79637064999998ms
P50 23.6688305ms
Number of Invalid txs 0

@v0d1ch v0d1ch force-pushed the increment-mutations branch 4 times, most recently from b566806 to f4c9aae Compare October 30, 2024 14:38
@v0d1ch v0d1ch force-pushed the increment-mutations branch 5 times, most recently from f351de9 to e2d4f9f Compare November 13, 2024 14:20
@v0d1ch v0d1ch force-pushed the increment-mutations branch from 2376588 to 399784c Compare December 16, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L2 Affect off-chain part of the Head protocol/network 💬 feature A feature on our roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants