* chore: Update rust-toolchain to 1.66 for testing
Note that tests will not compile due to the silent MSRV bump in
`blake2b_simd`.
Hence, we need to use `1.66` as toolchain.
Resolves: #207
* change: UIpdate MSRVs in Cargo.toml
* 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`
* 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>
THe package release ressets the version from those inherited by the legacy
halo2curves repo's fork history.
The upstream diff is:
9f5c50810b..9a7f726fa7
* static ref to String type in Gates, Constraints, VirtualCell, Argument
* 'lookup'.to_string()
* return &str for gate name and constriant_name, also run fmt
* Update halo2_gadgets/Cargo.toml
Co-authored-by: Han <tinghan0110@gmail.com>
* upgrade rust-toochain
---------
Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
Co-authored-by: Han <tinghan0110@gmail.com>
* 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
* 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
- We were redundantly storing the `x_p` and `y_p` columns.
- `Config::add_incomplete` was redundantly copying.
Co-authored-by: therealyingtong <yingtong@z.cash>
Both variable-base scalar mul and Sinsemilla use double-and-add with
incomplete addition on a single row, but they do so in slightly
different ways. Some of these are intentional (needing to look up the
y-coordinate vs constrain it), while others are accidental (different
concrete signs in otherwise-identical constraints that make their ASTs
incompatible).
The new `DoubleAndAdd` helper struct extracts the logic that is common
to both implementations, specifically the helper definitions of `x_r`
and `Y_A`. In a future breaking change, we can refactor both gadgets to
share more of this logic, so we are defining the incomplete addition
logic in fewer places.
The new `EccInstructions` instructions, and the corresponding changes to
existing instructions, enable chips to choose when to witness or constrain
the scalars, and simplify scalar reuse (though reuse is not implemented
for `EccChip` yet).
`FixedPoint::mul` and `FixedPointShort::mul` now has the same API style
as `NonIdentityPoint::mul`.