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

Everyone collects after observing the last commit #786

Merged
merged 2 commits into from
Mar 27, 2023
Merged

Conversation

ch1bo
Copy link
Member

@ch1bo ch1bo commented Mar 22, 2023

We change this to make it more robust to open heads. Now, all head participants would try to open a head with a collect, not only the last to commit. This is also how it is written in the spec right now.


  • CHANGELOG updated
  • Documentation updated
  • Added and/or updated haddocks
  • No new TODOs introduced or explained herafter

ch1bo added 2 commits March 22, 2023 12:36
We change this to make it more robust to open heads. Now, all head
participants would try to open a head with a collect, not only the last
to commit. This is also how it is written in the spec right now.
@github-actions
Copy link

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 2023-03-22 11:52:38.693027709 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 9492414f8f96e8483a0b8ee268fc06a954641cb2cbaa9a8b093c2c9b 4621
νCommit 5d3f107aaa56d06188cf231941cf8163e777236a9cfdc48fd4bbfa23 2422
νHead 82f16b51e2d81c6f4d42dd7398b4713a445464902f63dfd86ffe754e 8954
μHead 4083fa7081a0f4b4092fb02867c9ac594bb0e8bab8110ab242ba5a72* 4458
  • 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 5055 13.54 5.33 0.52
2 5260 15.64 6.12 0.55
3 5464 20.84 8.18 0.62
5 5878 23.20 8.99 0.66
10 6899 37.08 14.30 0.86
36 12232 97.67 37.14 1.75

Cost of Commit Transaction

Currently only one UTxO per commit allowed (this is about to change soon)

UTxO Tx size % max Mem % max CPU Min fee ₳
1 600 15.75 6.19 0.35

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 815 24.80 10.07 0.46
2 113 1138 40.84 16.70 0.65
3 169 1461 59.43 24.45 0.87
4 226 1790 80.61 33.30 1.12

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 639 17.29 7.42 0.37
2 805 18.39 8.07 0.39
3 969 20.17 9.00 0.42
5 1295 22.95 10.54 0.47
10 2132 29.62 14.27 0.59
50 8722 86.05 45.32 1.56

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 675 21.73 9.11 0.42
2 840 23.88 10.16 0.45
3 1006 25.21 10.89 0.48
5 1337 28.68 12.68 0.53
10 2161 37.63 17.24 0.67
46 8102 99.58 49.13 1.67

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 5170 29.49 12.60 0.71
2 5422 45.10 19.35 0.89
3 5673 65.38 28.21 1.13
4 5996 90.08 39.12 1.42

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 5077 10.59 4.43 0.49
5 1 57 5114 12.12 5.31 0.51
5 5 284 5258 18.22 8.83 0.59
5 10 567 5436 25.85 13.23 0.69
5 20 1135 5789 41.11 22.05 0.90
5 30 1708 6157 56.37 30.86 1.10
5 40 2274 6514 71.64 39.68 1.30
5 50 2848 6879 86.92 48.50 1.50
5 58 3301 7163 99.14 55.56 1.67

@github-actions
Copy link

Test Results

297 tests   - 10   291 ✔️  - 10   22m 46s ⏱️ +52s
100 suites  -   4       6 💤 ±  0 
    5 files    -   1       0 ±  0 

Results for commit b337eee. ± Comparison against base commit c57b543.

This pull request removes 11 and adds 1 tests. Note that renamed tests count towards both.
Hydra.TUI.Options ‑ parses --cardano-signing-key option
Hydra.TUI.Options ‑ parses --connect option
Hydra.TUI.Options ‑ parses --node-socket option
Hydra.TUI.Options ‑ parses --testnet-magic option
Hydra.TUI/end-to-end smoke tests ‑ display feedback long enough
Hydra.TUI/end-to-end smoke tests ‑ doesn't allow multiple initializations
Hydra.TUI/end-to-end smoke tests ‑ starts & renders
Hydra.TUI/end-to-end smoke tests ‑ supports the full Head life cycle
Hydra.TUI/end-to-end smoke tests ‑ supports the init & abort Head life cycle
Hydra.TUI/text rendering errors ‑ should show not enough fuel message and suggestion
…
Hydra.HeadLogic/Coordinated Head Protocol ‑ everyone does collect on last commit after collect com

@ch1bo ch1bo force-pushed the master branch 6 times, most recently from 3d95dc4 to 270b957 Compare March 24, 2023 09:44
Copy link
Contributor

@v0d1ch v0d1ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@v0d1ch v0d1ch merged commit 79c5133 into master Mar 27, 2023
@v0d1ch v0d1ch deleted the everyone-collects branch March 27, 2023 15:19
@pgrange pgrange added this to the 0.10.0 milestone May 11, 2023
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.

3 participants