This repo contains:
- The
circom
implementation of the Aptos Keyless ZK relation from AIP-61 incircuit/templates/
. - An implementation of a ZK proving service in
prover-service/
. Its README contains instructions for building and running tests. - A circom unit testing framework in
circuit/
. Its README contains instructions for running the circuit unit tests. - Some shared rust code in
keyless-common/
. - A VK diff tool in
vk-diff
(see its README for details).
To setup your environment for both the prover service and the circuit, run the following command:
./scripts/task.sh setup-dev-environment
Optionally, it is possible to install a precommit hook that checks whether the circuit compiles before committing. To do this, run the following command:
./scripts/task.sh setup-dev-environment misc:install-circom-precommit-hook
- Why is the description of
keyless-common/
set to "Aptos Keyless circuit tests" in itsCargo.toml
?- Changed description to "Shared code that is used both by the prover service and circuit unit tests."
- The
Cargo.toml
description ofcircuit/
also seem inappropriate- Changed description to "The Aptos Keyless circuit (circom) and unit tests (rust)."
- Redundant
OnChainGroth16VerificationKey
struct - Move some shared
prover
andvk-diff
code tokeyless-common
- Remove public inputs hash and do commit-and-prove
- Pedersen-based keyless addresses and avoid Poseidon hashing, except for Fiat-Shamir maybe
- The circuit is in the
circuit
directory, but its Cargo.toml sets the crate name to beaptos-keyless-circuit
. Might be less confusing to have the directory name agree with the crate name?