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

DKG Sync Protocol: Fail server side if client sends wrong definition hash #761

Closed
corverroos opened this issue Jul 4, 2022 · 0 comments · Fixed by #772
Closed

DKG Sync Protocol: Fail server side if client sends wrong definition hash #761

corverroos opened this issue Jul 4, 2022 · 0 comments · Fixed by #772
Assignees
Labels
bug Something isn't working

Comments

@corverroos
Copy link
Contributor

corverroos commented Jul 4, 2022

Problem to be solved

The server side of the DKG sync protocol only response with an error if the client sends a mismatching cluster definition hash. It doesn't actually fail fast and error and exit the DKG. Only the client fails and exits the DKG when it receives a error response from a server.

Note that this is actually a race condition:

  • Lets say we have 2 nodes, X and Y.
  • X and Y both have sync clients and servers.
  • Both X and Y will fail and exit if their clients connect to the other server and receive a error response.
  • But if X's client connects (and then exits) before Y's, then Y's client will never be able to connect and will hang.
  • So this ticket is a workaround for X failing so fast, that Y can never connect and fail as well.

Proposed solution

Add a shared errResponse bool field to the sync.Server. If any pb.SyncResponse.Error is set, this field should be set to true. Upon call to AwaitAllConnected, return an error if errResponse==true.

@corverroos corverroos added bug Something isn't working Size: 2 labels Jul 4, 2022
@dB2510 dB2510 self-assigned this Jul 7, 2022
@dB2510 dB2510 linked a pull request Jul 7, 2022 that will close this issue
obol-bulldozer bot pushed a commit that referenced this issue Jul 7, 2022
Fails server if client sends wrong definition hash signature by flipping errResponse shared variable.

category: bug
ticket: #761
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants