An easy-to-configure, deploy and maintain cloud infrastructure solution for automating the coordination, scalability, and storage of your Groth16 zkSNARKs Phase 2 Trusted Setup ceremonies.
|This library provides everything needed to configure, deploy and manage the infrastructure required to run one or more Phase 2 Trusted Setup ceremonies.
Launching the ready-to-run customized scripts everyone could handle whatever is needed to accomplish the users authentication, ceremony setup, coordination and finalization. You could count on the combination of services provided by the far most popular cloud solutions in the market, as AWS for S3 Storage and GCP Firebase for Authentication, Firestore DB and, Cloud Functions services.
- Node.js version 16.0 or higher.
- Yarn version 3.5.0 or higher.
- A Firebase Application w/ active billing (Blaze Plan) in order to support Cloud Functions deployment.
- Follow the Installation and Usage guide.
- Generate and store a configuration file with your service account's credentials as stated in this documentation inside the
- Rename the
.firebasercproduction project alias with your Firebase project name.
Navigate to backend package by running
.default.env file as
cp .env.default .env
And add your environment variables.
Login using your Google Account to Firebase CLI running
Run the following to logout
Initialize a new Firebase project interactively
- Login or create a new AWS Account.
- The AWS free tier account will cover a good number of requests for ceremonies but there could be some costs based on your ceremony circuits size.
- Create an access key for a user with Admin privileges (NOT ROOT USER)
- Setup the
awscli(docs) and add the keys for this user.
- Decide on an AWS region (by default this is us-east-1) - if you want to change you will need to do the following:
- zip the Lambda folder:
zip -r ../lambda.zip .
- Run terraform:
terraform output secret_key
- To print the secret access key for the IAM user
- Store the other values (sns_topic_arn etc.)
- These will be needed for the .env file configuration
The IAM user created with the steps above can be used for all p0tion's features.
Deploy the current configuration to the
prod project running
To deploy only the latest Cloud Functions run
To deploy only the latest Firestore configuration and rules run
Firebase provides a Local Emulator Suite as a set of advanced dev-tools w/ a rich user-interface to build and test apps locally using Firebase services as Cloud Functions, Firestore and Authentication.
- You will need Java JDK version 11 or higher to run the Firebase Local Emulator.
To start the Emulator run
To emulate only Cloud Functions service run
To run the Emulator shell in a new command line window run
To run tests (e2e/unit) locally in the Emulator run