Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iden3/circuits
Circom circuits used by the iden3 core protocol.
https://github.com/iden3/circuits
Last synced: 2 months ago
JSON representation
Circom circuits used by the iden3 core protocol.
- Host: GitHub
- URL: https://github.com/iden3/circuits
- Owner: iden3
- License: gpl-3.0
- Created: 2020-03-23T15:11:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T09:36:06.000Z (6 months ago)
- Last Synced: 2024-08-24T03:01:34.474Z (5 months ago)
- Language: Go
- Homepage:
- Size: 1.58 MB
- Stars: 81
- Watchers: 9
- Forks: 14
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-circom - iden3/circuits - Circom circuits used by the iden3 core protocol (Projects using Circom / Cryptographic primitives in other languages)
README
# circuits [![Tests](https://github.com/iden3/circuits/workflows/Tests/badge.svg)](https://github.com/iden3/circuits/actions?query=workflow%3ATests)
Circuits used by the iden3 core protocol.
The circuits of this repository are compatible with the [go-iden3-core implementation](https://github.com/iden3/go-iden3-core)
# Building and trusted setup
First install the npm dependencies:
```bash
npm ci
```Then build the circuit and do the "trusted" setup:
```bash
./compile-circuit.sh CIRCUIT_PATH PTAU_FILE_PATH
```Examples:
```bash
./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_KEY_ID_ and _SECRET_ACCESS_KEY_ variables are defined. Script works with _./build_ folder which is located in project.
```bash
export ACCESS_KEY_ID=...
export SECRET_ACCESS_KEY=...```
`s3_util.js` was written for:
- Uploading circuits which are located in`./build` folder to S3 bucket in zip file. Next example uploads to S3 bucket (default bucket is `iden3-circuits-bucket`) with name `v1.zip`.
```bash
node s3_util.js add v1
```- Compressing circuits from `./build` folder to zip and save it to root project folder with name `v1.zip`. Example:
```bash
node s3_util.js zip v1
```- Removing zip file from S3 bucket (default bucket `iden3-circuits-bucket`) Example:
```bash
node s3_util.js rm v1
```## Push docker container to github packages
1. Create [PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token);
2. Login to github registry:
```bash
echo | docker login ghcr.io -u --password-stdin
```
3. Build docker image with tag:
```bash
docker build -t ghcr.io/iden3/circom: .
```
4. Push docker image:
```bash
docker push ghcr.io/iden3/circom:
```
5. Update `.github/workflows/main.yaml` to the new image:
```yaml
...
container:
image: ghcr.io/iden3/circom:
...
```