From 3d5c5325bb4f7f669024e33c4e6666834662a153 Mon Sep 17 00:00:00 2001 From: Weikeng Chen Date: Sun, 6 Jun 2021 19:25:06 -0700 Subject: [PATCH] Release v0.3.0 (#49) * Release v0.3.0 * update the CHANGELOG * add the PR template * update no_std check in CI use `aarch64-unknown-none` env instead * separate the benches Co-authored-by: Tom Shen --- .github/PULL_REQUEST_TEMPLATE.md | 26 ++++++++++++ .github/workflows/ci.yml | 26 +++++++----- .gitignore | 1 + CHANGELOG.md | 25 ++++++++--- Cargo.toml | 28 +++---------- src/ml_sumcheck/test.rs | 2 +- sumcheck-benches/Cargo.toml | 41 +++++++++++++++++++ .../benches}/gkr_round_sumcheck_bench.rs | 0 .../benches}/ml_sumcheck_bench.rs | 0 9 files changed, 111 insertions(+), 38 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 sumcheck-benches/Cargo.toml rename {benches => sumcheck-benches/benches}/gkr_round_sumcheck_bench.rs (100%) rename {benches => sumcheck-benches/benches}/ml_sumcheck_bench.rs (100%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..fe00a14 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,26 @@ + + +## Description + + + +closes: #XXXX + +--- + +Before we can merge this PR, please make sure that all the following items have been +checked off. If any of the checklist items are not applicable, please leave them but +write a little note why. + +- [ ] Targeted PR against correct branch (master) +- [ ] Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work. +- [ ] Wrote unit tests +- [ ] Updated relevant documentation in the code +- [ ] Added a relevant changelog entry to the `Pending` section in `CHANGELOG.md` +- [ ] Re-reviewed `Files changed` in the Github PR explorer \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06c397d..f19bd7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,16 +90,22 @@ jobs: target: thumbv6m-none-eabi override: true - - name: Build - uses: actions-rs/cargo@v1 + - name: Install Rust ARM64 (${{ matrix.rust }}) + uses: actions-rs/toolchain@v1 with: - use-cross: true - command: build - args: --no-default-features --target thumbv6m-none-eabi + toolchain: stable + target: aarch64-unknown-none + override: true - - name: Check - uses: actions-rs/cargo@v1 + - uses: actions/cache@v2 with: - use-cross: true - command: check - args: --examples --no-default-features --target thumbv6m-none-eabi + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: ark-linear-sumcheck + run: | + cargo build --no-default-features --target aarch64-unknown-none + cargo check --examples --no-default-features --target aarch64-unknown-none diff --git a/.gitignore b/.gitignore index 2de3917..b2bd156 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/sumcheck-benches/target /target Cargo.lock /.idea diff --git a/CHANGELOG.md b/CHANGELOG.md index b1fb3af..e50fd30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# CHANGELOG + +## Pending + +### Breaking changes + +### Features + +### Improvements + +### Bug fixes + +## v0.3.0 + +- Change dependency to version `0.3.0` of other arkworks-rs crates. + ## v0.2.0 The main feature of this release are: @@ -6,13 +22,12 @@ The main feature of this release are: ### Breaking Changes -- #46 Update to hashbrown version 0.11.2 -- #41 `ListOfProductsOfPolynomial::add_product` takes iterators of `Rc>` instead of `DenseMultilinearExtension`. -- #41 `ListOfProductsOfPolynomial` has been moved to `ml_sumcheck::data_structures`, but no actions required. +- [\#41](https://github.com/arkworks-rs/sumcheck/pull/41) `ListOfProductsOfPolynomial::add_product` takes iterators of `Rc>` instead of `DenseMultilinearExtension`. +- [\#41](https://github.com/arkworks-rs/sumcheck/pull/41) `ListOfProductsOfPolynomial` has been moved to `ml_sumcheck::data_structures`, but no actions required. +- [\#46](https://github.com/arkworks-rs/sumcheck/pull/46) Update to hashbrown version 0.11.2. ### Features - ### Improvements -- #41 `MLSumcheck` Prover uses memory linear to number of unique multilinear extensions instead of total number of multiplicands. +- [\#41](https://github.com/arkworks-rs/sumcheck/pull/41) `MLSumcheck` Prover uses memory linear to number of unique multilinear extensions instead of total number of multiplicands. diff --git a/Cargo.toml b/Cargo.toml index 885a64c..1bc2f2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-linear-sumcheck" -version = "0.2.0" +version = "0.3.0" authors = [ "Tom Shen ", "arkworks contributors" @@ -14,35 +14,19 @@ include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] license = "MIT/Apache-2.0" edition = "2018" - [dependencies] -ark-ff = { version = "^0.2.0", default-features = false } -ark-serialize = { version = "^0.2.0", default-features = false, features = ["derive"] } +ark-ff = { version = "^0.3.0", default-features = false } +ark-serialize = { version = "^0.3.0", default-features = false, features = ["derive"] } +ark-std = { version = "^0.3.0", default-features = false } +ark-poly = { version = "^0.3.0", default-features = false } blake2 = { version = "0.9", default-features = false } -ark-std = { version = "^0.2.0", default-features = false } hashbrown = { version = "0.11.2" } -ark-poly = { version = "^0.2.0", default-features = false} rayon = { version = "1", optional = true } -criterion = {version = "0.3.1", optional = true} [dev-dependencies] -ark-test-curves = { version = "^0.2.0", default-features = false, features = ["bls12_381_scalar_field", "bls12_381_curve"] } +ark-test-curves = { version = "^0.3.0", default-features = false, features = ["bls12_381_scalar_field", "bls12_381_curve"] } [features] default = ["std"] std = ["ark-ff/std", "ark-serialize/std", "blake2/std", "ark-std/std", "ark-poly/std"] parallel = ["std", "ark-ff/parallel", "ark-poly/parallel", "ark-std/parallel", "rayon"] -bench = ["criterion"] - -[[bench]] -name = "ml_sumcheck" -path = "benches/ml_sumcheck_bench.rs" -harness = false - -[[bench]] -name = "gkr_round_sumcheck" -path = "benches/gkr_round_sumcheck_bench.rs" -harness = false - -[lib] -bench = false diff --git a/src/ml_sumcheck/test.rs b/src/ml_sumcheck/test.rs index a8f0a8a..1f71a3d 100644 --- a/src/ml_sumcheck/test.rs +++ b/src/ml_sumcheck/test.rs @@ -49,7 +49,7 @@ fn random_list_of_products( let mut sum = F::zero(); let mut poly = ListOfProductsOfPolynomials::new(nv); for _ in 0..num_products { - let num_multiplicands = rng.gen_range(num_multiplicands_range.0, num_multiplicands_range.1); + let num_multiplicands = rng.gen_range(num_multiplicands_range.0..num_multiplicands_range.1); let (product, product_sum) = random_product(nv, num_multiplicands, rng); let coefficient = F::rand(rng); poly.add_product(product.into_iter(), coefficient); diff --git a/sumcheck-benches/Cargo.toml b/sumcheck-benches/Cargo.toml new file mode 100644 index 0000000..ae6cc9b --- /dev/null +++ b/sumcheck-benches/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = "sumcheck-benches" +version = "0.3.0" +authors = [ + "Tom Shen ", + "arkworks contributors" +] +description = "Benchmarks for ark-linear-sumcheck" +homepage = "https://arkworks.rs" +repository = "https://github.com/arkworks-rs/sumcheck/" +keywords = ["cryptography", "finite-fields", "polynomials", "sumcheck"] +categories = ["cryptography"] +include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] +license = "MIT/Apache-2.0" +publish = false +edition = "2018" + +[dependencies] +ark-ff = { version = "^0.3.0", default-features = false } +ark-std = { version = "^0.3.0", default-features = false } +ark-poly = { version = "^0.3.0", default-features = false } +ark-test-curves = { version = "^0.3.0", default-features = false, features = ["bls12_381_scalar_field", "bls12_381_curve"] } + +criterion = { version = "0.3.1" } +ark-linear-sumcheck = { path = "../" } +rayon = { version = "1", optional = true } + +[features] +default = [ "std" ] +std = ["ark-ff/std", "ark-std/std", "ark-poly/std"] +parallel = ["std", "ark-ff/parallel", "ark-poly/parallel", "ark-std/parallel", "rayon"] + +[[bench]] +name = "ml_sumcheck" +path = "benches/ml_sumcheck_bench.rs" +harness = false + +[[bench]] +name = "gkr_round_sumcheck" +path = "benches/gkr_round_sumcheck_bench.rs" +harness = false \ No newline at end of file diff --git a/benches/gkr_round_sumcheck_bench.rs b/sumcheck-benches/benches/gkr_round_sumcheck_bench.rs similarity index 100% rename from benches/gkr_round_sumcheck_bench.rs rename to sumcheck-benches/benches/gkr_round_sumcheck_bench.rs diff --git a/benches/ml_sumcheck_bench.rs b/sumcheck-benches/benches/ml_sumcheck_bench.rs similarity index 100% rename from benches/ml_sumcheck_bench.rs rename to sumcheck-benches/benches/ml_sumcheck_bench.rs