Circuits used by the iden3 core protocol.
The circuits of this repository are compatible with the go-iden3-core implementation
First install the npm dependencies:
npm ciThen build the circuit and do the "trusted" setup:
./compile-circuit.sh CIRCUIT_PATH PTAU_FILE_PATHExamples:
./compile-circuit.sh circuits/auth.circom build/powersOfTau28_hez_final_16.ptau
./compile-circuit.sh circuits/stateTransition.circom build/powersOfTau28_hez_final_16.ptauNote: Run npm i and ensure that environment ACCESS_KEY_ID and SECRET_ACCESS_KEY variables are defined. Script works with ./build folder which is located in project.
export ACCESS_KEY_ID=...
export SECRET_ACCESS_KEY=...
s3_util.js was written for:
- Uploading circuits which are located in
./buildfolder to S3 bucket in zip file. Next example uploads to S3 bucket (default bucket isiden3-circuits-bucket) with namev1.zip.
node s3_util.js add v1- Compressing circuits from
./buildfolder to zip and save it to root project folder with namev1.zip. Example:
node s3_util.js zip v1- Removing zip file from S3 bucket (default bucket
iden3-circuits-bucket) Example:
node s3_util.js rm v1- Create PAT;
- Login to github registry:
echo <PAT> | docker login ghcr.io -u <GITHUB_NAME> --password-stdin
- Build docker image with tag:
docker build -t ghcr.io/iden3/circom:<version> .
- Push docker image:
docker push ghcr.io/iden3/circom:<version>
- Update
.github/workflows/main.yamlto the new image:... container: image: ghcr.io/iden3/circom:<version> ...
- Trail of Bits has performed a security audit of our circuits and compiled a report on May 3, 2024: 2024-05-polygonlabs-iden3circuits-securityreview.pdf