quadratic-funding / mpc-phase2-suite

The MPC suite of tools for conducting zkSNARK Phase 2 Trusted Setup ceremonies
MIT License
16 stars 6 forks source link

Ceremony setup could be aborted when desired bucket name is already in-use #172

Open baumstern opened 1 year ago

baumstern commented 1 year ago

Currently, ceremony setup process could aborted when desired bucket name has been already taken:

🕑  Creating the storage bucket...✖ Something went wrong: FirebaseError: internal
0xjei commented 1 year ago

This problem should have been solved a few commits ago here. Would you kindly check it out? Thanks!

https://github.com/quadratic-funding/mpc-phase2-suite/blob/7fcd2291b61d23d2665c597e500f8b705986913f/phase2cli/src/lib/prompts.ts#L47

baumstern commented 1 year ago

This problem should have been solved a few commits ago here. Would you kindly check it out? Thanks!

https://github.com/quadratic-funding/mpc-phase2-suite/blob/7fcd2291b61d23d2665c597e500f8b705986913f/phase2cli/src/lib/prompts.ts#L47

I wasn't clear enough. Setup process fails when the bucket is already exist in S3.

0xjei commented 1 year ago

Ah, I see. I'm sorry, I didn't get it right away :rofl: The configuration process fails because we are using the ceremony title as the bucket name.

Therefore, if you provide a ceremony title already in use for another ceremony, the setup process fails. Anyway, the CLI should warn you when trying to type an already used ceremony title. Could you please check it out? Thanks!

baumstern commented 1 year ago

Ah, I see. I'm sorry, I didn't get it right away 🤣 The configuration process fails because we are using the ceremony title as the bucket name.

Therefore, if you provide a ceremony title already in use for another ceremony, the setup process fails. Anyway, the CLI should warn you when trying to type an already used ceremony title. Could you please check it out? Thanks!

Right, but let me try to address differently: Desired bucket name could be already in-use regardless of ceremony (It should be unique across all AWS accounts in the all the AWS region).

0xjei commented 1 year ago

Right, but let me try to address differently: Desired bucket name could be already in-use regardless of ceremony (It should be unique across all AWS accounts in the all the AWS region).

Sorry, I didn't know there was this bucket naming policy in AWS S3. We would have to somehow use a fairly random form of entropy to associate with the bucket name. At first glance, we could use the uid automatically generated by Firebase, associated with the title that is given as input or something similar.

baumstern commented 1 year ago

Still getting same error with latest dev branch atm:

🕖  Creating the storage bucket...✖ Something went wrong: FirebaseError: internal