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

Reduce the window between creating and writing to files in contributor #370

Open
ibaryshnikov opened this issue Sep 1, 2021 · 1 comment
Labels
2 moderate priority enhancement New feature or request

Comments

@ibaryshnikov
Copy link

Contributor works like this:

  • calls try_lock endpoint <- the files are initialized
  • download/challenge
  • upload/response
  • try_contribute <- the files are written to

As you can see, we have several requests before creating and using the files. And if the contributor or coordinator is stopped in between of these calls, there's a high chance to obtain incorrect state in the transcript.
What if we move the file initialization from try_lock to try_contribute? As a result, the files will be created right before being used, and it will reduce the window in which it's possible to obtain incorrect state by a lot.
If the contributor goes down, it will not affect the files at all, so we'll have to take care only about coordinator restarts.

@apruden2008
Copy link

I think this is great, as it potentially reduces the number of ways the contributor can fail.

@ibaryshnikov ibaryshnikov added 2 moderate priority enhancement New feature or request labels Sep 30, 2021
@ibaryshnikov ibaryshnikov added this to the Inner Setup milestone Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 moderate priority enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants