diff --git a/.github/release-pr-template.ejs b/.github/release-pr-template.ejs new file mode 100644 index 000000000..749f193b5 --- /dev/null +++ b/.github/release-pr-template.ejs @@ -0,0 +1,13 @@ +This is a release PR for version **<%= version.actual %>**<% + if (version.actual != version.desired) { +%> (performing a <%= version.desired %> bump).<% + } else { +%>.<% + } +%> + +You will still need to manually publish the cargo crate: + +``` +$ make VERSION= release +``` diff --git a/.github/workflows/release_pr.yml b/.github/workflows/release_pr.yml new file mode 100644 index 000000000..eb536afad --- /dev/null +++ b/.github/workflows/release_pr.yml @@ -0,0 +1,29 @@ +name: Open a release PR +on: + workflow_dispatch: + inputs: + version: + description: Version to release + required: true + type: choice + # Currently only alpha and patch releases are supported by this workflow, due to https://github.com/rust-lang/cargo/issues/4242 + options: + - alpha + - patch + +jobs: + make-release-pr: + runs-on: ubuntu-latest + steps: + - name: Install cargo-release + uses: taiki-e/install-action@v1 + with: + tool: cargo-release + + - uses: actions/checkout@v3 + - uses: cargo-bins/release-pr@v2 + with: + pr-template-file: .github/release-pr-template.ejs + github-token: ${{ secrets.GITHUB_TOKEN }} + version: ${{ inputs.version }} + crate-release-all: true diff --git a/CHANGELOG.md b/CHANGELOG.md index bb65f2694..7904a03f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ ### Breaking changes +### Features + +### Improvements + +### Bugfixes + +## v0.4.0 + +### Breaking changes + - [\#300](https://github.com/arkworks-rs/algebra/pull/300) (`ark-ec`) Change the implementation of `Hash` trait of `GroupProjective` to use the affine coordinates. - [\#302](https://github.com/arkworks-rs/algebra/pull/302) (`ark-ff`) Rename `find_wnaf` to `find_naf`. - [\#310](https://github.com/arkworks-rs/algebra/pull/310) (`ark-ec`, `ark-ff`) Remove unnecessary internal `PhantomData`. diff --git a/Cargo.toml b/Cargo.toml index a991e234e..9497db724 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,5 @@ incremental = true debug-assertions = true debug = true -# To be removed in the new release. -[patch.crates-io] -ark-std = { git = "https://github.com/arkworks-rs/std"} +[workspace.metadata.release] +dependent-version = "fix" diff --git a/bench-templates/Cargo.toml b/bench-templates/Cargo.toml index 84e110341..a149624ea 100644 --- a/bench-templates/Cargo.toml +++ b/bench-templates/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-algebra-bench-templates" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A benchmark library for finite fields and elliptic curves" homepage = "https://arkworks.rs" @@ -16,10 +16,10 @@ edition = "2021" [dependencies] criterion = { version = "0.4.0", features = [ "html_reports" ] } -ark-std = { version = "^0.3.0", default-features = false } -ark-ec = { version = "^0.3.0", path = "../ec", default-features = false } -ark-ff = { version = "^0.3.0", path = "../ff", default-features = false } -ark-serialize = { version = "^0.3.0", path = "../serialize", default-features = false } +ark-std = { version = "0.4.0-alpha", default-features = false } +ark-ec = { version = "0.4.0-alpha", path = "../ec", default-features = false } +ark-ff = { version = "0.4.0-alpha", path = "../ff", default-features = false } +ark-serialize = { version = "0.4.0-alpha", path = "../serialize", default-features = false } paste = { version = "1.0" } [features] diff --git a/ec/Cargo.toml b/ec/Cargo.toml index 6f8b0427f..849e33a46 100644 --- a/ec/Cargo.toml +++ b/ec/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-ec" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A library for elliptic curves and pairings" homepage = "https://arkworks.rs" @@ -14,10 +14,10 @@ edition = "2021" rust-version = "1.57" [dependencies] -ark-std = { version = "^0.3.0", default-features = false } -ark-serialize = { version = "^0.3.0", path = "../serialize", default-features = false } -ark-ff = { version = "^0.3.0", path = "../ff", default-features = false } -ark-poly = { version = "^0.3.0", path = "../poly", default-features = false } +ark-std = { version = "0.4.0-alpha", default-features = false } +ark-serialize = { version = "0.4.0-alpha", path = "../serialize", default-features = false } +ark-ff = { version = "0.4.0-alpha", path = "../ff", default-features = false } +ark-poly = { version = "0.4.0-alpha", path = "../poly", default-features = false } derivative = { version = "2", features = ["use_core"] } num-traits = { version = "0.2", default-features = false } rayon = { version = "1", optional = true } @@ -26,7 +26,7 @@ hashbrown = "0.13.1" itertools = { version = "0.10", default-features = false } [dev-dependencies] -ark-test-curves = { version = "^0.3.0", path = "../test-curves", default-features = false, features = ["bls12_381_curve"] } +ark-test-curves = { version = "0.4.0-alpha", path = "../test-curves", default-features = false, features = ["bls12_381_curve"] } sha2 = { version = "0.10", default-features = false } libtest-mimic = "0.6.0" serde = "1.0.110" diff --git a/ff-asm/Cargo.toml b/ff-asm/Cargo.toml index 56b375a77..504f29fdc 100644 --- a/ff-asm/Cargo.toml +++ b/ff-asm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-ff-asm" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A library for generating x86-64 assembly for finite field multiplication" homepage = "https://arkworks.rs" diff --git a/ff-macros/Cargo.toml b/ff-macros/Cargo.toml index 1e8c82db2..240962f91 100644 --- a/ff-macros/Cargo.toml +++ b/ff-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-ff-macros" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A library for generating x86-64 assembly for finite field multiplication" homepage = "https://arkworks.rs" diff --git a/ff/Cargo.toml b/ff/Cargo.toml index 32c8af5ee..61dfae485 100644 --- a/ff/Cargo.toml +++ b/ff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-ff" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A library for finite fields" homepage = "https://arkworks.rs" @@ -14,10 +14,10 @@ edition = "2021" rust-version = "1.59" [dependencies] -ark-ff-asm = { version = "^0.3.0", path = "../ff-asm" } -ark-ff-macros = { version = "^0.3.0", path = "../ff-macros" } -ark-std = { version = "^0.3.0", default-features = false } -ark-serialize = { version = "^0.3.0", path = "../serialize", default-features = false } +ark-ff-asm = { version = "0.4.0-alpha", path = "../ff-asm" } +ark-ff-macros = { version = "0.4.0-alpha", path = "../ff-macros" } +ark-std = { version = "0.4.0-alpha", default-features = false } +ark-serialize = { version = "0.4.0-alpha", path = "../serialize", default-features = false } derivative = { version = "2", features = ["use_core"] } num-traits = { version = "0.2", default-features = false } paste = "1.0" @@ -28,7 +28,7 @@ digest = { version = "0.10", default-features = false, features = ["alloc"] } itertools = { version = "0.10", default-features = false } [dev-dependencies] -ark-test-curves = { version = "^0.3.0", path = "../test-curves", default-features = false, features = [ "bls12_381_curve", "mnt6_753", "secp256k1"] } +ark-test-curves = { version = "0.4.0-alpha", path = "../test-curves", default-features = false, features = [ "bls12_381_curve", "mnt6_753", "secp256k1"] } blake2 = { version = "0.10", default-features = false } sha3 = { version = "0.10", default-features = false } sha2 = { version = "0.10", default-features = false } diff --git a/makefile b/makefile index aa01af3f7..c84735e2b 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,16 @@ doc: RUSTDOCFLAGS="--html-in-header doc/katex-header.html" cargo doc --no-deps -.PHONY: doc \ No newline at end of file +.PHONY: doc + +# Since the master branch is protected, the current workflow is to create a PR with the version changes, +# and once the PR is merged, run the `make VERSION= release` to publish the new crates. +release: +ifndef VERSION + $(error VERSION is not set. Run with `make VERSION= release`) +endif + git pull + cargo update + git tag $(VERSION) + git push origin $(VERSION) + cargo release publish --execute --verbose --allow-branch "master" diff --git a/poly-benches/Cargo.toml b/poly-benches/Cargo.toml index 52aa9f71b..2bca3e63c 100644 --- a/poly-benches/Cargo.toml +++ b/poly-benches/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-poly-benches" -version = "0.3.0" +version = "0.4.0-alpha.5" authors = [ "arkworks contributors" ] description = "A library for benchmarking finite-field FFTs" include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] @@ -10,10 +10,10 @@ publish = false rust-version = "1.56" [dependencies] -ark-ff = { version = "^0.3.0", path = "../ff" } -ark-poly = { version = "^0.3.0", path = "../poly" } -ark-std = { version = "^0.3.0", default-features = false } -ark-test-curves = { version = "^0.3.0", path = "../test-curves", default-features = false, features = [ "bls12_381_scalar_field", "mnt4_753_curve" ] } +ark-ff = { version = "0.4.0-alpha", path = "../ff" } +ark-poly = { version = "0.4.0-alpha", path = "../poly" } +ark-std = { version = "0.4.0-alpha", default-features = false } +ark-test-curves = { version = "0.4.0-alpha", path = "../test-curves", default-features = false, features = [ "bls12_381_scalar_field", "mnt4_753_curve" ] } criterion = "0.4.0" rayon = { version = "1", optional = true } diff --git a/poly/Cargo.toml b/poly/Cargo.toml index 00ce7af05..734b12cbb 100644 --- a/poly/Cargo.toml +++ b/poly/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-poly" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A library for efficient polynomial arithmetic via FFTs over finite fields" homepage = "https://arkworks.rs" @@ -14,9 +14,9 @@ edition = "2021" rust-version = "1.57" [dependencies] -ark-ff = { version = "^0.3.0", path = "../ff", default-features = false } -ark-serialize = { version = "^0.3.0", path = "../serialize", default-features = false, features = ["derive"] } -ark-std = { version = "^0.3.0", default-features = false } +ark-ff = { version = "0.4.0-alpha", path = "../ff", default-features = false } +ark-serialize = { version = "0.4.0-alpha", path = "../serialize", default-features = false, features = ["derive"] } +ark-std = { version = "0.4.0-alpha", default-features = false } rayon = { version = "1", optional = true } derivative = { version = "2", default-features = false, features = [ "use_core" ] } hashbrown = { version = "0.13.1"} diff --git a/serialize-derive/Cargo.toml b/serialize-derive/Cargo.toml index 6e877955c..b918f714d 100644 --- a/serialize-derive/Cargo.toml +++ b/serialize-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-serialize-derive" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks Contributors" ] description = "A library for deriving serialization traits for the arkworks ecosystem" homepage = "https://arkworks.rs" diff --git a/serialize/Cargo.toml b/serialize/Cargo.toml index d007dc700..febb79875 100644 --- a/serialize/Cargo.toml +++ b/serialize/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-serialize" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A library for serializing types in the arkworks ecosystem" homepage = "https://arkworks.rs" @@ -14,8 +14,8 @@ edition = "2021" rust-version = "1.56" [dependencies] -ark-serialize-derive = { version = "^0.3.0", path = "../serialize-derive", optional = true } -ark-std = { version = "^0.3.0", default-features = false } +ark-serialize-derive = { version = "0.4.0-alpha", path = "../serialize-derive", optional = true } +ark-std = { version = "0.4.0-alpha", default-features = false } digest = { version = "0.10", default-features = false } num-bigint = { version = "0.4", default-features = false } @@ -23,7 +23,7 @@ num-bigint = { version = "0.4", default-features = false } sha2 = { version = "0.10", default-features = false} sha3 = { version = "0.10", default-features = false} blake2 = { version = "0.10", default-features = false} -ark-test-curves = { version = "^0.3.0", path = "../test-curves", default-features = false, features = [ "bls12_381_curve"] } +ark-test-curves = { version = "0.4.0-alpha", path = "../test-curves", default-features = false, features = [ "bls12_381_curve"] } [features] diff --git a/test-curves/Cargo.toml b/test-curves/Cargo.toml index 4abfa4d7d..19563155e 100644 --- a/test-curves/Cargo.toml +++ b/test-curves/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-test-curves" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A library for testing ark-ec & ark-poly" homepage = "https://arkworks.rs" @@ -14,14 +14,14 @@ edition = "2021" rust-version = "1.56" [dependencies] -ark-std = { version = "^0.3.0", default-features = false } -ark-ff = { version = "^0.3.0", path = "../ff", default-features = false } -ark-ec = { version = "^0.3.0", path = "../ec", default-features = false } +ark-std = { version = "0.4.0-alpha", default-features = false } +ark-ff = { version = "0.4.0-alpha", path = "../ff", default-features = false } +ark-ec = { version = "0.4.0-alpha", path = "../ec", default-features = false } [dev-dependencies] -ark-serialize = { version = "^0.3.0", path = "../serialize", default-features = false } -ark-algebra-test-templates = { version = "^0.3.0", path = "../test-templates", default-features = false } -ark-algebra-bench-templates = { version = "^0.3.0", path = "../bench-templates", default-features = false } +ark-serialize = { version = "0.4.0-alpha", path = "../serialize", default-features = false } +ark-algebra-test-templates = { version = "0.4.0-alpha", path = "../test-templates", default-features = false } +ark-algebra-bench-templates = { version = "0.4.0-alpha", path = "../bench-templates", default-features = false } [features] default = [] diff --git a/test-templates/Cargo.toml b/test-templates/Cargo.toml index 94bed0ec1..2c49a716d 100644 --- a/test-templates/Cargo.toml +++ b/test-templates/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-algebra-test-templates" -version = "0.3.0" +version = "0.4.0-alpha.6" authors = [ "arkworks contributors" ] description = "A library for tests for finite fields, elliptic curves, and pairings" homepage = "https://arkworks.rs" @@ -14,10 +14,10 @@ edition = "2021" rust-version = "1.56" [dependencies] -ark-std = { version = "^0.3.0", default-features = false } -ark-serialize = { version = "^0.3.0", path = "../serialize", default-features = false } -ark-ff = { version = "^0.3.0", path = "../ff", default-features = false } -ark-ec = { version = "^0.3.0", path = "../ec", default-features = false } +ark-std = { version = "0.4.0-alpha", default-features = false } +ark-serialize = { version = "0.4.0-alpha", path = "../serialize", default-features = false } +ark-ff = { version = "0.4.0-alpha", path = "../ff", default-features = false } +ark-ec = { version = "0.4.0-alpha", path = "../ec", default-features = false } num-bigint = { version = "0.4", default-features = false } num-integer = { version = "0.1", default-features = false } num-traits = { version = "0.2", default-features = false }