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

Incremental decommit spec #1479

Merged
merged 22 commits into from
Jul 1, 2024
Merged

Incremental decommit spec #1479

merged 22 commits into from
Jul 1, 2024

Conversation

ch1bo
Copy link
Collaborator

@ch1bo ch1bo commented Jun 19, 2024

Only specification changes for #1057 to get them merged first as described in #1473.

💅 Marked sections red that are about to change with incremental decommits.

💅 Adds decrementTx which removes UTxO from the head state to protocol overview, on-chain and off-chain sections.

💅 Updates close, contest and fanout steps accordingly.

💅 Uses a "version counting" scheme to distinguish cases where the same snapshot is used to decrement and close the head.

💅 Removes $\mathcal{T}_{\mathsf{all}}$ book-keeping and makes snapshots request full transactions. Adds a note that requesting only transaction ids is possible if all parties keep an index. This simplifies the specification (but departs from a 1:1 mapping to implemented protocol logic in Hydra.HeadLogic)

💅 (Re-)introduces snapshot objects to group confirmed variables (e.g. $\bar{s}, \bar{v}$) which are just kept to refer to them later on in close.


  • CHANGELOG updated or not needed
  • Documentation updated
  • Haddocks not needed
  • No new TODOs introduced or explained herafter
    • Figures are not updated
    • Some handwavy-ness when dealing with $tx_\omega$ and interface between off-chain and on-chain in regards with $\mathsf{CloseType}$ is unsharp

Copy link

github-actions bot commented Jun 19, 2024

Transactions 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-07-01 14:31:13.328650046 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial baafeb5dc37bbe6e068784746bda0a3b1bb1d034fa0c55270f6079c1 4082
νCommit fe7af84822bcba542fae377ae7311fc5fd20152f925ccd980f73ecdc 2061
νHead 93c08c55e804d7f82ca545a01883b5fda6a6d3623cb78885625800ae 9366
μHead 5e65c73722b4bb3f0cbfcc8433e1dcdfea099eaf0a43060f1731a65b* 4237
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per Head.

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 4818 5.89 2.31 0.43
2 5019 7.29 2.86 0.45
3 5221 8.69 3.42 0.47
5 5623 11.67 4.60 0.53
10 6628 18.59 7.32 0.64
58 16278 86.13 33.97 1.81

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 559 9.69 3.82 0.28
2 746 12.48 5.10 0.32
3 933 15.33 6.40 0.36
5 1312 21.26 9.09 0.45
10 2249 37.35 16.27 0.67
25 5057 96.42 41.75 1.45

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 543 14.78 5.90 0.34
2 114 658 23.14 9.35 0.43
3 170 768 33.02 13.48 0.55
4 226 874 44.51 18.30 0.68
5 284 984 57.19 23.69 0.83
6 339 1095 72.14 30.01 1.00
7 394 1205 91.51 38.07 1.22

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 597 8.31 4.61 0.28
2 773 9.46 6.01 0.30
3 920 10.12 7.06 0.32
5 1244 11.97 9.55 0.37
10 2029 16.75 15.85 0.49
50 8367 50.95 64.12 1.39

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 630 8.60 4.71 0.28
2 716 8.92 5.45 0.29
3 906 10.05 6.87 0.32
5 1262 12.36 9.69 0.38
10 2060 16.72 15.71 0.49
50 8022 51.83 63.57 1.38

Cost of Abort Transaction

Some variation because of random mixture of still initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 4693 16.95 7.34 0.55
2 4802 27.72 12.09 0.67
3 4887 37.46 16.24 0.79
4 5143 55.23 24.23 1.00
5 5317 78.76 34.78 1.27
6 5378 98.23 43.27 1.49

Cost of FanOut Transaction

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 ₳
5 0 0 4652 7.82 3.27 0.44
5 1 57 4686 9.18 4.07 0.46
5 5 284 4820 13.58 6.83 0.52
5 10 568 4990 19.55 10.48 0.60
5 20 1140 5331 31.29 17.70 0.77
5 30 1708 5671 42.61 24.75 0.92
5 40 2274 6008 53.93 31.80 1.08
5 50 2846 6349 65.47 38.94 1.24
5 79 4495 7331 98.97 59.67 1.70

End-To-End Benchmark Results

This page is intended to collect the latest end-to-end benchmarks results produced by Hydra's Continuous Integration system from the latest master code.

Please take those results with a grain of salt as they are currently produced from very limited cloud VMs and not controlled hardware. Instead of focusing on the absolute results, the emphasis should be on relative results, eg. how the timings for a scenario evolve as the code changes.

Generated at 2024-07-01 14:33:32.135828906 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.394972370
P99 8.998408079999956ms
P95 5.835352799999999ms
P50 4.101889ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 22.273366882
P99 114.13340576000006ms
P95 30.701589799999997ms
P50 19.757759999999998ms
Number of Invalid txs 0

Copy link

github-actions bot commented Jun 19, 2024

Test Results

437 tests  ±0   425 ✅ ±0   15m 20s ⏱️ -44s
143 suites ±0    12 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 30a1a50. ± Comparison against base commit ff72844.

♻️ This comment has been updated with latest results.

@ch1bo ch1bo requested a review from a team June 19, 2024 18:26
@ch1bo ch1bo force-pushed the incremental-decommit-spec branch from 2916e63 to f71eae5 Compare June 19, 2024 18:27
@ch1bo ch1bo linked an issue Jun 19, 2024 that may be closed by this pull request
@ch1bo ch1bo marked this pull request as ready for review June 21, 2024 05:55
@ch1bo ch1bo force-pushed the incremental-decommit-spec branch from d9714b0 to 039eb18 Compare June 21, 2024 15:08
@v0d1ch v0d1ch merged commit 7a871c1 into master Jul 1, 2024
21 checks passed
@v0d1ch v0d1ch deleted the incremental-decommit-spec branch July 1, 2024 14:40
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.

Update the specification with the design
3 participants