Skip to content

Commit

Permalink
Merge pull request #611 from zcash/release-0.2.0
Browse files Browse the repository at this point in the history
Release 0.2.0
  • Loading branch information
ebfull authored Jun 23, 2022
2 parents dac6cfb + 2c06d83 commit 9120031
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion halo2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs", "--html-in-header", "katex-header.html"]

[dependencies]
halo2_proofs = { version = "0.1", path = "../halo2_proofs" }
halo2_proofs = { version = "0.2", path = "../halo2_proofs" }

[lib]
bench = false
3 changes: 3 additions & 0 deletions halo2_gadgets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ and this project adheres to Rust's notion of
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.0] - 2022-06-23
### Added
- `halo2_gadgets::utilities::RangeConstrained<F, Value<F>>::bitrange_of`

### Changed
All APIs that represented witnessed values as `Option<V>` now represent them as
`halo2_proofs::circuit::Value<V>`. The core API changes are listed below.

- Migrated to `halo2_proofs 0.2.0`.
- The following APIs now take `Value<_>` instead of `Option<_>`:
- `halo2_gadgets::ecc`:
- `EccInstructions::{witness_point, witness_point_non_id}`
Expand Down
4 changes: 2 additions & 2 deletions halo2_gadgets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "halo2_gadgets"
version = "0.1.0"
version = "0.2.0"
authors = [
"Sean Bowe <sean@electriccoin.co>",
"Jack Grigg <jack@electriccoin.co>",
Expand All @@ -26,7 +26,7 @@ arrayvec = "0.7.0"
bitvec = "1"
ff = "0.12"
group = "0.12"
halo2_proofs = { version = "0.1", path = "../halo2_proofs" }
halo2_proofs = { version = "0.2", path = "../halo2_proofs" }
lazy_static = "1"
pasta_curves = "0.4"
proptest = { version = "1.0.0", optional = true }
Expand Down
2 changes: 2 additions & 0 deletions halo2_gadgets/src/ecc/chip/mul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ impl<F: FieldExt> Deref for Z<F> {
}

// https://p.z.cash/halo2-0.1:ecc-var-mul-witness-scalar?partial
#[allow(clippy::assign_op_pattern)]
#[allow(clippy::ptr_offset_with_cast)]
fn decompose_for_scalar_mul(scalar: Value<&pallas::Base>) -> Vec<Value<bool>> {
construct_uint! {
struct U256(4);
Expand Down
2 changes: 2 additions & 0 deletions halo2_gadgets/src/utilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ mod tests {
}
}

#[allow(clippy::assign_op_pattern)]
#[allow(clippy::ptr_offset_with_cast)]
#[test]
fn test_bitrange_subset() {
let rng = OsRng;
Expand Down
2 changes: 2 additions & 0 deletions halo2_proofs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to Rust's notion of
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.0] - 2022-06-23
### Added
- `halo2_proofs::circuit::Value`, a more usable and type-safe replacement for
`Option<V>` in circuit synthesis.
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "halo2_proofs"
version = "0.1.0"
version = "0.2.0"
authors = [
"Sean Bowe <sean@electriccoin.co>",
"Ying Tong Lai <yingtong@electriccoin.co>",
Expand Down
6 changes: 3 additions & 3 deletions halo2_proofs/examples/cost-model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl FromStr for Poly {

#[derive(Debug)]
struct Lookup {
columns: usize,
_columns: usize,
input_deg: usize,
table_deg: usize,
}
Expand All @@ -112,11 +112,11 @@ impl FromStr for Lookup {

fn from_str(s: &str) -> Result<Self, Self::Err> {
let mut parts = s.split(',');
let columns = parts.next().unwrap().parse()?;
let _columns = parts.next().unwrap().parse()?;
let input_deg = parts.next().unwrap().parse()?;
let table_deg = parts.next().unwrap().parse()?;
Ok(Lookup {
columns,
_columns,
input_deg,
table_deg,
})
Expand Down
4 changes: 2 additions & 2 deletions halo2_proofs/src/poly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<'a, F: Field, B: Basis> Add<&'a Polynomial<F, B>> for Polynomial<F, B> {
}
}

impl<'a, F: Field> Polynomial<F, LagrangeCoeff> {
impl<F: Field> Polynomial<F, LagrangeCoeff> {
/// Rotates the values in a Lagrange basis polynomial by `Rotation`
pub fn rotate(&self, rotation: Rotation) -> Polynomial<F, LagrangeCoeff> {
let mut values = self.values.clone();
Expand All @@ -211,7 +211,7 @@ impl<'a, F: Field> Polynomial<F, LagrangeCoeff> {
}
}

impl<'a, F: Field, B: Basis> Mul<F> for Polynomial<F, B> {
impl<F: Field, B: Basis> Mul<F> for Polynomial<F, B> {
type Output = Polynomial<F, B>;

fn mul(mut self, rhs: F) -> Polynomial<F, B> {
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/src/poly/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl<G: Group> EvaluationDomain<G> {
} else {
point *= &self
.get_omega_inv()
.pow_vartime(&[(rotation.0 as i64).abs() as u64]);
.pow_vartime(&[(rotation.0 as i64).unsigned_abs()]);
}
point
}
Expand Down

0 comments on commit 9120031

Please sign in to comment.