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

More precise error when transition requirement fails #895

Merged
merged 2 commits into from
May 31, 2023

Conversation

abailly-iohk
Copy link
Contributor

While troubleshooting issues with stuck head, we found that some errors in the log related to failed requirement checks were quite terse and did not provide enough information. This PR adds structured errors for each requirement check.


  • CHANGELOG updated or not needed
  • Documentation updated or not needed
  • Haddocks updated or not needed
  • No new TODOs introduced or explained herafter

@abailly-iohk abailly-iohk requested review from ch1bo, v0d1ch, ffakenz and pgrange and removed request for ch1bo and v0d1ch May 30, 2023 07:01
Copy link
Contributor

@pgrange pgrange left a comment

Choose a reason for hiding this comment

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

💚 merci

@github-actions
Copy link

github-actions bot commented May 30, 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-05-31 09:50:36.080429283 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 2212a4ee618434b9b2f366d7c330dbdfb5c7072e793a850fd0de6ddd 4294
νCommit 69e1ccf9ad73dc6d37a5bc8de5aec86f3c4c1710fe5fd334e0e16b18 2124
νHead 8ae095dca4d14a1b8edffb37faa6c84ec60340fbf389a62f027e0b76 9355
μHead 33642a45c7fbb955ce1704ef09229bb211bf9af9980530db28c6aafe* 4148
  • 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 4745 13.17 5.16 0.50
2 4944 15.69 6.12 0.54
3 5151 17.49 6.78 0.57
5 5561 21.70 8.34 0.63
10 6590 35.42 13.59 0.82
38 12329 99.19 37.54 1.76

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 599 14.89 5.70 0.34
2 784 19.66 7.73 0.40
3 972 24.66 9.84 0.46
5 1348 36.07 14.56 0.61
10 2285 71.73 28.85 1.04
13 2842 98.11 39.18 1.35

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 814 27.63 10.73 0.49
2 114 1135 43.25 16.93 0.67
3 168 1452 61.63 24.28 0.89
4 226 1776 82.60 32.69 1.13

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 672 19.03 8.65 0.40
2 679 17.76 7.45 0.38
3 969 21.67 10.94 0.45
5 1299 24.46 13.45 0.50
10 2124 31.12 19.62 0.64
50 8726 87.17 69.99 1.74

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 676 24.77 10.63 0.46
2 842 26.49 12.01 0.49
3 1006 27.77 13.21 0.51
5 1336 31.63 16.12 0.58
10 2162 40.20 22.97 0.74
45 7944 99.74 70.74 1.82

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 4855 22.40 9.38 0.61
2 5108 33.59 14.11 0.75
3 5494 53.46 22.88 0.99
4 5675 68.40 29.19 1.16
5 6143 96.18 41.52 1.50

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 4765 8.66 3.57 0.46
5 1 57 4801 10.06 4.39 0.47
5 5 284 4944 15.64 7.69 0.55
5 10 570 5124 22.61 11.82 0.64
5 20 1139 5483 36.56 20.07 0.83
5 30 1707 5839 50.52 28.33 1.02
5 40 2276 6203 64.49 36.60 1.21
5 50 2842 6558 78.45 44.87 1.40
5 65 3695 7097 99.42 57.28 1.68

@github-actions
Copy link

github-actions bot commented May 30, 2023

Test Results

308 tests   - 10   302 ✔️  - 10   18m 59s ⏱️ - 1m 20s
104 suites  -   4       6 💤 ±  0 
    5 files    -   1       0 ±  0 

Results for commit 0aee9e2. ± Comparison against base commit daa00a3.

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 ‑ rejects last AckSn if already received signature from this party

♻️ This comment has been updated with latest results.

@ffakenz ffakenz force-pushed the abailly-iohk/refine-required-error-in-head-logic branch from 74488b3 to 0aee9e2 Compare May 31, 2023 09:37
@abailly-iohk abailly-iohk merged commit df42836 into master May 31, 2023
34 checks passed
@abailly-iohk abailly-iohk deleted the abailly-iohk/refine-required-error-in-head-logic branch May 31, 2023 12:09
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.

None yet

3 participants