From 58ef94f92bf858e0a73160c072bcd773e3d87646 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Wed, 15 Nov 2023 13:41:12 -0800 Subject: [PATCH 1/2] chore: change package name to `halo2curves-axiom` for crates.io publish --- Cargo.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c8539854..12c335bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "halo2curves" +name = "halo2curves-axiom" version = "0.4.1" -authors = ["Privacy Scaling Explorations team"] +authors = ["Privacy Scaling Explorations team", "Taiko Labs", "Intrinsic Technologies"] license = "MIT/Apache-2.0" edition = "2021" -repository = "https://github.com/privacy-scaling-explorations/halo2curves" +repository = "https://github.com/axiom-crypto/halo2curves" readme = "README.md" -description = "Elliptic curve implementations and wrappers for halo2 library" -rust-version = "1.63.0" +description = "Elliptic curve implementations and wrappers for halo2 library. This is a fork of the \"halo2curves\" crate for Axiom's production usage." +rust-version = "1.67.0" [dev-dependencies] criterion = { version = "0.3", features = ["html_reports"] } From 71cc7cec177e79b27d87673e637deb436da79895 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Wed, 15 Nov 2023 13:46:17 -0800 Subject: [PATCH 2/2] chore: fix benches --- .github/workflows/release.yml | 16 ++++++++-------- benches/bn256_field.rs | 2 +- benches/fft.rs | 4 ++-- benches/group.rs | 2 +- benches/hash_to_curve.rs | 4 +++- benches/less_than.rs | 2 +- benches/msm.rs | 4 ++-- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2108a871..89fbb21e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,13 +14,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - package: [halo2curves] + package: [halo2curves-axiom] steps: - name: Checkout code uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: - profile: minimal + profile: minimal - name: Get current version id: get-version @@ -42,7 +42,7 @@ jobs: exit 1 fi done - + echo "Input version is equal to current version. Failing..." exit 1 @@ -50,10 +50,10 @@ jobs: uses: taiki-e/install-action@v2 with: tool: cargo-release - + - 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 + pr-template-file: .github/release-pr-template.ejs + github-token: ${{ secrets.GITHUB_TOKEN }} + version: ${{ inputs.version }} + crate-release-all: true diff --git a/benches/bn256_field.rs b/benches/bn256_field.rs index fa8db6a3..b50dd1d6 100644 --- a/benches/bn256_field.rs +++ b/benches/bn256_field.rs @@ -1,5 +1,5 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput}; -use halo2curves::{bn256::*, ff::Field, legendre::Legendre}; +use halo2curves_axiom::{bn256::*, ff::Field, legendre::Legendre}; use rand::SeedableRng; use rand_xorshift::XorShiftRng; diff --git a/benches/fft.rs b/benches/fft.rs index a250308d..9ae5dd19 100644 --- a/benches/fft.rs +++ b/benches/fft.rs @@ -15,8 +15,8 @@ extern crate criterion; use criterion::{BenchmarkId, Criterion}; use group::ff::Field; -use halo2curves::bn256::Fr as Scalar; -use halo2curves::fft::best_fft; +use halo2curves_axiom::bn256::Fr as Scalar; +use halo2curves_axiom::fft::best_fft; use rand_core::OsRng; use std::ops::Range; use std::time::SystemTime; diff --git a/benches/group.rs b/benches/group.rs index b1936e68..85598e4c 100644 --- a/benches/group.rs +++ b/benches/group.rs @@ -1,7 +1,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; use ff::Field; use group::prime::PrimeCurveAffine; -use halo2curves::secp256k1::Secp256k1; +use halo2curves_axiom::secp256k1::Secp256k1; use pasta_curves::arithmetic::CurveExt; use rand_core::OsRng; diff --git a/benches/hash_to_curve.rs b/benches/hash_to_curve.rs index bda1c1d3..70758303 100644 --- a/benches/hash_to_curve.rs +++ b/benches/hash_to_curve.rs @@ -1,7 +1,9 @@ +use std::iter; + use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use halo2curves_axiom as halo2curves; use pasta_curves::arithmetic::CurveExt; use rand_core::{OsRng, RngCore}; -use std::iter; fn hash_to_secp256k1(c: &mut Criterion) { hash_to_curve::(c, "Secp256k1"); diff --git a/benches/less_than.rs b/benches/less_than.rs index 9c364fb4..0d71112d 100644 --- a/benches/less_than.rs +++ b/benches/less_than.rs @@ -40,7 +40,7 @@ fn check_underflow(x: &[u64; 4], y: &[u64; 4]) -> bool { use criterion::{criterion_group, criterion_main, Criterion}; use group::Group; -use halo2curves::bn256::G1; +use halo2curves_axiom::bn256::G1; use rand::SeedableRng; use rand_xorshift::XorShiftRng; diff --git a/benches/msm.rs b/benches/msm.rs index c78952b7..7c38ed3a 100644 --- a/benches/msm.rs +++ b/benches/msm.rs @@ -15,8 +15,8 @@ extern crate criterion; use criterion::{BenchmarkId, Criterion}; use ff::Field; use group::prime::PrimeCurveAffine; -use halo2curves::bn256::{Fr as Scalar, G1Affine as Point}; -use halo2curves::msm::{best_multiexp, multiexp_serial}; +use halo2curves_axiom::bn256::{Fr as Scalar, G1Affine as Point}; +use halo2curves_axiom::msm::{best_multiexp, multiexp_serial}; use maybe_rayon::current_thread_index; use maybe_rayon::prelude::{IntoParallelIterator, ParallelIterator}; use rand_core::SeedableRng;