-
Notifications
You must be signed in to change notification settings - Fork 109
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 bug on reshare process #898
Conversation
665c3b4
to
a736ef4
Compare
Great catch! Do you have a solution to the bug? I guess a straightforward one is to avoid triggering the DKG if either of the 'beacon id' or the '--id' flag do not match what has been expected - in this case the '--id' flag of the right network is missing. |
f34c381
to
a28a800
Compare
The fix is in the PR. Server will compare beacon id on InitReshare request and on old group file. They should be the same in order to continue. If they are different, we won't accept the request. |
Context
This bug allows a user to init a reshape process with a difference between the beacon id he sets on CLI command and the ones present inside config file.
Explanation
Two networks are working inside the nodes: the default and a second one. We start a reshare on the second one to add a new node to this network. This new node uses the flag
--from
on CLI reshare cmd, but the user forgets to set the--id
flag. The new node which is being added to the network uses the default one as the "resharing beacon process" instead of the second one. When it tries to send its share to the leader node, it uses the beacon id present on the old config file (it is the correct one). For that reason the leader is able to start the dkg process... as a result, the new node is not on the new group file. In some cases, this scenario triggered an existing kyber bug.