- Rust 98.6%
- Circom 0.7%
- Shell 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| g16 | ||
| proofs | ||
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| LICENSE | ||
| readme.md | ||
| runo.sh | ||
Rust version used to build:
rustc -V rustc 1.86.0 (05f9846f8 2025-03-31)
Run:
We need to generate 2 contracts, a verification key and a proof verifier, both will be saved in the output directory.
cargo run
warning: `/root/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Compiling clean_slate v0.1.0 (/tmp/halohack/clean_slate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.39s
Running `target/debug/clean_slate`
start
Solidity Verifier successfully saved to /tmp/halohack/clean_slate/output/Verifier.sol
Solidity VerifierKey successfully saved to /tmp/halohack/clean_slate/output/VerifyingKey.sol
Verified ok
Deploy to an evm:
$ forge create --rpc-url https://EVM_RPC_HERE --broadcast --private-key 0xENTERPRIVATEKEYHERE generated/Verifier.sol:Halo2Verifier --legacy
Compile to westend:
Due to limits in the upload size and resolc solidity conversion to risc-v/polkavm, we only currently support the halo2 zk system on Moonbase, but we have added support for groth16 zk on Moonbase and we are actively working to get halo2 zk verifiers deployed on Westend. Due to the time constraint and the fact that we need to enable no-std support for halo2 to work on polkavm contracts, we have shipped the first version on Westend with groth16 and we will switch it to halo2 once the no-std version of it is live.
Link to groth16 verifier repo: go into the g16 folder and generate the verifier