Skip to content
Closed
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,37 @@

## Pending

- (`ark-poly`) Reduce the number of field multiplications performed by `SparseMultilinearExtension::evaluate` and `DenseMultilinearExtension::evaluate`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this deleted?

Copy link
Author

@richardpringle richardpringle May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the commit on top of 0.4.2 is relevant.
3f06040

Any code that looks like it's being deleted is newer than 0.4.2. I would ignore the diff here though.

Edit: (until I can change the base branch)

### Breaking changes

### Features

### Improvements

### Bugfixes

## v0.4.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, you want a v0.4.3 that fixes the warnings? Should that be added here with a description of changes?


### Breaking changes

### Features

### Improvements

### Bugfixes

- [\#610](https://github.com/arkworks-rs/algebra/pull/610) (`ark-ec`) Fix panic in `final_exponentiation` step for MNT4/6 curves if inverse does not exist.

## v0.4.1


### Breaking changes

### Features

### Improvements

- [\#603](https://github.com/arkworks-rs/algebra/pull/603) (`ark-poly`) Reduce the number of field multiplications performed by `SparseMultilinearExtension::evaluate` and `DenseMultilinearExtension::evaluate`

### Bugfixes

## v0.4.0
Expand Down
8 changes: 4 additions & 4 deletions bench-templates/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-algebra-bench-templates"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A benchmark library for finite fields and elliptic curves"
homepage = "https://arkworks.rs"
Expand All @@ -18,9 +18,9 @@ rust-version = "1.63"
[dependencies]
criterion = { version = "0.4.0", features = [ "html_reports" ] }
ark-std = { version = "0.4.0", default-features = false }
ark-ec = { version = "0.4.0", path = "../ec", default-features = false }
ark-ff = { version = "0.4.0", path = "../ff", default-features = false }
ark-serialize = { version = "0.4.0", path = "../serialize", default-features = false }
ark-ec = { version = "0.4.2-alpha.1", path = "../ec", default-features = false }
ark-ff = { version = "0.4.2-alpha.1", path = "../ff", default-features = false }
ark-serialize = { version = "0.4.2-alpha.1", path = "../serialize", default-features = false }
paste = { version = "1.0" }

[features]
Expand Down
10 changes: 5 additions & 5 deletions ec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-ec"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A library for elliptic curves and pairings"
homepage = "https://arkworks.rs"
Expand All @@ -15,9 +15,9 @@ rust-version = "1.63"

[dependencies]
ark-std = { version = "0.4.0", default-features = false }
ark-serialize = { version = "0.4.0", path = "../serialize", default-features = false }
ark-ff = { version = "0.4.0", path = "../ff", default-features = false }
ark-poly = { version = "0.4.0", path = "../poly", default-features = false }
ark-serialize = { version = "0.4.2-alpha.1", path = "../serialize", default-features = false }
ark-ff = { version = "0.4.2-alpha.1", path = "../ff", default-features = false }
ark-poly = { version = "0.4.2-alpha.1", path = "../poly", default-features = false }
derivative = { version = "2", features = ["use_core"] }
num-traits = { version = "0.2", default-features = false }
rayon = { version = "1", optional = true }
Expand All @@ -26,7 +26,7 @@ hashbrown = "0.13.1"
itertools = { version = "0.10", default-features = false }

[dev-dependencies]
ark-test-curves = { version = "0.4.0", path = "../test-curves", default-features = false, features = ["bls12_381_curve"] }
ark-test-curves = { version = "0.4.2-alpha.1", 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"
Expand Down
2 changes: 1 addition & 1 deletion ff-asm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-ff-asm"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A library for generating x86-64 assembly for finite field multiplication"
homepage = "https://arkworks.rs"
Expand Down
2 changes: 1 addition & 1 deletion ff-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-ff-macros"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A library for generating x86-64 assembly for finite field multiplication"
homepage = "https://arkworks.rs"
Expand Down
26 changes: 12 additions & 14 deletions ff-macros/src/montgomery/mod.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
use quote::format_ident;
use std::str::FromStr;

use num_bigint::BigUint;
use num_traits::One;

mod biginteger;
use biginteger::*;
use biginteger::{add_with_carry_impl, sub_with_borrow_impl, subtract_modulus_impl};

mod add;
use add::*;
use add::add_assign_impl;
mod double;
use double::*;
use double::double_in_place_impl;
mod mul;
use mul::*;
use mul::mul_assign_impl;

mod square;
use square::*;
use square::square_in_place_impl;

mod sum_of_products;
use sum_of_products::*;
use sum_of_products::sum_of_products_impl;

use crate::utils;

pub fn mont_config_helper(
pub(crate) fn mont_config_helper(
modulus: BigUint,
generator: BigUint,
small_subgroup_base: Option<u32>,
Expand Down Expand Up @@ -61,10 +60,10 @@ pub fn mont_config_helper(
let modulus_has_spare_bit = modulus_limbs.last().unwrap() >> 63 == 0;
let can_use_no_carry_mul_opt = {
let first_limb_check = *modulus_limbs.last().unwrap() < (u64::MAX >> 1);
if limbs != 1 {
first_limb_check && modulus_limbs[..limbs - 1].iter().any(|l| *l != u64::MAX)
} else {
if limbs == 1 {
first_limb_check
} else {
first_limb_check && modulus_limbs[..limbs - 1].iter().any(|l| *l != u64::MAX)
}
};
let modulus = quote::quote! { BigInt([ #( #modulus_limbs ),* ]) };
Expand Down Expand Up @@ -100,9 +99,8 @@ pub fn mont_config_helper(
quote::quote! {}
};

let scope_name = format_ident!("{}___", config_name.to_string().to_lowercase());
quote::quote! {
fn #scope_name() {
const _: () = {
use ark_ff::{fields::Fp, BigInt, BigInteger, biginteger::arithmetic as fa, fields::*};
type B = BigInt<#limbs>;
type F = Fp<MontBackend<#config_name, #limbs>, #limbs>;
Expand Down Expand Up @@ -168,6 +166,6 @@ pub fn mont_config_helper(
#add_with_carry

#sub_with_borrow
}
};
}
}
10 changes: 5 additions & 5 deletions ff/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-ff"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A library for finite fields"
homepage = "https://arkworks.rs"
Expand All @@ -14,10 +14,10 @@ edition = "2021"
rust-version = "1.63"

[dependencies]
ark-ff-asm = { version = "0.4.0", path = "../ff-asm" }
ark-ff-macros = { version = "0.4.0", path = "../ff-macros" }
ark-ff-asm = { version = "0.4.2-alpha.1", path = "../ff-asm" }
ark-ff-macros = { version = "0.4.2-alpha.1", path = "../ff-macros" }
ark-std = { version = "0.4.0", default-features = false }
ark-serialize = { version = "0.4.0", path = "../serialize", default-features = false }
ark-serialize = { version = "0.4.2-alpha.1", path = "../serialize", default-features = false }
derivative = { version = "2", features = ["use_core"] }
num-traits = { version = "0.2", default-features = false }
paste = "1.0"
Expand All @@ -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.4.0", path = "../test-curves", default-features = false, features = [ "bls12_381_curve", "mnt6_753", "secp256k1"] }
ark-test-curves = { version = "0.4.2-alpha.1", 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 }
Expand Down
6 changes: 3 additions & 3 deletions poly/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-poly"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A library for efficient polynomial arithmetic via FFTs over finite fields"
homepage = "https://arkworks.rs"
Expand All @@ -14,8 +14,8 @@ edition = "2021"
rust-version = "1.63"

[dependencies]
ark-ff = { version = "0.4.0", path = "../ff", default-features = false }
ark-serialize = { version = "0.4.0", path = "../serialize", default-features = false, features = ["derive"] }
ark-ff = { version = "0.4.2-alpha.1", path = "../ff", default-features = false }
ark-serialize = { version = "0.4.2-alpha.1", path = "../serialize", default-features = false, features = ["derive"] }
ark-std = { version = "0.4.0", default-features = false }
rayon = { version = "1", optional = true }
derivative = { version = "2", default-features = false, features = [ "use_core" ] }
Expand Down
2 changes: 1 addition & 1 deletion serialize-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-serialize-derive"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks Contributors" ]
description = "A library for deriving serialization traits for the arkworks ecosystem"
homepage = "https://arkworks.rs"
Expand Down
6 changes: 3 additions & 3 deletions serialize/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-serialize"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A library for serializing types in the arkworks ecosystem"
homepage = "https://arkworks.rs"
Expand All @@ -14,7 +14,7 @@ edition = "2021"
rust-version = "1.63"

[dependencies]
ark-serialize-derive = { version = "0.4.0", path = "../serialize-derive", optional = true }
ark-serialize-derive = { version = "0.4.2-alpha.1", path = "../serialize-derive", optional = true }
ark-std = { version = "0.4.0", default-features = false }
digest = { version = "0.10", default-features = false }
num-bigint = { version = "0.4", default-features = false }
Expand All @@ -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.4.0", path = "../test-curves", default-features = false, features = [ "bls12_381_curve"] }
ark-test-curves = { version = "0.4.2-alpha.1", path = "../test-curves", default-features = false, features = [ "bls12_381_curve"] }


[features]
Expand Down
12 changes: 6 additions & 6 deletions test-curves/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-test-curves"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A library for testing ark-ec & ark-poly"
homepage = "https://arkworks.rs"
Expand All @@ -15,13 +15,13 @@ rust-version = "1.63"

[dependencies]
ark-std = { version = "0.4.0", default-features = false }
ark-ff = { version = "0.4.0", path = "../ff", default-features = false }
ark-ec = { version = "0.4.0", path = "../ec", default-features = false }
ark-ff = { version = "0.4.2-alpha.1", path = "../ff", default-features = false }
ark-ec = { version = "0.4.2-alpha.1", path = "../ec", default-features = false }

[dev-dependencies]
ark-serialize = { version = "0.4.0", path = "../serialize", default-features = false }
ark-algebra-test-templates = { version = "0.4.0", path = "../test-templates", default-features = false }
ark-algebra-bench-templates = { version = "0.4.0", path = "../bench-templates", default-features = false }
ark-serialize = { version = "0.4.2-alpha.1", path = "../serialize", default-features = false }
ark-algebra-test-templates = { version = "0.4.2-alpha.1", path = "../test-templates", default-features = false }
ark-algebra-bench-templates = { version = "0.4.2-alpha.1", path = "../bench-templates", default-features = false }

[features]
default = []
Expand Down
8 changes: 4 additions & 4 deletions test-templates/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-algebra-test-templates"
version = "0.4.0"
version = "0.4.2"
authors = [ "arkworks contributors" ]
description = "A library for tests for finite fields, elliptic curves, and pairings"
homepage = "https://arkworks.rs"
Expand All @@ -15,9 +15,9 @@ rust-version = "1.63"

[dependencies]
ark-std = { version = "0.4.0", default-features = false }
ark-serialize = { version = "0.4.0", path = "../serialize", default-features = false }
ark-ff = { version = "0.4.0", path = "../ff", default-features = false }
ark-ec = { version = "0.4.0", path = "../ec", default-features = false }
ark-serialize = { version = "0.4.2-alpha.1", path = "../serialize", default-features = false }
ark-ff = { version = "0.4.2-alpha.1", path = "../ff", default-features = false }
ark-ec = { version = "0.4.2-alpha.1", 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 }
Expand Down
Loading