-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fixes initialisation process on the web frontend #166
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
48a71a4
Fixes initialisation process on the web frontend
nkcr cda589a
Moves the DKG logic to DKGStatusRow
nkcr 958f702
Adds new DKG states and continues the refactoring
nkcr e7b7d1e
Updates the mock
nkcr 80a7b52
Merge branch 'main' into initialisation-fix-web
nkcr 930019f
Fixes some edge cases
nkcr 6c7f680
Adds missing translation
nkcr 3e3105d
Fixes the case where a node is empty
nkcr e40e1ea
Adds build info on the footer
nkcr 5e97a5f
Fixes the setup state
nkcr 3a6ab20
Adds missing condition while loading
nkcr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is enough to prevent the initialization of nodes that were already initialized, because of this cough beautiful
Promise.all
(I'm sorry .....) line 221, which either set them all up to Initialized or none...I think one way to do this would be to use the component
DKGStatusRow
, so that each node initializes itself and polls it own status.useChangeAction
could then be notified of the changes via the states inDKGStatuses
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Luckily that works in this case, because "undefined" (and any other non-promise values) count as "resolved". 🙃
Yes, that would be much better indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but it will return
undefined
only if the proxy address of the node could not be found (i.eproxy===''
). Otherwise inpollDKG
:So if during the poll one of the node times out for some reason the Promise will be rejected thus the
Promise.all
will resolve to rejected for all of them. And the request to initialize will again be sent for all the nodes ...?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes, that's true :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try to solve this this coming week since it will be the start of term, but after that I probably won't have the time anymore 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the DKG logic to DKGStatusRow, as suggested. That wasn't straightforward as there are probably still too much states spread around between
useChangeAction.tsx
,Show.tsx
, andDKGStatusRow.tsx
. Having your input on that would help, if you are willing to :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already so much better ! But yes there are way too many states to be passed around, it's a bit cumbersome ....