-
- contains files for setting up zero knowledge programs (trusted setup)
- out folder contains generated files (mounted by server in docker compose)
- generates keypairs and verifier contract for use in contracts and server
- run setup only once otherwise you need to start over and destroy access to generated zkp as keypairs used come from different trusted setup
-
- deployment of smart contracts
- ganache blockchain for testing
- deployment script to deploy contract for confidentialregistry and verifier
- docker-compose for ganache and deployment (run-once) with truffle
- ganache is run in deterministic mode
-
- backend for accessing blockchain
- generates zkp
- communicates with database
- docker
- a good CPU
- about 7 GB of RAM reserved for docker
- docker/docker-compose (run server/database)
- node.js (used for scripts)
- npm (install dependencies)
- postman (use with postman collection)
requirement | tested version |
---|---|
docker | docker version 20.10.14, build a224086 |
docker-compose | version 1.29.2, build 5becea4c |
node | v18.7.0 |
npm | 8.18.0 |
postman | 10.5.2 |
setup of local environment:
npm i
in project folder- zokrates:
- create folder
mkdir out
- generate setup:
node with_salt/setup_keys.js
- create folder
- contracts:
docker-compose up -d
- wait until bootstrap container has exited and written the config file to server/export/config.env
npm i
in server folder- server: build server image and pull postgres image
- run
docker-compose up -d
- run
! alternatively, you can use the bash scripts create, start, stop and remove (run before npm i
in contracts and server to install npm dependencies)
! best is to use postman collection which displays information about requests/response
! for ease of use it is recommended to use the scripts invoked with node <scriptName.js>
using the enviroment:
- zokrates: perform trusted setup (use create.sh or in zokrates: node with_salt/setup_keys.js)
- use start.sh or run first
docker-compose up -d
in contracts and thendocker-compose up -d
in server - use registry api either with postman collection or scripts in scripts folder