Skip to content

RajeshRk18/halo2_backend

 
 

Repository files navigation

Halo2 Backend for Noir

This is a halo2 backend for the Noir Programming Language

Get detailed documentation on this repository!

WARNING: This crate is experimental and under development. Expect bugs and unoptimized circuits.

Acknowledgement

This crate will not be possible without

  1. barretenberg backend
  2. halo2-zcash
  3. halo2-pse
  4. halo2-axiom
  5. the gadets and educational resources provided by the halo2 community see awesome-halo2

Installtion

git clone https://github.com/Mach-34/noir --branch demo-0.1.3
cd noir

To install pse's halo2 as backend:

cargo install --path crates/nargo_cli --locked --features pse_halo2_backend --no-default-features

To install axioms's halo2 as backend:

cargo install --path crates/nargo_cli --locked --features axiom_halo2_backend --no-default-features

Notice that axiom's fork is built on pse's fork and should be similar.

Examples

cd to the crates/noir_halo2_backend_common/test_programs folder of this crate and choose one of the tests/examples eg. 3_add

cd 3_add

to generate proof run

nargo prove add

to verify proof run

nargo verify add

to generates a solidity verifier smart contract for the program run

nargo codegen-verifier

Features

Halo2 Features

Features halo2-pse halo2-axiom
arithmetic gates ✔️ ✔️
range proofs ✔️ ✔️
and gates ✔️ ✔️
xor
sha256
blake2s
schnorr_verify
pedersen
hash_to_field
ecdsa_secp256k1
fixed_base_scalar_mul
keccak256
keccak256_variable_length

✔️ indicates that the feature is present. The first three features are present in both halo2-pse and halo2-axiom.

License

This library is licensed under either of the following licenses, at your discretion.

Unless you explicitly state otherwise, any contribution that you submit to this library shall be dual licensed as above (as defined in the Apache v2 License), without any additional terms or conditions.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 93.9%
  • Roff 3.5%
  • Nix 2.6%