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

pipelining of users contributions #208

Open
ctrlc03 opened this issue Oct 22, 2023 · 5 comments
Open

pipelining of users contributions #208

ctrlc03 opened this issue Oct 22, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@ctrlc03
Copy link
Collaborator

ctrlc03 commented Oct 22, 2023

Problem

Currently it is not possible to contribute to large circuits > 1M constrains on a browser due to memory restrictions. For that, we use a cli tool instead where we can use the full computing power of a machine.

Possible solution

Pipelining the contribution of a user.

Flow:

  • Download n chunk -> process n chunk -> (upload n chunk)

By processing the computation on one chunk at a time, we can effectively reduce the memory consumption as we do not need to hold the whole file in memory at all times. This could possibly allow even larger contributions on a mobile phone's browser.

What we would need to change

We would need to first validate this is possible to do the computation on chunks rather than the whole zKey.

  1. Amend the current backend step system. This is quite strict, there's certain actions which can only be done on when at a certain step (for instance cannot get an upload pre-signed url when not in the upload phase, etc.). (medium complexity)
  2. This approach described above requires some changes on snarkjs' code.
@ctrlc03 ctrlc03 added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Oct 22, 2023
@glamperd
Copy link
Collaborator

Not planned for now

@glamperd glamperd closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2024
@healthykim
Copy link

I was monitoring this issue because I wanted to contribute, but it suddenly got closed. Could you let me know why it was closed?

@glamperd
Copy link
Collaborator

I can reopen if you want to contribute.

@glamperd glamperd reopened this Sep 16, 2024
@healthykim
Copy link

Thank you!
I found a similar issue in a repository named 'DefinitelySetup' (privacy-scaling-explorations/DefinitelySetup#97).
Should I work on DefinitelySetup since it involves on-browser contributions?

@glamperd
Copy link
Collaborator

This would need changes to the backend. They should happen in p0tion (backend package). Browser-based front-end changes will be in DefinitelySetup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants