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

fix(tui): increase feedbacks display time #506

Merged
merged 10 commits into from
Sep 28, 2022
Merged

Conversation

ffakenz
Copy link
Member

@ffakenz ffakenz commented Sep 24, 2022

Fixes #484

🏓 Refactor State to have a list of feedback instead of a maybe value.

🏓 Feedback will always be visible, displaying the last error which occurs.

🏓 Extra: added shouldNotRender helper, as it is convenient during development.

@ffakenz ffakenz changed the title fix(tui): increase error display time fix(tui): increase feedbacks display time Sep 24, 2022
@github-actions
Copy link

github-actions bot commented Sep 24, 2022

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 2022-09-27 19:00:06.753698349 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 4835 10.49 4.16 0.48
2 5036 11.05 4.33 0.49
3 5243 15.66 6.18 0.55
5 5653 18.76 7.36 0.60
10 6676 29.68 11.59 0.77
45 13854 96.65 37.33 1.81

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 5771 19.92 8.05 0.62

Cost of CollectCom Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 13058 20.77 8.32 0.95
2 13452 37.46 15.18 1.15
3 13664 54.25 22.12 1.35
4 14094 77.71 31.87 1.63

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 9358 8.63 3.53 0.66
2 9526 9.36 3.97 0.67
3 9689 10.37 4.51 0.69
5 10023 11.75 5.34 0.72
10 10814 15.21 7.42 0.80
30 14224 32.81 17.24 1.17
71 16309 41.95 15.88 1.32

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 9362 8.56 3.49 0.66
2 9529 9.34 3.95 0.67
3 9695 10.16 4.42 0.69
5 10025 11.68 5.30 0.72
10 10847 15.57 7.56 0.81
30 14145 31.58 16.75 1.15
43 16359 42.55 22.94 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 13705 25.73 10.91 1.04
2 14027 43.04 18.91 1.25
3 13926 52.63 22.47 1.35
4 14398 79.51 34.89 1.68

Cost of FanOut Transaction

Involves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 13545 10.89 4.71 0.87
2 13580 12.16 5.49 0.89
3 13622 13.68 6.37 0.91
5 13628 16.34 7.98 0.94
10 13807 23.95 12.37 1.04
50 15176 84.80 47.57 1.85
59 15634 98.98 55.68 2.04

hydra-tui/src/Hydra/TUI.hs Outdated Show resolved Hide resolved
hydra-tui/src/Hydra/TUI.hs Outdated Show resolved Hide resolved
hydra-tui/src/Hydra/TUI.hs Outdated Show resolved Hide resolved
hydra-tui/test/Hydra/TUISpec.hs Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Sep 26, 2022

Unit Test Results

254 tests   248 ✔️  15m 46s ⏱️
  91 suites      6 💤
    5 files        0

Results for commit ac58b23.

♻️ This comment has been updated with latest results.

@ffakenz ffakenz requested a review from ch1bo September 27, 2022 06:42
Copy link
Member

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

Much better (IMO), focuses more on the issue.

Tests need to adapted now.

hydra-tui/src/Hydra/TUI.hs Outdated Show resolved Hide resolved
hydra-tui/src/Hydra/TUI.hs Outdated Show resolved Hide resolved
Copy link
Member

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

Much better (IMO), focuses more on the issue.

Tests need to adapted now.

ffakenz and others added 9 commits September 27, 2022 20:10
Refactor State to have a list of feedbacks instead of a maybe value.
This list will only contain `non expired` feedbacks.
A feedback is expired if it is 3 seconds older than current State time.

This refactor means now the widget to display is not a plain str anymore
but a list str widgets.

Note: No feedback will be render unless current State time is ahead of
TUI application start up time.

Extra: Added shouldNotRender helper to check feedbacks are getting clear.
Co-authored-by: Sebastian Nagel <ch1bo@users.noreply.github.com>
… widget to work

Remove unnecesary hiding imports
threadDelay 1
shouldRender "Invalid command: Fanout"
threadDelay 1
shouldRender "Invalid command: Fanout"
Copy link
Member

Choose a reason for hiding this comment

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

Was this test red on master?

If not, there is no point in having it. I rather have a test less than one which does not check what it intends to be checking.

@ch1bo ch1bo merged commit 9b96323 into master Sep 28, 2022
@ch1bo ch1bo deleted the fix/tui_error_display_time branch September 28, 2022 07:21
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.

Hydra TUI errors are only visible for a moment
3 participants