🤝Contribute

Contribute to our V2 trusted setup ceremony

We are performing our trusted setup ceremony using p0tion from PSE. You are contributing to generating the proving keys for the following circuits

  1. HDFC Send

  2. HDFC Registration

  3. Venmo Send V2

HDFC circuits are for adding support for INR (Indian Rupee 🇮🇳) to zkp2p. You can track previous contributions to the ceremony on the p0tion site. Follow these steps to contribute to our trusted setup ceremony.

👉 IMPORTANT: Our circuits are massive, so this can take considerable time and bandwidth if done on a "normal" computer! For example, an M1 laptop on a normal internet connection will take around 1 hour to contribute.

👉 Please use a server instance to contribute to the ceremony. You will need around 20GB of space to store the zkeys while contributing. Any issues please let us know.

👉 Skip to step 9 if you have phase2cli 1.1.0 already installed. Run phase2cli --version to know your version.

  1. Install phase2cli by p0tion

npm install -g -f @p0tion/phase2cli
  1. Run

phase2cli --version
  1. If you see an error like below. Don't panic. It's due to the latest ffjavascript using web-worker 1.3.0. We will fix the issue by replacing it with web-worker 1.2.0 using the next set of commands.

$ phase2cli --version

(node:31877) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/sachin/.nvm/versions/node/v18.19.0/lib/node_modules/@p0tion/phase2cli/node_modules/web-worker/node.js:17
import URL from 'url';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1274:20)
    ...
    at async loadESM (node:internal/process/esm_loader:34:7)

Node.js v18.19.0
  1. Run the following command to locate your phase2cli installation.

$ whereis phase2cli

phase2cli: /home/sachin/.nvm/versions/node/v18.19.0/bin/phase2cli
  1. Change directory to the lib folder of phase2cli.

In my case, the base directory for phase2cli as shown above is /home/sachin/.nvm/versions/node/v18.19.0/. You will need to replace this part of the path with the directory specific to your system. The command to change directories to the lib folder of phase2cli for me was

cd /home/sachin/.nvm/versions/node/v18.19.0/lib/node_modules/@p0tion/phase2cli/

// Please replace /home/sachin/.nvm/versions/node/v18.19.0/ with the direcotry
// specific to your system
  1. Uninstall existing webworker.

npm uninstall web-worker
  1. Install web-worker 1.2.0

npm install web-worker@1.2.0
  1. cd back to your home (or any directory of your choice) and confirm the fix

cd ~
phase2cli --version
  1. Great. We fixed the issue. 🎉 Now, auth with your GitHub account.

phase2cli auth

If running on a server, you will just need to copy the auth code, visit https://github.com/login/device and paste it there + authorize gist access for the transcript.

  1. Finally contribute

phase2cli contribute --ceremony zkp2p-trusted-setup-ceremony-v2

Feel free to share your contribution and tag @zkp2p once you are done!

Troubleshooting

  • Authentication:

    • After auth, wait maybe 1 minute to be safe before running contribute which may lag.

  • Node version

    • Please use node >16. Install nvm

  • If you face the "Unfortunately we could not find a user document with your information" error

    • Take your GitHub username and go to https://api.github.com/users/$USERNAME

    • Check the following:

      • "public_gists" >1

      • "followers" >1

      • "following" >5

      • "created_at" >1 month old

    • These are the requirements to participate in a p0tion ceremony.

    • If you pass all of these but still get the same error, please run these commands again.

      • phase2cli logout
      • phase2cli auth
      • phase2cli contribute --ceremony zkp2p-trusted-setup-ceremony

Last updated