diff --git a/Cargo.toml b/Cargo.toml index cb9ca06386..83234a7f0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ dashmap = "5.5.0" ff = { workspace = true } fxhash = "0.2.1" generic-array = "0.14.7" +halo2curves = "0.4" hex = { version = "0.4.3", features = ["serde"] } indexmap = { version = "2.1.0", features = ["rayon", "serde"] } itertools = "0.11" @@ -126,7 +127,7 @@ clap = "4.3.17" ff = "0.13" metrics = "0.21.1" neptune = { git = "https://github.com/lurk-lab/neptune", branch = "dev", features = ["abomonation"] } -nova = { git = "https://github.com/lurk-lab/arecibo", branch = "dev", package = "nova-snark" } +nova = { git = "https://github.com/lurk-lab/arecibo", branch = "port_more_nova", package = "nova-snark" } once_cell = "1.18.0" pairing = { version = "0.23" } pasta_curves = { git = "https://github.com/lurk-lab/pasta_curves", branch = "dev" } diff --git a/src/field.rs b/src/field.rs index 1427c33c9f..217ed3e20c 100644 --- a/src/field.rs +++ b/src/field.rs @@ -6,7 +6,8 @@ //! relating this field to the expresions of the language. use clap::ValueEnum; use ff::{PrimeField, PrimeFieldBits}; -use nova::provider::bn256_grumpkin::{bn256, grumpkin}; +use halo2curves::bn256::Fr as Bn256Scalar; +use halo2curves::grumpkin::Fr as GrumpkinScalar; use serde::{Deserialize, Serialize}; use std::convert::TryFrom; use std::hash::Hash; @@ -268,11 +269,11 @@ impl LurkField for pasta_curves::vesta::Scalar { const FIELD: LanguageField = LanguageField::Vesta; } -impl LurkField for bn256::Scalar { +impl LurkField for Bn256Scalar { const FIELD: LanguageField = LanguageField::BN256; } -impl LurkField for grumpkin::Scalar { +impl LurkField for GrumpkinScalar { const FIELD: LanguageField = LanguageField::Grumpkin; } diff --git a/src/lem/multiframe.rs b/src/lem/multiframe.rs index b2e87d23d2..8e3df5ceb4 100644 --- a/src/lem/multiframe.rs +++ b/src/lem/multiframe.rs @@ -929,7 +929,8 @@ where #[cfg(test)] mod tests { use bellpepper_core::test_cs::TestConstraintSystem; - use nova::provider::bn256_grumpkin::{bn256::Scalar as Bn, grumpkin::Scalar as Gr}; + use halo2curves::bn256::Fr as Bn; + use halo2curves::grumpkin::Fr as Gr; use pasta_curves::{Fp, Fq}; use crate::{ diff --git a/src/proof/nova.rs b/src/proof/nova.rs index 2cec7c00ab..fa2d737f7e 100644 --- a/src/proof/nova.rs +++ b/src/proof/nova.rs @@ -3,12 +3,10 @@ use abomonation::Abomonation; use bellpepper_core::{num::AllocatedNum, ConstraintSystem}; use ff::Field; +use halo2curves::bn256::Fr as Bn256Scalar; use nova::{ errors::NovaError, - provider::{ - bn256_grumpkin::{bn256, Bn256Engine, GrumpkinEngine}, - pasta::{PallasEngine, VestaEngine}, - }, + provider::{Bn256Engine, GrumpkinEngine, PallasEngine, VestaEngine}, traits::{ circuit::{StepCircuit, TrivialCircuit}, evaluation::EvaluationEngineTrait, @@ -68,7 +66,7 @@ impl CurveCycleEquipped for pallas::Scalar { } // The impl CurveCycleEquipped for vesta::Scalar is academically possible, but voluntarily omitted to avoid confusion. -impl CurveCycleEquipped for bn256::Scalar { +impl CurveCycleEquipped for Bn256Scalar { type EE1 = nova::provider::ipa_pc::EvaluationEngine; type EE2 = nova::provider::ipa_pc::EvaluationEngine;