From 53879365944e561ab405e58fb1d1215a08980a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Thu, 4 Jan 2024 18:11:32 -0500 Subject: [PATCH] fix: adapt to arecibo changes --- Cargo.toml | 2 +- src/cli/lurk_proof.rs | 4 ++-- src/lem/multiframe.rs | 4 +--- src/proof/nova.rs | 4 ++-- src/proof/supernova.rs | 2 +- src/public_parameters/instance.rs | 4 ++-- src/public_parameters/mod.rs | 2 +- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 94b549ddee..30bad41196 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -129,7 +129,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 = "arecibo" } +nova = { git = "https://github.com/huitseeker/arecibo", branch = "easy_supernova_feedback", package = "arecibo" } 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/cli/lurk_proof.rs b/src/cli/lurk_proof.rs index 08bf4552bc..dd290940d1 100644 --- a/src/cli/lurk_proof.rs +++ b/src/cli/lurk_proof.rs @@ -1,6 +1,6 @@ use ::nova::{ - supernova::NonUniformCircuit, - traits::{circuit_supernova::StepCircuit as SuperStepCircuit, Engine}, + supernova::{NonUniformCircuit, StepCircuit as SuperStepCircuit}, + traits::Engine, }; use abomonation::Abomonation; use anyhow::{bail, Result}; diff --git a/src/lem/multiframe.rs b/src/lem/multiframe.rs index f8c4e2640c..34a13577bb 100644 --- a/src/lem/multiframe.rs +++ b/src/lem/multiframe.rs @@ -871,9 +871,7 @@ impl<'a, F: LurkField, C: Coprocessor> nova::traits::circuit::StepCircuit } } -impl<'a, F: LurkField, C: Coprocessor> nova::traits::circuit_supernova::StepCircuit - for MultiFrame<'a, F, C> -{ +impl<'a, F: LurkField, C: Coprocessor> nova::supernova::StepCircuit for MultiFrame<'a, F, C> { fn arity(&self) -> usize { 2 * self.lurk_step.input_params.len() } diff --git a/src/proof/nova.rs b/src/proof/nova.rs index 74bb4a6728..45eee951f2 100644 --- a/src/proof/nova.rs +++ b/src/proof/nova.rs @@ -13,7 +13,7 @@ use nova::{ snark::RelaxedR1CSSNARKTrait, Engine, }, - CircuitShape, CompressedSNARK, ProverKey, RecursiveSNARK, VerifierKey, + CompressedSNARK, ProverKey, R1CSWithArity, RecursiveSNARK, VerifierKey, }; use pasta_curves::pallas; use serde::{Deserialize, Serialize}; @@ -102,7 +102,7 @@ pub type C1LEM<'a, F, C> = crate::lem::multiframe::MultiFrame<'a, F, C>; pub type C2 = TrivialCircuit< as Engine>::Scalar>; /// Type alias for Nova Circuit Parameters with the curve cycle types defined above. -pub type NovaCircuitShape = CircuitShape>; +pub type NovaCircuitShape = R1CSWithArity>; /// Type alias for Nova Public Parameters with the curve cycle types defined above. pub type NovaPublicParams = nova::PublicParams, E2, C1, C2>; diff --git a/src/proof/supernova.rs b/src/proof/supernova.rs index 7ad385fc2d..be1e54b15c 100644 --- a/src/proof/supernova.rs +++ b/src/proof/supernova.rs @@ -8,9 +8,9 @@ use nova::{ error::SuperNovaError, snark::{CompressedSNARK, ProverKey, VerifierKey}, AuxParams, CircuitDigests, NonUniformCircuit, RecursiveSNARK, + StepCircuit as SuperStepCircuit, TrivialSecondaryCircuit, }, traits::{ - circuit_supernova::{StepCircuit as SuperStepCircuit, TrivialSecondaryCircuit}, snark::{BatchedRelaxedR1CSSNARKTrait, RelaxedR1CSSNARKTrait}, Engine, }, diff --git a/src/public_parameters/instance.rs b/src/public_parameters/instance.rs index 2c5dfa8d55..f30cc3977c 100644 --- a/src/public_parameters/instance.rs +++ b/src/public_parameters/instance.rs @@ -44,8 +44,8 @@ use std::{ use ::nova::{ constants::NUM_HASH_BITS, - supernova::NonUniformCircuit, - traits::{circuit_supernova::StepCircuit as SuperStepCircuit, Engine}, + supernova::{NonUniformCircuit, StepCircuit as SuperStepCircuit}, + traits::Engine, }; use abomonation::Abomonation; use camino::Utf8Path; diff --git a/src/public_parameters/mod.rs b/src/public_parameters/mod.rs index 899ec9f919..4d4bd54cab 100644 --- a/src/public_parameters/mod.rs +++ b/src/public_parameters/mod.rs @@ -134,7 +134,7 @@ where /// Attempts to extract abomonated public parameters. use ::nova::supernova::NonUniformCircuit; -use ::nova::traits::circuit_supernova::StepCircuit as SuperStepCircuit; +use ::nova::supernova::StepCircuit as SuperStepCircuit; use supernova::C2; pub fn supernova_public_params< 'a,