This repository has been archived by the owner on May 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Catch unsupported keep size and threshold in client #415
Conversation
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
Protocol implemented in the client requires at least 2 members to execute. Here we check size of the keep and log an error in case of not enough members.
Notification about keep creation should contain information about keep's threshold.
The value should be accessible for client to check the threshold of the keep so it can determine protocol to execute.
Contract event contains this field and we need to use it in the client.
Client will use this function to get threshold from existing keep. Based on this value it will determine protocol to execute.
We pass threshold value of keep to key generation process. Currently we require it to be equal to group size but in #325 we will implement proper handling.
These indexed parameters may be usefull for filtering emitted events.
2 tasks
Contract has some paramters configured as indexed. We don't use it currently to filter the events so we set the filters to nil.
pdyraga
reviewed
Apr 18, 2020
Honest threshold can have max value 16, using uint will simplify handling of this parameters across the code.
pdyraga
approved these changes
Apr 18, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Currently, the client supports keep size of at least 2 members and threshold equal to keep size. In this PR we catch requests with unsupported values, log an error and don't start the key generation process.
I also noticed that we were missing the threshold parameter passing to the event on keep creation or being able to read threshold of already created keep - fixed it in this PR.
Also added some parameters indexation for events as these may be helpful later for events filtering.
Closes: #392