zcash / mpc

zk-SNARK parameter multi-party computation protocol
171 stars 42 forks source link

About execution time too long #13

Closed sean-liu55 closed 5 years ago

sean-liu55 commented 5 years ago

** Hi, I am trying to re-execute the process of generating public parameters. I checked the instructions, the coordinator uses a 128-core server, and the computer uses a 4-core desktop. I first tested it with a 32-core Amazon cloud server and modified the number of threads to 32. It took 3.5 hours to calculate the stage1.transform(&privkey) once,CPU usage is 100%, memory usage is not large. It took 7 hours to test with a 16-core cloud server. In the code comment, the process needs about 0.5 to 1 hour. In addition, the Stage2Contents::new(&cs, &stage1) method, which was tested with a 32-core cloud server, waited for more than 24 hours and was not completed yet. It seems that it takes a lot of time to execute lagrange_coeffs(). Is it normal to spend so much time?

nathan-at-least commented 5 years ago

Hi @sean-liu55, I recall that the Sprout MPC process took multiple days. Did your process complete yet?

Are you running the process from scratch or verifying the transcript of the official Zcash parameters? If you are running it from scratch is this to generate parameters for an application, to verify the process for Zcash, or just learn the process?

arielgabizon commented 5 years ago

Hi @sean-liu55 , the lagrange_coeffs(), what we usually call the FFT, is the heaviest part by far. I think it took about an hour on the 128-core machine

sean-liu55 commented 5 years ago

I was trying to run the process from scratch and generate parameters. The process finally completed, but I still can't find the reason for the slow execution. I saw the new version of the MPC process and will close this issue, thanks.