This is the vCPU handler of the ZEOS Token Contract to verify zk-SNARKs.
See also:
This JavaScript handler ('zeos_verify_proof.js') is the vCPU handler of the ZEOS Token Contract. It supports zk-SNARK verification for both: The Groth16 proving system as well as Halo2.
This verifier is built for EOSIO utilizing Liquidapps' DAPP Network services.
To setup the full workspace clone the dependencies rustzeos, bellman and halo2 as well:
mkdir zeos
cd zeos
git clone https://github.com/mschoenebeck/rustzeos.git
git clone https://github.com/mschoenebeck/halo2.git
git clone https://github.com/mschoenebeck/bellman.git
Clone this repository:
git clone https://github.com/mschoenebeck/zeos-verifier.git
cd zeos-verifier
Build the project as Rust library:
cargo build
Run the unit tests:
cargo test --package zeos-verifier --lib -- tests::groth16::test_verify_groth16_proof --exact --nocapture
cargo test --package zeos-verifier --lib -- tests::halo2::test_verify_halo2_proof --exact --nocapture
Build the project as NodeJS extension module:
make
Run the unit tests:
make run
If you need help join us on Telegram.
Matthias Schönebeck
It's open source. Do with it whatever you want.
Big thanks to the Electric Coin Company for developing, documenting and maintaining this awesome open source codebase for zk-SNARKs!