-
milestone M1:
- Poseidon hash in Solidity
- Implements Poseidon hash in Solidity
- gas cost of the implementation
- Experiments with Poseidon hash in Circom with examples
- Experiments with KimLeeOh Snarkjs implementation with examples
- Implements Radish circuits in Circom with Poseidon hash and KimLeeOh protocol
- Creates docker containers for Circom and Snarkjs and architectures draconifors
- Docker build process clean-up
- Run setup and compile as a part of watch process
- Update readme for adding new circuits
- Add routes for proof generation
- Add routes for verifier contract generation
- Compares Poseidon hash to SHA256 used in Radish now (number of constraints and gas gos)
- Explanation doc of Poseidon hash
- Number of R1CS comparison
- Gas cost comparison
- Compares KimLeeOh to GM17 used in Radish now (proof generation time, proof size, verification time, (updatable) setup size)
- proof generation time: GM17 vs KimLeeOh
- numbers of operations (theory)
- timing of snarkjs poseidon circuit proving (implementation)
- timing of snarkjs Radish circuit proving (implementation)
- proof size: GM17 vs KimLeeOh
- verification time: GM17 vs KimLeeOh
- numbers of operations (theory)
- timing of snarkjs verification (implementation)
- setup size: GM17 vs KimLeeOh
- numbers of operations (theory)
- snarkjs poseidon circuit setup size (implementation)
- snarkjs Radish setup size (implementation)
- updatable setup
- explanation and use in Radish
- implementation
- proof generation time: GM17 vs KimLeeOh
- Poseidon hash in Solidity
-
milestone M2:
- Implements BLS12-377 curve in Snarkjs
- implement and test fields algebra
- implement and test curve algebra
- implement and test pairing computation
- test to compile, setup, prove verify a proof with KimLeeOh
- Implements a mapping tool from Snarkjs to zexey
- map snarkjs proof to zexey input
- map snarkjs verification key to zexey input
- Implements a multiple proof composition in Zexe (n proofs on BLS12-377 --> 1 proof on SW6)
- Implements a verifier smart contract for SW6 proof
- template
- automatic script connected to zexey
- Tests SW6 with EIP1962 and Geth/Parity integration
- EIP1962 test
- Geth integration
- Parity integration
- Implements BLS12-377 curve in Snarkjs
-
milestone M3:
- Implements HG6 curve
- implement in C++ zk-swap-libff
- implement in Rust zexey
- Adapts M2 to HG6
- multiple proof composition
- verifier smart contract
- Modify EIP1962 and tests
- Implements HG6 curve
-
milestone M4:
- implement MPC trusted setup for Radish34 (HG6/KimLeeOh)
- implement code for MPC powers of tau on HG6 curve
- implement code for MPC Radish34 KimLeeOh polynomials on HG6 curve
- implement MPC trusted setup for Radish34 (HG6/KimLeeOh)
-
Install Docker for Mac
-
Install and start dotdocker
dotdocker start
-
Run
docker-compose up -d
to run the draconifors containers. Alternately, rundocker-compose up
to watch the logs of thedraconifors-api
anddraconifors-api-watch
containers -
All circom circuits in
draconifors-api/circuits/*.circom
are auto-compiled and auto setup using the circom npm library and setup using "Kimleeoh" proving scheme. Corresponding outputs are captured asdraconifors-api/artifacts/*.json
files. The circuits are auto-compiled, setup and verifier solidity contracts are generated during watch process indraconifors-api-watch
container -
To re-run the circuit compilation process, add a circuit to
draconifors-api/circuits/
. Then rundocker-compose restart && docker-compose logs -f draconifors-api-watch
to get the logs of the build process. For development convenience, the test circuits from the circom repo have been added todraconifors-api/circuits/
-
To exec/attach to a running container, run
docker-compose exec [SERVICE_NAME] /bin/sh
-
To reset the process, run
make duke-nukem
at the root of the directory
-
Run
make test-api
on root, to run tests against the routes available on draconifors-Api -
Following routes are available:
-
Healthcheck: Returns status of the koa service. Example:
curl -X GET http://localhost:3001/healthcheck
-
Poseidon hashing: Returns poseidon hash based on the input data arguments. Example:
curl -d '{"t":6, "nRoundsF":8, "nRoundsP":57, "seed":"poseidon", "element":[1,2]}' -X POST http://localhost:3001/poseidon
-
Proof generation: Returns generated proof, public signals, off chain verification of proof based on the input data arguments. Example:
curl -d '{"circuitName":"multiplier", "witnessInputs": {"a": "2", "b": "4"}}' -X POST http://localhost:3001/generate-proof
- If reset doesn't work, run
docker-compose system prune -f && docker-compose build --no-cache && docker-compose up -d
- Poseidon hash circuit and contract on circomlib
- KimLeeOh protocol on snarkjs
- BLS12-377 curve implementations in Rust and C++.
- Zexe G16 implementation (Nearly identical to KimLeeOh proof and vk formats)
- Template example of KimLeeOh verifier contract on alt-bn128 curve.
- EIP1962 implementations in Rust and C++
- Tests of EIP1962 on Parity+Waffle and Geth+Truffle.
- HG6 curve paper.
- MPC trusted setup paper and code (Rust, C++)
- Snarkjs Cli for verifier solidity contract