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

Failed to create a ceremony for 3.9 G size .zkey file #362

Open baumstern opened 1 year ago

baumstern commented 1 year ago

case1: the upload fails midway through

Uploading 3.9 G size .zkey file failed with following error:

βœ” Select the Powers of Tau file choosen for the circuit β€Ί powersOfTau28_hez_final_23.ptau
βœ” Ceremony bucket has been successfully created
πŸ•“  Uploading processmessages_6-8-3-3_test_00000.zkey file to ceremony storage...file:///Users/daehyun/workspace/p0tion/mpc-phase2-suite/packages/phase2cli/dist/src/index.node.mjs:521
            throw new Error(`Unable to upload chunk number ${i}. Please, terminate the current session and retry to resume from the latest uploaded chunk.`);
                  ^

Error: Unable to upload chunk number 23. Please, terminate the current session and retry to resume from the latest uploaded chunk.
    at uploadParts (file:///Users/daehyun/workspace/p0tion/mpc-phase2-suite/packages/phase2cli/dist/src/index.node.mjs:521:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async multiPartUpload (file:///Users/daehyun/workspace/p0tion/mpc-phase2-suite/packages/phase2cli/dist/src/index.node.mjs:576:37)
    at async handleCircuitArtifactUploadToStorage (file:///Users/daehyun/workspace/p0tion/mpc-phase2-suite/packages/phase2cli/dist/src/index.node.mjs:2847:5)
    at async Command.setup (file:///Users/daehyun/workspace/p0tion/mpc-phase2-suite/packages/phase2cli/dist/src/index.node.mjs:2971:13)
    at async Command.parseAsync (/Users/daehyun/workspace/p0tion/mpc-phase2-suite/node_modules/commander/lib/command.js:916:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

chunk size is 50MB

baumstern commented 1 year ago

How can we resume to upload chunk as following message suggests? @0xjei

Error: Unable to upload chunk number 23. Please, terminate the current session and retry to resume from the latest uploaded chunk.
baumstern commented 1 year ago

case 2: Failure to start the upload itself

Tried another chunk sizes 256 MB, 512 MB and got following error:

- Setup for Circuit # 1

βœ” Would you like to use a pre-computed zKey for this circuit? … No / Yes
βœ” Select the pre-computed zKey file related to the circuit β€Ί processmessages_6-8-3-3_test_00000.zkey
powersOfTau28_hez_final_23.ptau
βœ” Select the Powers of Tau file choosen for the circuit β€Ί powersOfTau28_hez_final_23.ptau
βœ” Ceremony bucket has been successfully created
πŸ•—  Uploading processmessages_6-8-3-3_test_00000.zkey file to ceremony storage...AbortError failed with type: aborted; message: The user aborted a request.
Retrying in 528 milliseconds, attempt 1 error: AbortError, The user aborted a request.
πŸ•™  Uploading processmessages_6-8-3-3_test_00000.zkey file to ceremony storage...AbortError failed with type: aborted; message: The user aborted a request.
Retrying in 1079 milliseconds, attempt 2 error: AbortError, The user aborted a request.
πŸ•”  Uploading processmessages_6-8-3-3_test_00000.zkey file to ceremony storage...AbortError failed with type: aborted; message: The user aborted a request.
Retrying in 2060 milliseconds, attempt 3 error: AbortError, The user aborted a request.
πŸ••  Uploading processmessages_6-8-3-3_test_00000.zkey file to ceremony storage...
0xjei commented 1 year ago

These errors are all related to a poor quality connection that cannot handle the upload of chunks @gurrpi

0xjei commented 1 year ago

How can we resume to upload chunk as following message suggests? @0xjei

Error: Unable to upload chunk number 23. Please, terminate the current session and retry to resume from the latest uploaded chunk.

Unfortunately, the resumable upload has not yet been implemented for setup command.

baumstern commented 1 year ago

These errors are all related to a poor quality connection that cannot handle the upload of chunks @gurrpi

I've been able to achieve the same result (file uploaded to S3) using other tools, so I don't think it's a connection issue.

baumstern commented 1 year ago

How can we resume to upload chunk as following message suggests? @0xjei

Error: Unable to upload chunk number 23. Please, terminate the current session and retry to resume from the latest uploaded chunk.

Unfortunately, the resumable upload has not yet been implemented for setup command.

So why not leave out the misleading message? Please, terminate the current session and retry to resume from the latest uploaded chunk

0xjei commented 1 year ago

Maybe the connection is handled differently by the tool than using an upload from the AWS web interface or CLI. I'm going to investigate this soon. Thanks!

0xjei commented 1 year ago

How can we resume to upload chunk as following message suggests? @0xjei

Error: Unable to upload chunk number 23. Please, terminate the current session and retry to resume from the latest uploaded chunk.

Unfortunately, the resumable upload has not yet been implemented for setup command.

So why not leave out the misleading message? Please, terminate the current session and retry to resume from the latest uploaded chunk

For sure. I think the message is the same when doing setup or contribution (the latter is resumable), therefore just need to discriminate