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

Merged
merged 88 commits into from
Dec 25, 2024
Merged

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)
❄️ Changes to the TUI client so we can commit and recover


  • 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 +1873
μ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 - - - -

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 - - +0.17 +0.04 -
2 - - $${\color{green}-0.81}$$ $${\color{green}-0.20}$$ -
3 - - +1.7 +0.41 +0.01
4 - - $${\color{green}-0.89}$$ $${\color{green}-0.22}$$ $${\color{green}-0.01}$$
5 - - +3.48 +0.82 +0.03
6 - - +4.2 +1.0 +0.04
7 - - $${\color{green}-1.12}$$ $${\color{green}-0.28}$$ $${\color{green}-0.01}$$
8 - - $${\color{green}-3.09}$$ $${\color{green}-0.76}$$ $${\color{green}-0.03}$$

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1176 1.12 0.62 0.07
2 1144 0.29 0.44 0.06
3 1117 0.45 0.53 0.06
5 1302 3.63 1.75 0.09
10 1117 0.91 1.37 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.72}$$ $${\color{green}-0.80}$$ $${\color{green}-0.02}$$
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 +25.0 $${\color{green}-3.48}$$ $${\color{green}-0.92}$$ $${\color{green}-0.04}$$
2 +47.0 $${\color{green}-3.68}$$ $${\color{green}-0.97}$$ $${\color{green}-0.04}$$
3 +172.0 $${\color{green}-2.79}$$ $${\color{green}-0.47}$$ $${\color{green}-0.02}$$
5 $${\color{green}-98.00}$$ $${\color{green}-5.51}$$ $${\color{green}-1.74}$$ $${\color{green}-0.06}$$
10 +5.0 $${\color{green}-4.99}$$ $${\color{green}-1.35}$$ $${\color{green}-0.05}$$

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 $${\color{green}-10871.00}$$ +7.76 +1.71 $${\color{green}-0.40}$$
2 $${\color{green}-10884.00}$$ +1.29 +0.1 $${\color{green}-0.47}$$
3 $${\color{green}-10835.00}$$ +0.37 +0.41 $${\color{green}-0.47}$$
5 $${\color{green}-10762.00}$$ $${\color{green}-15.64}$$ $${\color{green}-3.71}$$ $${\color{green}-0.63}$$
10 $${\color{green}-10561.00}$$ $${\color{green}-43.13}$$ $${\color{green}-9.80}$$ $${\color{green}-0.88}$$

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-25 21:19:48.265840935 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 5350e9d521552ebfd9e846fd70c3b801f716fc14296134ec0fb71e97 14495
μHead 482c3ce15cde05bc905b915ccfa2546e500be1c5d722389026c37aa3* 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 6199 10.00 3.17 0.53
2 6400 12.12 3.84 0.56
3 6602 14.24 4.52 0.59
5 7008 18.33 5.80 0.65
10 8010 28.90 9.15 0.80
44 14846 98.21 30.92 1.82

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 561 2.45 1.17 0.20
2 741 3.40 1.74 0.22
3 918 4.39 2.34 0.24
5 1279 6.46 3.61 0.28
10 2174 12.24 7.28 0.40
54 10059 99.20 68.72 1.89

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 25.00 7.26 0.43
2 114 675 34.07 9.83 0.53
3 171 782 39.51 11.50 0.59
4 227 893 53.58 15.28 0.73
5 282 1004 61.88 17.66 0.82
6 339 1116 66.03 19.09 0.87
7 394 1227 86.76 24.45 1.08
8 449 1338 85.22 24.54 1.07
9 505 1449 90.52 26.21 1.13

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1855 24.14 8.03 0.48
2 1993 25.18 9.07 0.51
3 2200 28.00 10.67 0.55
5 2372 29.89 12.53 0.59
10 3300 41.40 19.91 0.77
43 8032 98.28 60.57 1.73

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 656 22.40 7.25 0.41
2 791 23.93 8.34 0.44
3 914 25.62 9.47 0.47
5 1203 27.91 11.43 0.51
10 2061 40.28 18.26 0.70
42 6912 99.21 56.13 1.66

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 708 26.95 8.71 0.46
2 819 30.35 10.36 0.51
3 983 30.30 11.09 0.52
5 1363 34.65 14.01 0.59
10 2211 45.15 21.04 0.76
37 6228 98.99 56.70 1.63

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 660 32.74 10.13 0.52
2 892 35.86 11.96 0.57
3 1082 38.43 13.52 0.61
5 1200 40.48 15.17 0.64
10 2060 52.61 22.69 0.83
31 5213 98.15 51.50 1.54

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 6001 22.42 7.45 0.65
2 6152 33.87 11.39 0.78
3 6342 43.06 14.57 0.88
4 6421 48.36 16.33 0.94
5 6610 62.19 21.00 1.09
6 6717 68.00 23.04 1.16
7 6942 78.17 26.62 1.28
8 7072 87.20 29.68 1.38
9 7091 95.16 32.16 1.46

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 6198 18.19 6.21 0.61
10 1 57 6232 19.26 6.67 0.63
10 5 285 6368 27.61 10.01 0.73
10 10 569 6536 37.25 13.89 0.84
10 20 1139 6877 57.56 22.04 1.08
10 30 1705 7215 76.42 29.65 1.30
10 41 2336 7593 97.98 38.32 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 2024-12-25 21:22:36.640836803 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.881897360
P99 9.095575309999967ms
P95 6.43670215ms
P50 4.6527845ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 22.666274675
P99 39.77234573ms
P95 31.110139949999997ms
P50 21.105755000000002ms
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 44112a8 to c29a27a Compare December 25, 2024 21:18
@v0d1ch v0d1ch added this pull request to the merge queue Dec 25, 2024
Merged via the queue into master with commit 1b447f3 Dec 25, 2024
27 checks passed
@v0d1ch v0d1ch deleted the increment-mutations branch December 25, 2024 22:06
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