Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Catch unsupported keep size and threshold in client #415

Merged
merged 12 commits into from
Apr 18, 2020
Merged

Conversation

nkuba
Copy link
Member

@nkuba nkuba commented Apr 18, 2020

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

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.
Contract has some paramters configured as indexed. We don't use it
currently to filter the events so we set the filters to nil.
Honest threshold can have max value 16, using uint will simplify
handling of this parameters across the code.
@nkuba nkuba requested a review from pdyraga April 18, 2020 13:53
@pdyraga pdyraga merged commit e4545d9 into master Apr 18, 2020
@pdyraga pdyraga deleted the keep-size branch April 18, 2020 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve validation of group size and threshold input parameters
2 participants