| p0tion has been intentionally designed as an agnostic-from-ceremony public good toolkit, with the aim of making Groth16 zk-applications scale and become production-ready in a safe and secure manner by running Phase 2 Trusted Setup ceremonies. |
|---|
Our design philosophy ensures that p0tion stands as the optimal choice for running secure Groth16 zk-applications via automated phase2 ceremonies. The entire process has been streamlined through the easy to use and configure infrastructure, simplifying coordination, scalability, and minimizing the burden of conducting ceremonies from scratch. Additionally, our clear and user-friendly documentation and code, as well as rapid onboarding and deployment, guarantee an adaptable tool that can easily accommodate the evolving needs of developers.
This project is not actively developed anymore. Unless there are critical bugs we will not be able to add new features. It is ready to run trusted setups ceremonies by external third parties. You can use this tutorial to configure and start using p0tion. If you need more info contact us in our Discord channel (join the PSE's Discord server here).
| Package | Version | Downloads |
|---|---|---|
| @p0tion/actions |
|
|
| @p0tion/backend |
|
|
| @p0tion/phase2cli |
|
|
Clone this repository
git clone https://github.com/privacy-scaling-explorations/p0tion.gitInstall the dependencies
cd p0tion && yarnRun Rollup to build all the packages
yarn buildRun ESLint to analyze the code and catch bugs
yarn lintOr to automatically lint the code
yarn lint:fixRun Prettier to check formatting rules
yarn prettierOr to automatically format the code
yarn prettier:writeFor test execution (e2e/unit) we leverage Jest.
Prerequisites
- Node.js version 16.0 or higher.
- Java JDK version 11 or higher.
The Java JDK is required in order to simulate the Firebase services by using the official Firebase Emulator. Note that the first run will result in a download of ~62 MB and no additional configuration is required.
Run Jest to execute (e2e/unit) tests on the emulator locally
yarn testPrerequisites
- A Firebase Application w/ active billing (Blaze Plan) in order to support Cloud Functions deployment.
- Copy the
packages/actions/.env.defaultfile as.envcp .env.default .envand add your environment variables. - Copy the
packages/backend/.default.envfile as.envcp .default.env .envand add your environment variables. - Generate and store a configuration file with your service account's credentials as described in this documentation inside the
packages/backend/serviceAccountKey.jsonfile. - Navigate to the backend package by running
cd packages/backend - Rename the
.firebasercproduction project alias with your Firebase project name. - Deploy your Firebase Application in production by running
yarn firebase:deploy(this may take a while to propagate). - Remember that if it is your first time using these functions, you might need to give permissions in Google Cloud Console so any user can execute them without running into unauthenticated errors. For more info check this stack overflow thread.
Run Jest to run (e2e/unit) tests in a production environment:
yarn test:prodp0tion uses Conventional Commits. The rules are enforced when running git commit or the command line utility yarn commit.
The commands trigger a verification of changed files to check compliance with custom ESLint and Prettier rules.
This repository is released under the MIT License.