Skip to content

Commit

Permalink
Release 0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ebfull committed May 4, 2022
1 parent b994acf commit 97199bb
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 42 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.56.0
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.56.0
override: true
- name: Add target
run: rustup target add ${{ matrix.target }}
Expand All @@ -65,7 +65,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.56.0
override: true
# Build benchmarks to prevent bitrot
- name: Build benchmarks
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.56.0
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lints-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ on: pull_request

jobs:
clippy:
name: Clippy (1.51.0)
name: Clippy (1.56.0)
timeout-minutes: 30
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.56.0
components: clippy
override: true
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
name: Clippy (1.51.0)
name: Clippy (1.56.0)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to Rust's notion of

## [Unreleased]

## [0.12.0] - 2022-05-04
### Changed
- MSRV bumped to `1.56.0`
- Bumped dependencies to `ff 0.12`, `group 0.12`, `pairing 0.22`, `bitvec 1.0`, `blake2s_simd 1.0`.

## [0.11.2] - 2022-05-04
### Fixed
- Groth16 prover now correctly computes query densitites with respect to linear
Expand Down
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ homepage = "https://github.com/zkcrypto/bellman"
license = "MIT/Apache-2.0"
name = "bellman"
repository = "https://github.com/zkcrypto/bellman"
version = "0.11.2"
edition = "2018"
version = "0.12.0"
edition = "2021"

[dependencies]
bitvec = "0.22"
blake2s_simd = "0.5"
ff = "0.11"
group = "0.11"
pairing = { version = "0.21", optional = true }
bitvec = "1"
blake2s_simd = "1"
ff = "0.12"
group = "0.12"
pairing = { version = "0.22", optional = true }
rand_core = "0.6"
byteorder = "1"
subtle = "2.2.1"
Expand All @@ -30,12 +30,12 @@ num_cpus = { version = "1", optional = true }
rayon = { version = "1.5.1", optional = true }

[dev-dependencies]
bls12_381 = "0.6"
bls12_381 = "0.7"
criterion = "0.3"
hex-literal = "0.3"
rand = "0.8"
rand_xorshift = "0.3"
sha2 = "0.9"
sha2 = "0.10"

[features]
groth16 = ["pairing"]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.51.0
1.56.0
38 changes: 19 additions & 19 deletions src/gadgets/boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ pub fn field_into_allocated_bits_le<
let values = match value {
Some(ref value) => {
let field_char = F::char_le_bits();
let mut field_char = field_char.iter().by_ref().rev();
let mut field_char = field_char.iter().by_refs().rev();

let mut tmp = Vec::with_capacity(F::NUM_BITS as usize);

let mut found_one = false;
for b in value.to_le_bits().iter().by_val().rev() {
for b in value.to_le_bits().iter().by_vals().rev() {
// Skip leading bits
found_one |= field_char.next().unwrap();
if !found_one {
Expand Down Expand Up @@ -1533,15 +1533,15 @@ mod test {

assert_eq!(bits.len(), 64);

assert_eq!(bits[63].get_value().unwrap(), true);
assert_eq!(bits[63 - 1].get_value().unwrap(), true);
assert_eq!(bits[63 - 2].get_value().unwrap(), true);
assert_eq!(bits[63 - 3].get_value().unwrap(), false);
assert_eq!(bits[63 - 4].get_value().unwrap(), true);
assert_eq!(bits[63 - 5].get_value().unwrap(), true);
assert_eq!(bits[63 - 20].get_value().unwrap(), true);
assert_eq!(bits[63 - 21].get_value().unwrap(), false);
assert_eq!(bits[63 - 22].get_value().unwrap(), false);
assert!(bits[63].get_value().unwrap());
assert!(bits[63 - 1].get_value().unwrap());
assert!(bits[63 - 2].get_value().unwrap());
assert!(!bits[63 - 3].get_value().unwrap());
assert!(bits[63 - 4].get_value().unwrap());
assert!(bits[63 - 5].get_value().unwrap());
assert!(bits[63 - 20].get_value().unwrap());
assert!(!bits[63 - 21].get_value().unwrap());
assert!(!bits[63 - 22].get_value().unwrap());
}

#[test]
Expand All @@ -1559,14 +1559,14 @@ mod test {

assert_eq!(bits.len(), 255);

assert_eq!(bits[254].value.unwrap(), false);
assert_eq!(bits[254 - 1].value.unwrap(), false);
assert_eq!(bits[254 - 2].value.unwrap(), true);
assert_eq!(bits[254 - 3].value.unwrap(), false);
assert_eq!(bits[254 - 4].value.unwrap(), true);
assert_eq!(bits[254 - 5].value.unwrap(), false);
assert_eq!(bits[254 - 20].value.unwrap(), true);
assert_eq!(bits[254 - 23].value.unwrap(), true);
assert!(!bits[254].value.unwrap());
assert!(!bits[254 - 1].value.unwrap());
assert!(bits[254 - 2].value.unwrap());
assert!(!bits[254 - 3].value.unwrap());
assert!(bits[254 - 4].value.unwrap());
assert!(!bits[254 - 5].value.unwrap());
assert!(bits[254 - 20].value.unwrap());
assert!(bits[254 - 23].value.unwrap());
}

#[test]
Expand Down
6 changes: 3 additions & 3 deletions src/gadgets/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl<Scalar: PrimeField> AllocatedNum<Scalar> {
let b = (-Scalar::one()).to_le_bits();

// Get the bits of a in big-endian order
let mut a = a.as_ref().map(|e| e.iter().by_val().rev());
let mut a = a.as_ref().map(|e| e.iter().by_vals().rev());

let mut result = vec![];

Expand All @@ -117,7 +117,7 @@ impl<Scalar: PrimeField> AllocatedNum<Scalar> {

let mut found_one = false;
let mut i = 0;
for b in b.iter().by_val().rev() {
for b in b.iter().by_vals().rev() {
let a_bit = a.as_mut().map(|e| e.next().unwrap());

// Skip over unset bits at the beginning
Expand Down Expand Up @@ -568,7 +568,7 @@ mod test {
for (b, a) in r
.to_le_bits()
.iter()
.by_val()
.by_vals()
.rev()
.skip(1)
.zip(bits.iter().rev())
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
//! be separate crates that pull in the dependencies they require.
// Catch documentation errors caused by code changes.
#![deny(broken_intra_doc_links)]
#![deny(rustdoc::broken_intra_doc_links)]

pub mod domain;
pub mod gadgets;
Expand Down
4 changes: 2 additions & 2 deletions src/multiexp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl<'a> QueryDensity for &'a DensityTracker {
type Iter = Box<dyn 'a + Iterator<Item = bool>>;

fn iter(self) -> Self::Iter {
Box::new(self.bv.iter().by_val())
Box::new(self.bv.iter().by_vals())
}

fn get_query_size(self) -> Option<usize> {
Expand Down Expand Up @@ -207,7 +207,7 @@ where
} else {
let exp = exp
.into_iter()
.by_val()
.by_vals()
.skip(skip as usize)
.take(c as usize)
.enumerate()
Expand Down

0 comments on commit 97199bb

Please sign in to comment.