From 2e60ce7f5bc5b040031ea5efdf5c1aa54bb62ae4 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Thu, 5 Sep 2024 10:16:19 +0400 Subject: [PATCH 1/3] Rename crates and set meta fields in Cargo.toml --- Cargo.toml | 17 ++++++++--- RELEASE.md | 37 +++++++++++++++++++++++ crates/bellman/Cargo.toml | 17 ++++++----- crates/boojum/Cargo.toml | 14 ++++----- crates/codegen-bin/Cargo.toml | 7 ++++- crates/codegen/Cargo.toml | 7 ++++- crates/cs_derive/Cargo.toml | 16 +++++----- crates/ff/Cargo.toml | 23 +++++++------- crates/ff/src/lib.rs | 4 +-- crates/ff_derive/Cargo.toml | 17 +++++------ crates/franklin-crypto/Cargo.toml | 11 ++++--- crates/pairing/Cargo.toml | 21 +++++-------- crates/pairing/benches/bls12_381/ec.rs | 8 ++--- crates/pairing/benches/bls12_381/fq.rs | 2 +- crates/pairing/benches/bls12_381/fq12.rs | 2 +- crates/pairing/benches/bls12_381/fq2.rs | 2 +- crates/pairing/benches/bls12_381/fr.rs | 2 +- crates/pairing/benches/bls12_381/mod.rs | 4 +-- crates/pairing/benches/bn256/ec.rs | 8 ++--- crates/pairing/benches/bn256/fq.rs | 2 +- crates/pairing/benches/bn256/fq12.rs | 2 +- crates/pairing/benches/bn256/fq2.rs | 2 +- crates/pairing/benches/bn256/fr.rs | 2 +- crates/pairing/benches/bn256/mod.rs | 4 +-- crates/pairing/benches/pairing_benches.rs | 2 +- crates/rescue-poseidon/Cargo.toml | 15 ++++----- crates/snark-wrapper/Cargo.toml | 16 +++++----- 27 files changed, 157 insertions(+), 107 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 86f03f2..b6fd73e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,18 +9,25 @@ resolver = "2" # Important: 0.29.0 is not published right now. If you want to publish, # just remove this comment and go ahead. version = "0.29.0" +edition = "2021" +authors = ["The Matter Labs Team "] +homepage = "https://zksync.io/" +repository = "https://github.com/matter-labs/zksync-crypto/" +license = "MIT OR Apache-2.0" +keywords = ["blockchain", "zksync"] +categories = ["cryptography"] [workspace.dependencies] # Local dependencies -bellman = { version = "=0.29.0", path = "crates/bellman", package = "bellman_ce" } +bellman = { version = "=0.29.0", path = "crates/bellman", package = "zksync_bellman" } boojum = { version = "=0.29.0", path = "crates/boojum" } zksync_solidity_vk_codegen = { version = "=0.29.0", path = "crates/codegen" } codegen-bin = { version = "=0.29.0", path = "crates/codegen-bin" } -cs_derive = { version = "=0.29.0", path = "crates/cs_derive" } -ff = { version = "=0.29.0", path = "crates/ff", package = "ff_ce" } -ff_derive_ce = { version = "=0.29.0", path = "crates/ff_derive" } +cs_derive = { version = "=0.29.0", path = "crates/cs_derive", package = "zksync_cs_derive" } +ff = { version = "=0.29.0", path = "crates/ff", package = "zksync_ff" } +ff_derive = { version = "=0.29.0", path = "crates/ff_derive", package = "zksync_ff_derive" } franklin-crypto = { version = "=0.29.0", path = "crates/franklin-crypto" } -pairing = { version = "=0.29.0", path = "crates/pairing", package = "pairing_ce" } +pairing = { version = "=0.29.0", path = "crates/pairing", package = "zksync_pairing" } rescue_poseidon = { version = "=0.29.0", path = "crates/rescue-poseidon" } snark_wrapper = { version = "=0.29.0", path = "crates/snark-wrapper" } diff --git a/RELEASE.md b/RELEASE.md index 03a36d4..1de5973 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,5 +1,42 @@ # Release process +## Automatic releases + +We use [release-please](https://github.com/googleapis/release-please) to manage releases, as well +as a custom automation to publish releases on [crates.io](https://crates.io/). + +Any pull request name must follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) +specification, and then, based on the PR titles, a release pull request will be created, which +will take care of changelog generation. + +Important: only `fix` and `feat` labels will trigger a release PR creation. So, if a `chore` or `ci` +PR will be merged right after release, the PR will not be created (they _will_ be included into a release, +if a release PR exists, but they won't trigger PR creation or appear in the changelog). If you want to make +sure that the change will trigger a release PR, mark the PR as `fix` or `feat`. + +By default, a patch version will be bumped. If you want to bump a minor version, mark the PR as breaking with +an exclamation point, e.g. `feat!` or `fix!`. + +It is recommended that each PR has a component mentioned, e.g. `feat(component): Change added`. + +Once release PR is merged, it will be published to `crates.io`, and a notification will be sent to Slack. + +## Manual releases + +> [!WARNING] +> Manual releases are discouraged, and should only be used as a last resort measure. +> Discuss the manual release with the team beforehand and prepare a plan. +> It is very likely that manual release will interfere with `release-please` configuration, +> which will have to be fixed manually as well. +> +> Additionally, if the release was created, but wasn't published, you will only need a subset +> of the actions listed below (e.g. if the it failed due to a transient error, you just need to +> publish code without creating any tags; but if the release can't be published, it's better to +> remove it, fix the issue, and try releasing again via automation). + +> [!CAUTION] +> Never release code that does not correspond to any tag. + If you want to release the packages on crates.io, follow this process: 1. Install `cargo workspaces`: `cargo install cargo-workspaces` diff --git a/crates/bellman/Cargo.toml b/crates/bellman/Cargo.toml index 072178c..bd657de 100644 --- a/crates/bellman/Cargo.toml +++ b/crates/bellman/Cargo.toml @@ -1,13 +1,14 @@ [package] -authors = ["Sean Bowe ", "Alex Vlasov ", "Alex Gluchowski "] -homepage = "https://zksync.io/" -repository = "https://github.com/matter-labs/era-boojum" -license = "MIT OR Apache-2.0" -keywords = ["blockchain", "zksync"] -categories = ["cryptography"] +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true description = "Boojum cryptographic library" exclude = [ "profiling-target" ] diff --git a/crates/codegen-bin/Cargo.toml b/crates/codegen-bin/Cargo.toml index 82bc52c..8c81c52 100644 --- a/crates/codegen-bin/Cargo.toml +++ b/crates/codegen-bin/Cargo.toml @@ -2,7 +2,12 @@ name = "codegen-bin" version.workspace = true edition = "2018" -license = "MIT OR Apache-2.0" +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/codegen/Cargo.toml b/crates/codegen/Cargo.toml index b3ba5a1..50003b2 100644 --- a/crates/codegen/Cargo.toml +++ b/crates/codegen/Cargo.toml @@ -2,7 +2,12 @@ name = "zksync_solidity_vk_codegen" version.workspace = true edition = "2018" -license = "MIT OR Apache-2.0" +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true description = "ZKsync solidity codegen for vks" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/cs_derive/Cargo.toml b/crates/cs_derive/Cargo.toml index 5c574d4..ce9e312 100644 --- a/crates/cs_derive/Cargo.toml +++ b/crates/cs_derive/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "cs_derive" +name = "zksync_cs_derive" version.workspace = true -edition = "2021" -authors = ["The Matter Labs Team "] -homepage = "https://zksync.io/" -repository = "https://github.com/matter-labs/era-boojum" -license = "MIT OR Apache-2.0" -keywords = ["blockchain", "zksync"] -categories = ["cryptography"] +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true description = "Derive macro for boojum crate" [dependencies] diff --git a/crates/ff/Cargo.toml b/crates/ff/Cargo.toml index 7a87de0..e914a27 100644 --- a/crates/ff/Cargo.toml +++ b/crates/ff/Cargo.toml @@ -1,22 +1,21 @@ [package] -name = "ff_ce" +name = "zksync_ff" version.workspace = true -authors = ["Sean Bowe ", - "Alex Gluchowski ", - "Alex Vlasov "] -description = "Library for building and interfacing with finite fields" -documentation = "https://docs.rs/ff/" -homepage = "https://github.com/matter-labs/ff" -license = "MIT/Apache-2.0" -repository = "https://github.com/matter-labs/ff" edition = "2018" +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true +description = "Library for building and interfacing with finite fields, based on ff" exclude = [ "tester", "asm_tester" ] [dependencies] -ff_derive_ce = { workspace = true, optional = true } +ff_derive = { workspace = true, optional = true } byteorder = "1" rand = "0.4" @@ -25,5 +24,5 @@ serde = "1" [features] default = [] -derive = ["ff_derive_ce"] -asm_derive = ["derive", "ff_derive_ce/asm"] +derive = ["ff_derive"] +asm_derive = ["derive", "ff_derive/asm"] diff --git a/crates/ff/src/lib.rs b/crates/ff/src/lib.rs index aa0b8ba..579f82a 100644 --- a/crates/ff/src/lib.rs +++ b/crates/ff/src/lib.rs @@ -10,10 +10,10 @@ pub mod hex { #[cfg(feature = "derive")] #[macro_use] -extern crate ff_derive_ce; +extern crate ff_derive; #[cfg(feature = "derive")] -pub use ff_derive_ce::*; +pub use ff_derive::*; use std::error::Error; use std::fmt; diff --git a/crates/ff_derive/Cargo.toml b/crates/ff_derive/Cargo.toml index dd1b39c..dffa1ba 100644 --- a/crates/ff_derive/Cargo.toml +++ b/crates/ff_derive/Cargo.toml @@ -1,15 +1,14 @@ [package] -name = "ff_derive_ce" +name = "zksync_ff_derive" version.workspace = true -authors = ["Sean Bowe ", - "Alex Gluchowski ", - "Alex Vlasov "] -description = "Procedural macro library used to build custom prime field implementations" -documentation = "https://docs.rs/ff/" -homepage = "https://github.com/matter-labs/ff" -license = "MIT/Apache-2.0" -repository = "https://github.com/matter-labs/ff" edition = "2018" +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true +description = "Procedural macro library for zksync_ff, based on ff_derive" [lib] proc-macro = true diff --git a/crates/franklin-crypto/Cargo.toml b/crates/franklin-crypto/Cargo.toml index b69e012..917d941 100644 --- a/crates/franklin-crypto/Cargo.toml +++ b/crates/franklin-crypto/Cargo.toml @@ -1,11 +1,14 @@ [package] -authors = ["Sean Bowe ", "Alex Vlasov ", "Alex Gluchowski "] -description = "Cryptographic library for SNARK gadgets" -homepage = "https://github.com/matter-labs/franklin-crypto" -license = "MIT/Apache-2.0" name = "franklin-crypto" version.workspace = true edition = "2015" +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true +description = "Cryptographic library for SNARK gadgets, based on sapling-crypto" [lib] crate-type = ["lib", "staticlib"] diff --git a/crates/pairing/Cargo.toml b/crates/pairing/Cargo.toml index fd342f6..ba22f71 100644 --- a/crates/pairing/Cargo.toml +++ b/crates/pairing/Cargo.toml @@ -1,19 +1,14 @@ [package] -name = "pairing_ce" +name = "zksync_pairing" version.workspace = true -authors = [ - "Sean Bowe ", - "Jack Grigg ", - "Alex Vlasov ", - "Alex Gluchowski " -] -license = "MIT/Apache-2.0" - -description = "Pairing-friendly elliptic curve library" -documentation = "https://docs.rs/pairing_ce/" -homepage = "https://github.com/matter-labs/pairing" -repository = "https://github.com/matter-labs/pairing" edition = "2018" +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true +description = "Pairing-friendly elliptic curve library, based on pairing crate" [dependencies] ff = { workspace = true, features = ["derive"] } diff --git a/crates/pairing/benches/bls12_381/ec.rs b/crates/pairing/benches/bls12_381/ec.rs index a8b3fbe..202dcb3 100644 --- a/crates/pairing/benches/bls12_381/ec.rs +++ b/crates/pairing/benches/bls12_381/ec.rs @@ -1,8 +1,8 @@ mod g1 { use rand::{Rand, SeedableRng, XorShiftRng}; - use pairing_ce::bls12_381::*; - use pairing_ce::CurveProjective; + use zksync_pairing::bls12_381::*; + use zksync_pairing::CurveProjective; #[bench] fn bench_g1_mul_assign(b: &mut ::test::Bencher) { @@ -59,8 +59,8 @@ mod g1 { mod g2 { use rand::{Rand, SeedableRng, XorShiftRng}; - use pairing_ce::bls12_381::*; - use pairing_ce::CurveProjective; + use zksync_pairing::bls12_381::*; + use zksync_pairing::CurveProjective; #[bench] fn bench_g2_mul_assign(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bls12_381/fq.rs b/crates/pairing/benches/bls12_381/fq.rs index 26c5dd9..fcbd552 100644 --- a/crates/pairing/benches/bls12_381/fq.rs +++ b/crates/pairing/benches/bls12_381/fq.rs @@ -1,7 +1,7 @@ use rand::{Rand, SeedableRng, XorShiftRng}; use ff::{Field, PrimeField, PrimeFieldRepr, SqrtField}; -use pairing_ce::bls12_381::*; +use zksync_pairing::bls12_381::*; #[bench] fn bench_fq_repr_add_nocarry(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bls12_381/fq12.rs b/crates/pairing/benches/bls12_381/fq12.rs index 77099d8..de11995 100644 --- a/crates/pairing/benches/bls12_381/fq12.rs +++ b/crates/pairing/benches/bls12_381/fq12.rs @@ -1,7 +1,7 @@ use rand::{Rand, SeedableRng, XorShiftRng}; use ff::Field; -use pairing_ce::bls12_381::*; +use zksync_pairing::bls12_381::*; #[bench] fn bench_fq12_add_assign(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bls12_381/fq2.rs b/crates/pairing/benches/bls12_381/fq2.rs index 2f75fd0..d0901b6 100644 --- a/crates/pairing/benches/bls12_381/fq2.rs +++ b/crates/pairing/benches/bls12_381/fq2.rs @@ -1,7 +1,7 @@ use rand::{Rand, SeedableRng, XorShiftRng}; use ff::{Field, SqrtField}; -use pairing_ce::bls12_381::*; +use zksync_pairing::bls12_381::*; #[bench] fn bench_fq2_add_assign(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bls12_381/fr.rs b/crates/pairing/benches/bls12_381/fr.rs index 361da06..d01a7cb 100644 --- a/crates/pairing/benches/bls12_381/fr.rs +++ b/crates/pairing/benches/bls12_381/fr.rs @@ -1,7 +1,7 @@ use rand::{Rand, SeedableRng, XorShiftRng}; use ff::{Field, PrimeField, PrimeFieldRepr, SqrtField}; -use pairing_ce::bls12_381::*; +use zksync_pairing::bls12_381::*; #[bench] fn bench_fr_repr_add_nocarry(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bls12_381/mod.rs b/crates/pairing/benches/bls12_381/mod.rs index efec1c9..f54b998 100644 --- a/crates/pairing/benches/bls12_381/mod.rs +++ b/crates/pairing/benches/bls12_381/mod.rs @@ -6,8 +6,8 @@ mod fr; use rand::{Rand, SeedableRng, XorShiftRng}; -use pairing_ce::bls12_381::*; -use pairing_ce::{CurveAffine, Engine}; +use zksync_pairing::bls12_381::*; +use zksync_pairing::{CurveAffine, Engine}; #[bench] fn bench_pairing_g1_preparation(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bn256/ec.rs b/crates/pairing/benches/bn256/ec.rs index a45435f..4ccd32b 100644 --- a/crates/pairing/benches/bn256/ec.rs +++ b/crates/pairing/benches/bn256/ec.rs @@ -1,8 +1,8 @@ mod g1 { use rand::{Rand, SeedableRng, XorShiftRng}; - use pairing_ce::bn256::*; - use pairing_ce::CurveProjective; + use zksync_pairing::bn256::*; + use zksync_pairing::CurveProjective; #[bench] fn bench_g1_mul_assign(b: &mut ::test::Bencher) { @@ -59,8 +59,8 @@ mod g1 { mod g2 { use rand::{Rand, SeedableRng, XorShiftRng}; - use pairing_ce::bls12_381::*; - use pairing_ce::CurveProjective; + use zksync_pairing::bls12_381::*; + use zksync_pairing::CurveProjective; #[bench] fn bench_g2_mul_assign(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bn256/fq.rs b/crates/pairing/benches/bn256/fq.rs index 2b63ac5..20a89c9 100644 --- a/crates/pairing/benches/bn256/fq.rs +++ b/crates/pairing/benches/bn256/fq.rs @@ -1,7 +1,7 @@ use rand::{Rand, SeedableRng, XorShiftRng}; use ff::{Field, PrimeField, PrimeFieldRepr, SqrtField}; -use pairing_ce::bn256::*; +use zksync_pairing::bn256::*; #[bench] fn bench_fq_repr_add_nocarry(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bn256/fq12.rs b/crates/pairing/benches/bn256/fq12.rs index a3898d9..9fb1538 100644 --- a/crates/pairing/benches/bn256/fq12.rs +++ b/crates/pairing/benches/bn256/fq12.rs @@ -1,7 +1,7 @@ use rand::{Rand, SeedableRng, XorShiftRng}; use ff::Field; -use pairing_ce::bn256::*; +use zksync_pairing::bn256::*; #[bench] fn bench_fq12_add_assign(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bn256/fq2.rs b/crates/pairing/benches/bn256/fq2.rs index c11773b..2dddcb7 100644 --- a/crates/pairing/benches/bn256/fq2.rs +++ b/crates/pairing/benches/bn256/fq2.rs @@ -1,7 +1,7 @@ use rand::{Rand, SeedableRng, XorShiftRng}; use ff::{Field, SqrtField}; -use pairing_ce::bn256::*; +use zksync_pairing::bn256::*; #[bench] fn bench_fq2_add_assign(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bn256/fr.rs b/crates/pairing/benches/bn256/fr.rs index 65f58fb..e45624c 100644 --- a/crates/pairing/benches/bn256/fr.rs +++ b/crates/pairing/benches/bn256/fr.rs @@ -1,7 +1,7 @@ use rand::{Rand, SeedableRng, XorShiftRng}; use ff::{Field, PrimeField, PrimeFieldRepr, SqrtField}; -use pairing_ce::bn256::*; +use zksync_pairing::bn256::*; #[bench] fn bench_fr_repr_add_nocarry(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/bn256/mod.rs b/crates/pairing/benches/bn256/mod.rs index 2a71fd0..b23ecf5 100644 --- a/crates/pairing/benches/bn256/mod.rs +++ b/crates/pairing/benches/bn256/mod.rs @@ -6,8 +6,8 @@ mod fr; use rand::{Rand, SeedableRng, XorShiftRng}; -use pairing_ce::bn256::*; -use pairing_ce::{CurveAffine, Engine}; +use zksync_pairing::bn256::*; +use zksync_pairing::{CurveAffine, Engine}; #[bench] fn bench_pairing_g1_preparation(b: &mut ::test::Bencher) { diff --git a/crates/pairing/benches/pairing_benches.rs b/crates/pairing/benches/pairing_benches.rs index 757865a..155c183 100644 --- a/crates/pairing/benches/pairing_benches.rs +++ b/crates/pairing/benches/pairing_benches.rs @@ -1,9 +1,9 @@ #![feature(test)] extern crate ff; -extern crate pairing_ce; extern crate rand; extern crate test; +extern crate zksync_pairing; mod bls12_381; mod bn256; diff --git a/crates/rescue-poseidon/Cargo.toml b/crates/rescue-poseidon/Cargo.toml index 012e3db..d43c100 100644 --- a/crates/rescue-poseidon/Cargo.toml +++ b/crates/rescue-poseidon/Cargo.toml @@ -1,13 +1,14 @@ [package] name = "rescue_poseidon" -description = "Sponge construction based Algebraic Hash Functions" -keywords = ["poseidon", "rescue", "sponge"] version.workspace = true -authors = ["Sait Imamoglu "] -edition = "2021" -license = "MIT OR Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords = ["poseidon", "rescue", "sponge"] +categories.workspace = true +description = "Sponge construction based Algebraic Hash Functions" [dependencies] franklin-crypto = { workspace = true, features = ["plonk"] } diff --git a/crates/snark-wrapper/Cargo.toml b/crates/snark-wrapper/Cargo.toml index e3ea331..524e34c 100644 --- a/crates/snark-wrapper/Cargo.toml +++ b/crates/snark-wrapper/Cargo.toml @@ -1,17 +1,15 @@ [package] name = "snark_wrapper" version.workspace = true -edition = "2021" -authors = ["The Matter Labs Team "] -homepage = "https://zksync.io/" -repository = "https://github.com/matter-labs/zksync-era" -license = "MIT OR Apache-2.0" -keywords = ["blockchain", "zksync"] -categories = ["cryptography"] +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true description = "ZKsync snark wrapper" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] rescue_poseidon.workspace = true From e2ec96c9ba37ba843cc68d4551d12abbf778ad1a Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Thu, 5 Sep 2024 10:18:47 +0400 Subject: [PATCH 2/3] Acknowledge sapling-crypto --- ACKNOWLEDGEMENTS.md | 8 ++++++++ Cargo.toml | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 4a8b44f..6fb4752 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -27,6 +27,14 @@ under [MIT][pairing-mit] and [Apache 2.0][pairing-apache] licenses. [pairing-mit]: https://github.com/zkcrypto/pairing/blob/17973bdd64a44a4829dd6b150f2d54246709b1da/LICENSE-MIT [pairing-apache]: https://github.com/zkcrypto/pairing/blob/17973bdd64a44a4829dd6b150f2d54246709b1da/LICENSE-APACHE +## sapling-crypto + +[sapling: Zcash "Sapling" cryptography](https://github.com/zcash/sapling-crypto) dual-licensed under +[MIT][sapling-mit] and [Apache 2.0][sapling-apache] licenses. + +[sapling-mit]: https://github.com/zcash/sapling-crypto/blob/984a08897644af67754a12ec13a7d7ccad5fa0d3/LICENSE-MIT +[sapling-apache]: https://github.com/zcash/sapling-crypto/blob/984a08897644af67754a12ec13a7d7ccad5fa0d3/LICENSE-APACHE + ## plonky2 [plonky2: Plonky2, a SNARK implementation based on techniques from PLONK and FRI](https://github.com/mir-protocol/plonky2) diff --git a/Cargo.toml b/Cargo.toml index b6fd73e..9849b99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,8 +6,6 @@ resolver = "2" [workspace.package] # All the packages in the workspace should have the same version -# Important: 0.29.0 is not published right now. If you want to publish, -# just remove this comment and go ahead. version = "0.29.0" edition = "2021" authors = ["The Matter Labs Team "] From e776a2a218bef311120bedbb6290b8f4986a8137 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Thu, 5 Sep 2024 10:19:25 +0400 Subject: [PATCH 3/3] Fix paths in bellman tests --- crates/bellman/tests/mimc.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/bellman/tests/mimc.rs b/crates/bellman/tests/mimc.rs index 955e2db..54d5831 100644 --- a/crates/bellman/tests/mimc.rs +++ b/crates/bellman/tests/mimc.rs @@ -5,20 +5,20 @@ use rand::{thread_rng, Rng}; use std::time::{Duration, Instant}; // Bring in some tools for using pairing-friendly curves -use bellman_ce::pairing::Engine; +use zksync_bellman::pairing::Engine; -use bellman_ce::pairing::ff::Field; +use zksync_bellman::pairing::ff::Field; // We're going to use the BLS12-381 pairing-friendly elliptic curve. -use bellman_ce::pairing::bls12_381::Bls12; +use zksync_bellman::pairing::bls12_381::Bls12; -use bellman_ce::pairing::bn256::Bn256; +use zksync_bellman::pairing::bn256::Bn256; // We'll use these interfaces to construct our circuit. -use bellman_ce::{Circuit, ConstraintSystem, SynthesisError}; +use zksync_bellman::{Circuit, ConstraintSystem, SynthesisError}; // We're going to use the Groth16 proving system. -use bellman_ce::groth16::{create_random_proof, generate_random_parameters, prepare_verifying_key, verify_proof, Proof}; +use zksync_bellman::groth16::{create_random_proof, generate_random_parameters, prepare_verifying_key, verify_proof, Proof}; // const MIMC_ROUNDS: usize = 322; @@ -27,8 +27,8 @@ const MIMC_ROUNDS: usize = 1000000; #[cfg(feature = "marlin")] #[test] fn test_bench_marlin_prover() { - use bellman_ce::marlin::prover::test_over_engine_and_circuit_with_proving_key; - use bellman_ce::pairing::bn256::Bn256; + use zksync_bellman::marlin::prover::test_over_engine_and_circuit_with_proving_key; + use zksync_bellman::pairing::bn256::Bn256; { // This may not be cryptographically safe, use // `OsRng` (for example) in production software. @@ -55,8 +55,8 @@ fn test_bench_marlin_prover() { #[cfg(feature = "marlin")] #[test] fn test_create_marlin_proving_key() { - use bellman_ce::marlin::prover::create_test_keys; - use bellman_ce::pairing::bn256::Bn256; + use zksync_bellman::marlin::prover::create_test_keys; + use zksync_bellman::pairing::bn256::Bn256; { // This may not be cryptographically safe, use // `OsRng` (for example) in production software. @@ -349,7 +349,7 @@ fn test_mimc_bn256() { #[test] #[ignore] // TODO(ignored-test): Timeout. fn test_mimc_transpilation_into_plonk() { - use bellman_ce::plonk::adaptor::alternative::Transpiler; + use zksync_bellman::plonk::adaptor::alternative::Transpiler; // This may not be cryptographically safe, use // `OsRng` (for example) in production software. let rng = &mut thread_rng();