MPC Phase2 Suite CLI
All-in-one command-line for interfacing with zkSNARK Phase 2 Trusted Setup ceremonies
Commands
phase2cli: CLI entry point.phase2cli auth: Starts the Device Flow authentication workflow for Github OAuth 2.0.phase2cli contribute: Allow a user to participate by computing a contribution for each circuit of a selected ceremony (from those currently running).phase2cli coordinate setup: Allow the coordinator to setup a new ceremony for a particular set/variants of circuits.phase2cli coordinate observe: Allow the coordinator to monitor in real-time who is currently contributing for a circuit of a ceremony.
Getting Started
Prerequisities
You need to have the following installed:
git >= 2.25.1 node >= 16.14.0 npm >= 8.9.0 yarn >= 1.22.18
Configuration
Clone the repository and install the packages:
https://github.com/quadratic-funding/mpc-phase2-suite
cd mpc-phase2-suite
yarn
Navigate to the phase2cli/ folder and make a copy of the .env.json.default file and rename it .env.json. The new file will contain the following data:
{
"firebase": {
"FIREBASE_API_KEY": "your-firebase-api-key",
"FIREBASE_AUTH_DOMAIN": "your-firebase-auth-domain",
"FIREBASE_PROJECT_ID": "your-firebase-project-id",
"FIREBASE_MESSAGING_SENDER_ID": "your-firebase-messaging-sender-id",
"FIREBASE_APP_ID": "your-firebase-app-id"
},
"github": {
"GITHUB_CLIENT_ID": "your-github-oauth-app-client-id"
}
}
- The
firebaseobject contains your Firebase Application configuration. - The
githubobject contains your Github OAuth Application client identifier.
Usage
Local Development
Build the project
yarn build
Authenticate using Github OAuth (auth command).
yarn auth
Contribute to a ceremony (contribute command).
yarn contribute
Setup a new ceremony (setup command).
yarn coordinate:setup
Observe contributions for a ceremony (observe command).
yarn coordinate:observe
NPM Package
You could locally install the CLI as NPM package
npm i -g
Then, you could have access to phase2cli commands (as described above).
⚠️ 🛠 The project is a WIP, so it is not yet to be considered production ready. Handle with care 😴
Please, follow the project boards to stay up-to-date!