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

Commit vs Rollbacks - Canceled #822

Closed
wants to merge 10 commits into from
Closed

Conversation

ffakenz
Copy link
Contributor

@ffakenz ffakenz commented Apr 13, 2023

Fixes #784

☕ introduces rollbackward on mock chain to simulate rollbacks during model spec executions.

☕ now rollbacks occur deterministically on discrete intervals.


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

The chaincallback currently takes care of everything:
* updating the chainState inside the headState
* putting new events to the queue

We want to split that to prepare for the change where we only
put event to the queue to solve some synchronization problems.
@ffakenz ffakenz force-pushed the ensemble/split_callback branch from d74079b to 35bfc65 Compare April 13, 2023 12:24
@github-actions
Copy link

github-actions bot commented Apr 13, 2023

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-04-14 16:29:46.495180482 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 5054 13.12 5.16 0.52
2 5257 17.39 6.84 0.57
3 5464 18.74 7.31 0.59
5 5872 24.25 9.42 0.67
10 6897 36.61 14.10 0.85
37 12440 99.72 37.90 1.78

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 603 15.75 6.19 0.35

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 816 24.50 9.95 0.46
2 114 1139 40.66 16.63 0.65
3 170 1461 58.79 24.20 0.86
4 227 1783 80.77 33.37 1.12

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 647 17.34 7.44 0.37
2 804 18.73 8.21 0.40
3 969 20.17 9.00 0.42
5 1300 23.00 10.55 0.47
10 2124 29.58 14.25 0.59
50 5424 64.67 29.42 1.12

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 683 22.16 9.28 0.43
2 837 23.92 10.18 0.45
3 1005 25.64 11.06 0.48
5 1336 29.15 12.86 0.54
10 2160 37.20 17.07 0.67
46 8099 99.79 49.21 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 5243 30.33 13.03 0.72
2 5491 48.08 20.77 0.93
3 5815 69.68 30.31 1.19
4 6142 95.21 41.57 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 5073 10.59 4.43 0.49
5 1 57 5117 12.12 5.31 0.51
5 5 285 5258 18.22 8.83 0.59
5 10 569 5436 25.85 13.24 0.69
5 20 1138 5791 41.11 22.05 0.90
5 30 1707 6161 56.37 30.86 1.10
5 40 2279 6514 71.64 39.68 1.30
5 50 2847 6878 86.92 48.50 1.50
5 58 3301 7163 99.14 55.56 1.67

@pgrange pgrange force-pushed the ensemble/split_callback branch from d3d6fb3 to f9880fe Compare April 13, 2023 13:25
@github-actions
Copy link

github-actions bot commented Apr 13, 2023

Test Results

301 tests   - 10   295 ✔️  - 10   25m 9s ⏱️ + 1m 54s
100 suites  -   4       6 💤 ±  0 
    5 files    -   1       0 ±  0 

Results for commit 9733a20. ± Comparison against base commit eabe3a9.

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.Model ‑ check head opens if all participants commit

♻️ This comment has been updated with latest results.

@ch1bo ch1bo linked an issue Apr 14, 2023 that may be closed by this pull request
@ffakenz ffakenz force-pushed the ensemble/split_callback branch from ccb1e47 to 3dbd6e3 Compare April 14, 2023 11:17
@ffakenz ffakenz changed the title Split chain callback Commit vs Rollbacks Apr 14, 2023
@ffakenz ffakenz force-pushed the ensemble/split_callback branch from 1fa26d6 to 7842c45 Compare April 17, 2023 12:57
@pgrange pgrange force-pushed the ensemble/split_callback branch from 7842c45 to e6c0f52 Compare April 17, 2023 13:24
@pgrange pgrange force-pushed the ensemble/split_callback branch 2 times, most recently from d384444 to 5a3c4c5 Compare April 17, 2023 16:25
@ffakenz ffakenz force-pushed the ensemble/split_callback branch 2 times, most recently from 95d9871 to 2510e2e Compare April 17, 2023 19:12
If the command received is straight on invalid, we do not pretend
it failed, we explicitly states it's invalid and try to give some
useful information to debug.
@pgrange pgrange force-pushed the ensemble/split_callback branch from 2510e2e to 68fc952 Compare April 19, 2023 09:28
@pgrange pgrange changed the title Commit vs Rollbacks Commit vs Rollbacks - Canceled Apr 20, 2023
@pgrange
Copy link
Contributor

pgrange commented Apr 20, 2023

Replaced by #827

@pgrange pgrange closed this Apr 20, 2023
@pgrange pgrange deleted the ensemble/split_callback branch April 20, 2023 06:59
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.

Commits vs. rollbacks
3 participants