Skip to content

Commit

Permalink
Merge branch 'main' into feat/fft-mem-optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpwang committed Nov 16, 2023
2 parents 076711d + 42573f6 commit 2c0075a
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 21 deletions.
18 changes: 12 additions & 6 deletions halo2_proofs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
[package]
name = "halo2_proofs"
name = "halo2-axiom"
version = "0.4.0"
authors = [
"Sean Bowe <[email protected]>",
"Ying Tong Lai <[email protected]>",
"Daira Hopwood <[email protected]>",
"Jack Grigg <[email protected]>",
"Privacy Scaling Explorations team", "Taiko Labs", "Intrinsic Technologies"
]
edition = "2021"
rust-version = "1.56.1"
rust-version = "1.73.0"
description = """
Fast PLONK-based zero-knowledge proving system with no trusted setup
Fast PLONK-based zero-knowledge proving system with no trusted setup.
This is a fork of <https://github.com/privacy-scaling-explorations/halo2>, which is itself a fork of ZCash's "halo2_proofs" crate.
This fork uses the KZG polynomial commitment scheme for the proving backend.
Publishing this crate for better versioning in Axiom's production usage.
This crate requires rust nightly to build.
"""
license = "MIT OR Apache-2.0"
repository = "https://github.com/zcash/halo2"
documentation = "https://docs.rs/halo2_proofs"
repository = "https://github.com/axiom-crypto/halo2"
# documentation = "https://docs.rs/halo2_proofs"
readme = "README.md"
categories = ["cryptography"]
keywords = ["halo", "proofs", "zkp", "zkSNARKs"]
Expand Down Expand Up @@ -55,7 +61,7 @@ crossbeam = "0.8"
ff = "0.13"
group = "0.13"
pairing = "0.23"
halo2curves = { git = "https://github.com/axiom-crypto/halo2curves.git", branch = "main", default-features = false, features = ["bits", "bn256-table", "derive_serde"] }
halo2curves = { package = "halo2curves-axiom", version = "0.4.1", default-features = false, features = ["bits", "bn256-table", "derive_serde"] }
rand = "0.8"
rand_core = { version = "0.6", default-features = false}
tracing = "0.1"
Expand Down
1 change: 1 addition & 0 deletions halo2_proofs/benches/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extern crate criterion;
use crate::arithmetic::small_multiexp;
use crate::halo2curves::pasta::{EqAffine, Fp};
use group::ff::Field;
use halo2_axiom as halo2_proofs;
use halo2_proofs::*;

use halo2_proofs::poly::{commitment::ParamsProver, ipa::commitment::ParamsIPA};
Expand Down
1 change: 1 addition & 0 deletions halo2_proofs/benches/commit_zk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extern crate criterion;

use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use group::ff::Field;
use halo2_axiom as halo2_proofs;
use halo2_proofs::arithmetic::parallelize;
use halo2curves::pasta::pallas::Scalar;
use rand_chacha::rand_core::RngCore;
Expand Down
1 change: 1 addition & 0 deletions halo2_proofs/benches/dev_lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
extern crate criterion;

use ff::{Field, PrimeField};
use halo2_axiom as halo2_proofs;
use halo2_proofs::circuit::{Layouter, SimpleFloorPlanner, Value};
use halo2_proofs::dev::MockProver;
use halo2_proofs::plonk::*;
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/benches/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extern crate criterion;

use crate::arithmetic::best_fft;
use group::ff::Field;
use halo2_proofs::{poly::EvaluationDomain, *};
use halo2_axiom::{poly::EvaluationDomain, *};
use halo2curves::bn256::Fr as Scalar;

use criterion::{BenchmarkId, Criterion};
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/benches/hashtocurve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use criterion::{criterion_group, criterion_main, Criterion};

use halo2_proofs::arithmetic::CurveExt;
use halo2_axiom::arithmetic::CurveExt;
use halo2curves::pasta::{pallas, vesta};

fn criterion_benchmark(c: &mut Criterion) {
Expand Down
1 change: 1 addition & 0 deletions halo2_proofs/benches/plonk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
extern crate criterion;

use group::ff::Field;
use halo2_axiom as halo2_proofs;
use halo2_proofs::circuit::{Cell, Layouter, SimpleFloorPlanner, Value};
use halo2_proofs::plonk::*;
use halo2_proofs::poly::{commitment::ParamsProver, Rotation};
Expand Down
1 change: 1 addition & 0 deletions halo2_proofs/examples/circuit-layout.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use ff::Field;
use halo2_axiom as halo2_proofs;
use halo2_proofs::{
circuit::{Cell, Layouter, Region, SimpleFloorPlanner, Value},
plonk::{Advice, Assigned, Circuit, Column, ConstraintSystem, Error, Fixed, TableColumn},
Expand Down
1 change: 1 addition & 0 deletions halo2_proofs/examples/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{
};

use ff::Field;
use halo2_axiom as halo2_proofs;
use halo2_proofs::{
circuit::{Layouter, SimpleFloorPlanner, Value},
plonk::{
Expand Down
1 change: 1 addition & 0 deletions halo2_proofs/examples/shuffle.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use ff::{BatchInvert, FromUniformBytes};
use halo2_axiom as halo2_proofs;
use halo2_proofs::{
arithmetic::Field,
circuit::{Layouter, SimpleFloorPlanner, Value},
Expand Down
4 changes: 2 additions & 2 deletions halo2_proofs/src/circuit/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl<V> Value<V> {
/// # Examples
///
/// ```
/// use halo2_proofs::circuit::Value;
/// use halo2_axiom::circuit::Value;
///
/// let v = Value::known(37);
/// ```
Expand Down Expand Up @@ -645,7 +645,7 @@ impl<V> Value<V> {
/// If you have a `Value<F: Field>`, convert it to `Value<Assigned<F>>` first:
/// ```
/// # use halo2curves::pasta::pallas::Base as F;
/// use halo2_proofs::{circuit::Value, plonk::Assigned};
/// use halo2_axiom::{circuit::Value, plonk::Assigned};
///
/// let v = Value::known(F::from(2));
/// let v: Value<Assigned<F>> = v.into();
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl<F: Field> Mul<F> for Value<F> {
/// # Examples
///
/// ```
/// use halo2_proofs::{
/// use halo2_axiom::{
/// circuit::{Layouter, SimpleFloorPlanner, Value},
/// dev::{FailureLocation, MockProver, VerifyFailure},
/// plonk::{Advice, Any, Circuit, Column, ConstraintSystem, Error, Selector},
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/src/dev/gates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct Gate {
///
/// ```
/// use ff::Field;
/// use halo2_proofs::{
/// use halo2_axiom::{
/// circuit::{Layouter, SimpleFloorPlanner},
/// dev::CircuitGates,
/// plonk::{Circuit, ConstraintSystem, Error},
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/src/dev/graph/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
/// # Examples
///
/// ```ignore
/// use halo2_proofs::dev::CircuitLayout;
/// use halo2_axiom::dev::CircuitLayout;
/// use plotters::prelude::*;
///
/// let drawing_area = BitMapBackend::new("example-circuit-layout.png", (1024, 768))
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/src/dev/tfp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use crate::{
///
/// ```ignore
/// use ff::Field;
/// use halo2_proofs::{
/// use halo2_axiom::{
/// circuit::{floor_planner, Layouter, Value},
/// dev::TracingFloorPlanner,
/// plonk::{Circuit, ConstraintSystem, Error},
Expand Down
5 changes: 4 additions & 1 deletion halo2_proofs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//! # halo2_proofs
//! # halo2-axiom
//! This is a fork of <https://github.com/privacy-scaling-explorations/halo2>, which is itself a fork of ZCash's "halo2_proofs" crate.
//! This fork uses the KZG polynomial commitment scheme for the proving backend.
//! Publishing this crate for better versioning in Axiom's production usage.

#![cfg_attr(docsrs, feature(doc_cfg))]
// The actual lints we want to disable.
Expand Down
12 changes: 6 additions & 6 deletions halo2_proofs/src/plonk/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,9 @@ impl TryFrom<Column<Any>> for Column<Instance> {
///
/// Selectors can be used to conditionally enable (portions of) gates:
/// ```
/// use halo2_proofs::poly::Rotation;
/// use halo2_axiom::poly::Rotation;
/// # use halo2curves::pasta::Fp;
/// # use halo2_proofs::plonk::ConstraintSystem;
/// # use halo2_axiom::plonk::ConstraintSystem;
///
/// # let mut meta = ConstraintSystem::<Fp>::default();
/// let a = meta.advice_column();
Expand All @@ -438,12 +438,12 @@ impl TryFrom<Column<Any>> for Column<Instance> {
/// Selectors are disabled on all rows by default, and must be explicitly enabled on each
/// row when required:
/// ```
/// use halo2_proofs::{
/// use halo2_axiom::{
/// circuit::{Chip, Layouter, Value},
/// plonk::{Advice, Column, Error, Selector},
/// };
/// use ff::Field;
/// # use halo2_proofs::plonk::Fixed;
/// # use halo2_axiom::plonk::Fixed;
///
/// struct Config {
/// a: Column<Advice>,
Expand Down Expand Up @@ -1477,9 +1477,9 @@ impl<F: Field> From<Expression<F>> for Vec<Constraint<F>> {
/// A set of polynomial constraints with a common selector.
///
/// ```
/// use halo2_proofs::{plonk::{Constraints, Expression}, poly::Rotation};
/// use halo2_axiom::{plonk::{Constraints, Expression}, poly::Rotation};
/// use halo2curves::pasta::Fp;
/// # use halo2_proofs::plonk::ConstraintSystem;
/// # use halo2_axiom::plonk::ConstraintSystem;
///
/// # let mut meta = ConstraintSystem::<Fp>::default();
/// let a = meta.advice_column();
Expand Down
1 change: 1 addition & 0 deletions halo2_proofs/tests/plonk_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// use assert_matches::assert_matches;
use ff::{FromUniformBytes, WithSmallOrderMulGroup};
use halo2_axiom as halo2_proofs;
use halo2_proofs::arithmetic::Field;
use halo2_proofs::circuit::{Cell, Layouter, SimpleFloorPlanner, Value};
use halo2_proofs::dev::MockProver;
Expand Down

0 comments on commit 2c0075a

Please sign in to comment.