diff --git a/Cargo.toml b/Cargo.toml index fefd556..b32bd50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,26 +7,16 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ark-ff = { version = "^0.3.0", default-features = false } -ark-std = { version = "^0.3.0", default-features = false } -ark-r1cs-std = { version = "^0.3.0", default-features = false} -ark-sponge = { version = "^0.3.0", default-features = false } -ark-poly = { version = "0.3.0", default-features = false } -ark-relations = { version = "^0.3.0", default-features = false, optional = true} +ark-ff = { version = "^0.4.0", default-features = false } +ark-std = { version = "^0.4.0", default-features = false } +ark-r1cs-std = { version = "^0.4.0", default-features = false} +ark-crypto-primitives = { version = "^0.4.0", features = ["sponge"] } +ark-poly = { version = "^0.4.0", default-features = false } +ark-relations = { version = "^0.4.0", default-features = false, optional = true} tracing = { version = "0.1", default-features = false, features = [ "attributes" ], optional = true} [dev-dependencies] -ark-test-curves = { version = "^0.3.0", default-features = false, features = ["bls12_381_scalar_field", "mnt4_753_scalar_field"] } - -[patch.crates-io] -ark-sponge = {git = "https://github.com/arkworks-rs/sponge"} -ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std" } -ark-ec = { git = "https://github.com/arkworks-rs/algebra" } -ark-ff = { git = "https://github.com/arkworks-rs/algebra" } -ark-poly = { git = "https://github.com/arkworks-rs/algebra" } -ark-serialize = { git = "https://github.com/arkworks-rs/algebra" } -ark-std = { git = "https://github.com/arkworks-rs/std" } -ark-test-curves = { git = "https://github.com/arkworks-rs/algebra" } +ark-test-curves = { version = "^0.4.0", default-features = false, features = ["bls12_381_scalar_field", "mnt4_753_scalar_field"] } [profile.release] opt-level = 3 @@ -55,6 +45,6 @@ debug = true [features] default = ["std"] -std = ["ark-ff/std", "ark-std/std", "ark-relations/std", "ark-r1cs-std/std", "ark-sponge/std", "ark-poly/std"] -r1cs = ["ark-sponge/r1cs", "tracing", "ark-relations"] +std = ["ark-ff/std", "ark-std/std", "ark-relations/std", "ark-r1cs-std/std", "ark-crypto-primitives/std", "ark-poly/std"] +r1cs = ["ark-crypto-primitives/r1cs", "tracing", "ark-relations"] diff --git a/README.md b/README.md index d5fa55e..9ce49fb 100644 --- a/README.md +++ b/README.md @@ -38,14 +38,10 @@ This library comes with some unit and integration tests. Run these tests with: cargo test ``` -To use this library, you need to add the following to your `Cargo.toml`. Note that this configuration will bump `ark-sponge` and `ark-r1cs-std` to `master`/`main` instead of stable version on `crates.io`. +To use this library, you need to add the following to your `Cargo.toml`. ```toml [dependencies] ark-ldt = {git = "https://github.com/arkworks-rs/ldt", branch="main", default-features = false} - -[patch.crates-io] -ark-sponge = {git = "https://github.com/arkworks-rs/sponge"} -ark-r1cs-std = {git = "https://github.com/arkworks-rs/r1cs-std", branch = "master"} ``` ## License diff --git a/src/domain/mod.rs b/src/domain/mod.rs index f70878e..ae5582e 100644 --- a/src/domain/mod.rs +++ b/src/domain/mod.rs @@ -1,4 +1,4 @@ -use ark_ff::PrimeField; +use ark_ff::fields::PrimeField; use ark_poly::polynomial::univariate::DensePolynomial; use ark_poly::{ DenseUVPolynomial, EvaluationDomain, Evaluations, Polynomial, Radix2EvaluationDomain, @@ -17,7 +17,7 @@ use ark_std::vec::Vec; /// /// Constraint equivalent is in `r1cs_std::poly::domain`. #[derive(Clone, Copy, Eq, PartialEq, Debug)] -pub struct Radix2CosetDomain { +pub struct Radix2CosetDomain { /// A non-coset radix 2 domain: `` pub base_domain: Radix2EvaluationDomain, /// offset `h` @@ -174,8 +174,9 @@ impl Radix2CosetDomain { #[cfg(test)] mod tests { use ark_poly::univariate::DensePolynomial; - use ark_poly::{DenseUVPolynomial, Polynomial}; - use ark_std::{test_rng, UniformRand}; + use ark_poly::DenseUVPolynomial; + use ark_poly::Polynomial; + use ark_std::{test_rng, vec, UniformRand}; use ark_test_curves::bls12_381::Fr; use crate::domain::Radix2CosetDomain; diff --git a/src/fri/constraints/mod.rs b/src/fri/constraints/mod.rs index 1a3b48c..0445945 100644 --- a/src/fri/constraints/mod.rs +++ b/src/fri/constraints/mod.rs @@ -2,6 +2,8 @@ use crate::direct::constraints::DirectLDTGadget; use crate::domain::Radix2CosetDomain; use crate::fri::FRIParameters; +use ark_crypto_primitives::sponge::constraints::CryptographicSpongeVar; +use ark_crypto_primitives::sponge::FieldBasedCryptographicSponge; use ark_ff::PrimeField; use ark_r1cs_std::bits::boolean::Boolean; use ark_r1cs_std::eq::EqGadget; @@ -12,8 +14,6 @@ use ark_r1cs_std::poly::evaluations::univariate::EvaluationsVar; use ark_r1cs_std::poly::polynomial::univariate::dense::DensePolynomialVar; use ark_r1cs_std::prelude::CondSelectGadget; use ark_relations::r1cs::SynthesisError; -use ark_sponge::constraints::CryptographicSpongeVar; -use ark_sponge::FieldBasedCryptographicSponge; use ark_std::marker::PhantomData; use ark_std::vec::Vec; diff --git a/src/fri/verifier.rs b/src/fri/verifier.rs index f62952b..5f1ce05 100644 --- a/src/fri/verifier.rs +++ b/src/fri/verifier.rs @@ -3,10 +3,10 @@ use ark_std::marker::PhantomData; use crate::direct::DirectLDT; use crate::domain::Radix2CosetDomain; use crate::fri::FRIParameters; +use ark_crypto_primitives::sponge::FieldBasedCryptographicSponge; use ark_ff::PrimeField; use ark_poly::polynomial::univariate::DensePolynomial; use ark_poly::Polynomial; -use ark_sponge::FieldBasedCryptographicSponge; use ark_std::vec::Vec; /// Implements FRI verifier. @@ -238,6 +238,8 @@ mod tests { use ark_poly::univariate::DensePolynomial; use ark_poly::{DenseUVPolynomial, Polynomial}; use ark_std::test_rng; + use ark_std::vec; + use ark_std::vec::Vec; use ark_test_curves::bls12_381::Fr; use crate::direct::DirectLDT;