iden3 / circuits

Circom circuits used by the iden3 core protocol.
GNU General Public License v3.0
81 stars 14 forks source link

circuits Tests

Circuits used by the iden3 core protocol.

The circuits of this repository are compatible with the go-iden3-core implementation

Building and trusted setup

First install the npm dependencies:

npm ci

Then build the circuit and do the "trusted" setup:

./compile-circuit.sh CIRCUIT_PATH PTAU_FILE_PATH

Examples:

./compile-circuit.sh circuits/auth.circom build/powersOfTau28_hez_final_16.ptau
./compile-circuit.sh circuits/stateTransition.circom build/powersOfTau28_hez_final_16.ptau

Work with s3_util.js script

Note: Run npm i and ensure that environment _ACCESS_KEYID and _SECRET_ACCESSKEY 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:

node s3_util.js add v1
node s3_util.js zip v1
node s3_util.js rm v1

Push docker container to github packages

  1. Create PAT;
  2. Login to github registry:
    echo <PAT> | docker login ghcr.io -u <GITHUB_NAME> --password-stdin
  3. Build docker image with tag:
    docker build -t ghcr.io/iden3/circom:<version> .
  4. Push docker image:
    docker push ghcr.io/iden3/circom:<version>
  5. Update .github/workflows/main.yaml to the new image:
    ...
        container:
          image: ghcr.io/iden3/circom:<version>
    ...