Commit Graph

19 Commits

Author SHA1 Message Date
kilic 0e71b9183a update `halo2curves` to v0.6.0
replace `maybe-rayon` with `rayon` v1.8
2024-01-10 18:27:47 +03:00
kilic 8e9e06998b fix clippy 2024-01-10 18:27:47 +03:00
Thor 951abe619a
fix: clippy (#203)
* fix: clippy

* fmt

* fix: Final clippy complains & adjustments

---------

Co-authored-by: CPerezz <c.perezbaro@gmail.com>
2023-09-18 09:25:26 +02:00
Han 7a21656171
Synchronize with upstream (#199)
* refactor: add default impl for `SyncDeps` for backward compatability

* feat: pick changes from https://github.com/zcash/halo2/pull/728 and changes of flag `test-dev-graph`

* feat: pick changes from https://github.com/zcash/halo2/pull/622

* feat: pick changes about mod `circuit` and mod `dev`

* feat: pick rest changes of `halo2_proofs`

* fix: when `--no-default-features`

* ci: sync from upstream, and deduplicate jobs when
push to `main`, and remove always failing job `codecov`.

* fix: make `commit_zk` runnable when `--no-default-features`
2023-09-06 14:59:44 +08:00
dante 0f000478f4
feat: public cells to allow for implementations of custom `Layouter` (#192)
* feat: public cells

* Update mds.rs

* Update mds.rs

* Update single_pass.rs

Co-authored-by: Han <tinghan0110@gmail.com>

* bump toolchain to resolve errors

* fix clippy errors for CI run

* rustfmt post clippy

* plz let it be the last lint

* patch clippy lints in gadgets

* clippy lints for sha256 bench

* patch halo2proof benches

* Update assigned.rs

* Update halo2_gadgets/src/poseidon/primitives/mds.rs

Co-authored-by: Han <tinghan0110@gmail.com>

* Update halo2_gadgets/src/poseidon/primitives/mds.rs

Co-authored-by: Han <tinghan0110@gmail.com>

---------

Co-authored-by: Han <tinghan0110@gmail.com>
2023-08-25 22:39:50 +08:00
Eduard S 0d56c57a07
Extend Circuit trait to take parameters in config (#168)
* Extend Circuit trait to take parameters in config

The Circuit trait is extended with the following:
```
pub trait Circuit<F: Field> {
    /// [...]
    type Params: Default;

    fn params(&self) -> Self::Params {
        Self::Params::default()
    }

    fn configure_with_params(meta: &mut ConstraintSystem<F>, params: &Self::Params) -> Self::Config {
        Self::configure(meta)
    }

    fn configure(meta: &mut ConstraintSystem<F>) -> Self::Config;
}
```

This allows runtime parametrization of the circuit configuration.  The extension to the Circuit trait has been designed to minimize the breaking change: existing circuits only need to define the associated `type Params`.

Unfortunately "Associated type defaults" are unstable in Rust, otherwise this would be a non-breaking change.  See https://github.com/rust-lang/rust/issues/29661

* Implement circuit params under feature flag

* Don't overwrite configure method

* Fix doc test
2023-04-20 21:20:09 +08:00
Carlos Pérez fcdd5b910d
change: Migrate workspace to pasta_curves-0.5 (#157)
* change: Migrate workspace to pasta_curves-0.5

This ports the majority of the workspace to the `pasta_curves-0.5.0`
leaving some tricky edge-cases that we need to handle carefully.

Resolves: #132

* fix: Complete latest trait bounds to compile halo2proofs

* change: Migrate examples & benches to pasta 0.5

* change: Migrate halo2_gadgets to pasta-0.5

* change: Update gadgets outdated code with latest upstream

* fix: Sha3 gadget circuit

* fix: doc tests

* chore: Update merged main

* fix: Apply review suggestions
2023-03-07 17:29:37 +01:00
Carlos Pérez 4d93d01ca2
feat: Parallel random blinder poly impl (#152)
* feat: Parallelize `commit` blinder poly generator method

Solves the concerns raised in #151 related to the performance of the
random poly generator inside of `commit`.

Resolves: #151

* chore: add `from_evals` for Polynomial

* chore: add benches for commit_zk serial vs par

* fix: Correct thread_seeds iter size

* fix: Clippy

* chore: apply review suggestions

* fix: Inconsisten num of Scalars generated parallely

This fix from @ed255 fixes an error on the code proposal which was
rounding the num of Scalars to be generated and so, was producing
failures.

Co-authored-by: Edu <eduardsanou@posteo.net>

* remove: legacy comments & code

---------

Co-authored-by: Edu <eduardsanou@posteo.net>
2023-02-28 11:42:06 +01:00
Zhang Zhuo 31efabd369 Add name in `lookup::Argument` 2022-08-19 16:00:51 +08:00
kilic 51d523df60 Commitment scheme abstraction
Add SHPLONK and GWC varians of KZG
2022-08-19 16:00:51 +08:00
ChihChengLiang 25b47f23c8 add back diffs 2022-08-19 11:52:07 +08:00
ChihChengLiang 63b42c96cd Merge branch 'upstream' into purely-upstream 2022-08-19 11:47:43 +08:00
Jack Grigg 47f25ad632 halo2_proofs: Replace `Option<V>` with `Value<V>` 2022-06-08 23:03:16 +00:00
Sean Bowe a02b9e2e7e
Add benchmark for various FFT sizes. 2022-04-20 13:09:58 -06:00
str4d 19b2b3b7e2
Fix clippy lints 2022-04-18 12:25:58 +02:00
therealyingtong 51d34c12a2 Bench heavily padded lookup in MockProver.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 22:02:29 +08:00
kilic 0e9b075c3a Change multiopen commitment scheme to KZG 2022-02-12 20:56:25 +03:00
Jack Grigg 4d336f2707 halo2_proofs: Improve `plonk::verify_proof` API
Previously `plonk::verify_proof` took an `MSM` as an argument, to enable
batch verification. However, this also required that it take a source of
randomness in order to enforce separation of proofs within a batch. This
made single-proof verification unnecessarily non-deterministic.

We now have a `VerificationStrategy` trait encapsulating the necessary
details, and separate `SingleVerifier` and `BatchVerifier` structs for
the specific variants. Proof verifiers no longer need to create and
manage the `MSM` themselves, and single-proof verifiers no longer need
to supply a source of randomness.

Co-authored-by: Sean Bowe <sean@electriccoin.co>
2022-01-27 00:20:56 +00:00
Jack Grigg 3c6558f049 Move `halo2` code into `halo2_proofs` crate 2022-01-20 18:50:43 +00:00