From 2348acf3a15abee8743a2cf3a6807a9b7c72f813 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Wed, 24 Mar 2021 09:25:43 -0700 Subject: [PATCH] Update changelog for release --- .github/workflows/linkify_changelog.yml | 20 +++++++++++ CHANGELOG.md | 46 ++++++++++++------------- scripts/linkify_changelog.py | 31 +++++++++++++++++ 3 files changed, 74 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/linkify_changelog.yml create mode 100644 scripts/linkify_changelog.py diff --git a/.github/workflows/linkify_changelog.yml b/.github/workflows/linkify_changelog.yml new file mode 100644 index 0000000..8f3086e --- /dev/null +++ b/.github/workflows/linkify_changelog.yml @@ -0,0 +1,20 @@ +name: Linkify Changelog + +on: + workflow_dispatch + +jobs: + linkify: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Add links + run: python3 scripts/linkify_changelog.py CHANGELOG.md + - name: Commit + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git add . + git commit -m "Linkify Changelog" + git push diff --git a/CHANGELOG.md b/CHANGELOG.md index e1aa21d..31c4fe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,34 +1,34 @@ -## Pending +## v0.2.0 ### Breaking changes -- #12 Make the output of the `ToBitsGadget` impl for `FpVar` fixed-size -- #48 Add `Clone` trait bound to `CondSelectGadget`. +- [\#12](https://github.com/arkworks-rs/r1cs-std/pull/12) Make the output of the `ToBitsGadget` impl for `FpVar` fixed-size +- [\#48](https://github.com/arkworks-rs/r1cs-std/pull/48) Add `Clone` trait bound to `CondSelectGadget`. ### Features -- #21 Add `UInt128` -- #50 Add `DensePolynomialVar` +- [\#21](https://github.com/arkworks-rs/r1cs-std/pull/21) Add `UInt128` +- [\#50](https://github.com/arkworks-rs/r1cs-std/pull/50) Add `DensePolynomialVar` ### Improvements -- #5 Speedup BLS-12 pairing -- #13 Add `ToConstraintFieldGadget` to `ProjectiveVar` -- #15, #16 Allow `cs` to be `None` when converting a Montgomery point into a Twisted Edwards point -- #20 Add `CondSelectGadget` impl for `UInt`s -- #22 Reduce density of `three_bit_cond_neg_lookup` -- #23 Reduce allocations in `UInt`s -- #33 Speedup scalar multiplication by a constant -- #35 Construct a `FpVar` from bits -- #36 Implement `ToConstraintFieldGadget` for `Vec` -- #40, #43 Faster scalar multiplication for Short Weierstrass curves by relying on affine formulae -- #46 Add mux gadget as an auto-impl in `CondSelectGadget` to support random access of an array +- [\#5](https://github.com/arkworks-rs/r1cs-std/pull/5) Speedup BLS-12 pairing +- [\#13](https://github.com/arkworks-rs/r1cs-std/pull/13) Add `ToConstraintFieldGadget` to `ProjectiveVar` +- [\#15](https://github.com/arkworks-rs/r1cs-std/pull/15), #16 Allow `cs` to be `None` when converting a Montgomery point into a Twisted Edwards point +- [\#20](https://github.com/arkworks-rs/r1cs-std/pull/20) Add `CondSelectGadget` impl for `UInt`s +- [\#22](https://github.com/arkworks-rs/r1cs-std/pull/22) Reduce density of `three_bit_cond_neg_lookup` +- [\#23](https://github.com/arkworks-rs/r1cs-std/pull/23) Reduce allocations in `UInt`s +- [\#33](https://github.com/arkworks-rs/r1cs-std/pull/33) Speedup scalar multiplication by a constant +- [\#35](https://github.com/arkworks-rs/r1cs-std/pull/35) Construct a `FpVar` from bits +- [\#36](https://github.com/arkworks-rs/r1cs-std/pull/36) Implement `ToConstraintFieldGadget` for `Vec` +- [\#40](https://github.com/arkworks-rs/r1cs-std/pull/40), #43 Faster scalar multiplication for Short Weierstrass curves by relying on affine formulae +- [\#46](https://github.com/arkworks-rs/r1cs-std/pull/46) Add mux gadget as an auto-impl in `CondSelectGadget` to support random access of an array ### Bug fixes -- #8 Fix bug in `three_bit_cond_neg_lookup` when using a constant lookup bit -- #9 Fix bug in `short_weierstrass::ProjectiveVar::to_affine` -- #29 Fix `to_non_unique_bytes` for `BLS12::G1Prepared` -- #34 Fix `mul_by_inverse` for constants -- #42 Fix regression in `mul_by_inverse` constraint count -- #47 Compile with `panic='abort'` in release mode, for safety of the library across FFI boundaries -- #57 Clean up `UInt` docs +- [\#8](https://github.com/arkworks-rs/r1cs-std/pull/8) Fix bug in `three_bit_cond_neg_lookup` when using a constant lookup bit +- [\#9](https://github.com/arkworks-rs/r1cs-std/pull/9) Fix bug in `short_weierstrass::ProjectiveVar::to_affine` +- [\#29](https://github.com/arkworks-rs/r1cs-std/pull/29) Fix `to_non_unique_bytes` for `BLS12::G1Prepared` +- [\#34](https://github.com/arkworks-rs/r1cs-std/pull/34) Fix `mul_by_inverse` for constants +- [\#42](https://github.com/arkworks-rs/r1cs-std/pull/42) Fix regression in `mul_by_inverse` constraint count +- [\#47](https://github.com/arkworks-rs/r1cs-std/pull/47) Compile with `panic='abort'` in release mode, for safety of the library across FFI boundaries +- [\#57](https://github.com/arkworks-rs/r1cs-std/pull/57) Clean up `UInt` docs ## v0.1.0 diff --git a/scripts/linkify_changelog.py b/scripts/linkify_changelog.py new file mode 100644 index 0000000..867ae14 --- /dev/null +++ b/scripts/linkify_changelog.py @@ -0,0 +1,31 @@ +import re +import sys +import fileinput +import os + +# Set this to the name of the repo, if you don't want it to be read from the filesystem. +# It assumes the changelog file is in the root of the repo. +repo_name = "" + +# This script goes through the provided file, and replaces any " \#", +# with the valid mark down formatted link to it. e.g. +# " [\#number](https://github.com/arkworks-rs/template/pull/) +# Note that if the number is for a an issue, github will auto-redirect you when you click the link. +# It is safe to run the script multiple times in succession. +# +# Example usage $ python3 linkify_changelog.py ../CHANGELOG.md +if len(sys.argv) < 2: + print("Must include path to changelog as the first argument to the script") + print("Example Usage: python3 linkify_changelog.py ../CHANGELOG.md") + exit() + +changelog_path = sys.argv[1] +if repo_name == "": + path = os.path.abspath(changelog_path) + components = path.split(os.path.sep) + repo_name = components[-2] + +for line in fileinput.input(inplace=True): + line = re.sub(r"\- #([0-9]*)", r"- [\\#\1](https://github.com/arkworks-rs/" + repo_name + r"/pull/\1)", line.rstrip()) + # edits the current file + print(line) \ No newline at end of file