privacy-scaling-explorations / p0tion

The MPC suite of tools for conducting zkSNARK Phase 2 Trusted Setup ceremonies
https://ceremony.pse.dev
MIT License
86 stars 68 forks source link

pipelining of users contributions #208

Open ctrlc03 opened 11 months ago

ctrlc03 commented 11 months ago

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:

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.
glamperd commented 1 week ago

Not planned for now

healthykim commented 1 week ago

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 commented 1 week ago

I can reopen if you want to contribute.

healthykim commented 1 week ago

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

glamperd commented 1 week ago

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