Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove "spartan" feature #223

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ parallel = [
"ark-r1cs-std/parallel",
"nexus-nova/parallel",
]
prover_hypernova = ["dep:nexus-nova", "dep:spartan", "nexus-nova/spartan"]
prover_nova = ["dep:nexus-nova", "dep:spartan", "nexus-nova/spartan"]
prover_hypernova = ["dep:nexus-nova", "dep:spartan"]
prover_nova = ["dep:nexus-nova", "dep:spartan"]
prover_jolt = ["dep:nexus-jolt"]
9 changes: 3 additions & 6 deletions nova-benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,16 @@ ark-vesta = "0.4.0"
ark-bn254 = "0.4.0"
ark-grumpkin = { git = "https://github.com/arkworks-rs/curves/", rev = "8c0256a" }

ark_spartan = { path = "../spartan", package = "ark-spartan", optional = true }
ark_spartan = { path = "../spartan", package = "ark-spartan" }

criterion = "0.5"
pprof = { version = "0.13", features = ["criterion", "flamegraph"] }

nexus-nova = { path = "../nova", default-features = false, features = [
"spartan", # nova doesn't currently compile when spartan is disabled
] }
nexus-nova = { path = "../nova", default-features = false }

[features]
default = ["parallel", "spartan"]
default = ["parallel"]
parallel = ["nexus-nova/parallel"]
spartan = ["ark_spartan"]

[[bench]]
name = "nova"
Expand Down
26 changes: 9 additions & 17 deletions nova/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,33 @@ ark-relations.workspace = true
ark-r1cs-std.workspace = true
ark-serialize.workspace = true
ark-poly.workspace = true
ark-poly-commit = { workspace = true, optional = true }
ark-poly-commit = { workspace = true }

ark_spartan = { path = "../spartan", package = "ark-spartan", optional = true }
ark_spartan = { path = "../spartan", package = "ark-spartan", default-features = false }

merlin = { version = "3.0.0", optional = true }
merlin = { version = "3.0.0" }
sha3 = { workspace = true }
rand_chacha = "0.3.1"

tracing = { version = "0.1", default-features = false }
rayon = { version = "1.8.0", optional = true }

ff = { version = "0.13.0", optional = true }
hex = { workspace = true, optional = true }
ff = { version = "0.13.0" }
hex = { workspace = true }

halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20", optional = true }
halo2curves = { git = "https://github.com/privacy-scaling-explorations/halo2curves.git", rev = "8e4cb9f0c66c864e8ca25da07f50ae95f664a5b7", optional = true }
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" }
halo2curves = { git = "https://github.com/privacy-scaling-explorations/halo2curves.git", rev = "8e4cb9f0c66c864e8ca25da07f50ae95f664a5b7" }
Comment on lines +35 to +36
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two will get dropped in the "publish" branch, as the secondary circuit compression is incomplete


[features]
default = ["parallel", "spartan"]
default = ["parallel"]
parallel = [
"rayon",
"ark-ff/parallel",
"ark-ec/parallel",
"ark-std/parallel",
"ark-crypto-primitives/parallel",
"ark-r1cs-std/parallel",
]
spartan = [
"ark-poly-commit",
"ark_spartan",
"merlin",
"ff",
"hex",
"halo2_proofs",
"halo2curves",
"ark_spartan/parallel",
]

[dev-dependencies]
Expand Down
1 change: 0 additions & 1 deletion nova/src/circuits/nova/pcd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ use crate::{

mod augmented;

#[cfg(feature = "spartan")]
pub mod compression;

use augmented::{
Expand Down
3 changes: 1 addition & 2 deletions nova/src/folding/cyclefold/secondary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ where
}
}
}
#[cfg(any(test, feature = "spartan"))]

macro_rules! parse_projective {
($X:expr) => {
match &$X[..3] {
Expand All @@ -181,7 +181,6 @@ where
G2: SWCurveConfig,
C2: CommitmentScheme<Projective<G2>>,
{
#[cfg(any(test, feature = "spartan"))]
pub(crate) fn parse_secondary_io<G1>(&self) -> Option<Circuit<G1>>
where
G2::BaseField: PrimeField,
Expand Down
3 changes: 0 additions & 3 deletions nova/src/folding/hypernova/cyclefold/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub enum Error {
HNFolding(HNFoldingError),
Synthesis(ark_relations::r1cs::SynthesisError),

#[cfg(any(test, feature = "spartan"))]
InvalidPublicInput,
PolyCommitmentSetup,
}
Expand Down Expand Up @@ -59,7 +58,6 @@ impl Display for Error {
Self::CCS(error) => write!(f, "{}", error),
Self::HNFolding(error) => write!(f, "{}", error),
Self::Synthesis(error) => write!(f, "{}", error),
#[cfg(any(test, feature = "spartan"))]
Self::InvalidPublicInput => write!(f, "invalid public input"),
Self::PolyCommitmentSetup => write!(f, "error during polycommitment setup"),
}
Expand All @@ -73,7 +71,6 @@ impl ark_std::error::Error for Error {
Self::CCS(error) => error.source(),
Self::HNFolding(error) => error.source(),
Self::Synthesis(error) => error.source(),
#[cfg(any(test, feature = "spartan"))]
Self::InvalidPublicInput => None,
Self::PolyCommitmentSetup => None,
}
Expand Down
1 change: 0 additions & 1 deletion nova/src/folding/hypernova/cyclefold/nimfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ where
Ok((proof, (folded_U, folded_W), (U_secondary, W_secondary)))
}

#[cfg(any(test, feature = "spartan"))]
pub fn verify(
&self,
config: &RO::Config,
Expand Down
1 change: 0 additions & 1 deletion nova/src/folding/hypernova/nimfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ where
))
}

#[cfg(any(test, feature = "spartan"))]
pub fn verify_as_subprotocol<C: PolyCommitmentScheme<G>>(
&self,
random_oracle: &mut RO,
Expand Down
3 changes: 0 additions & 3 deletions nova/src/folding/nova/cyclefold/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub enum Error {
R1CS(R1CSError),
Synthesis(ark_relations::r1cs::SynthesisError),

#[cfg(any(test, feature = "spartan"))]
InvalidPublicInput,
}

Expand All @@ -31,7 +30,6 @@ impl Display for Error {
match self {
Self::R1CS(error) => write!(f, "{}", error),
Self::Synthesis(error) => write!(f, "{}", error),
#[cfg(any(test, feature = "spartan"))]
Self::InvalidPublicInput => write!(f, "invalid public input"),
}
}
Expand All @@ -42,7 +40,6 @@ impl ark_std::error::Error for Error {
match self {
Self::R1CS(error) => error.source(),
Self::Synthesis(error) => error.source(),
#[cfg(any(test, feature = "spartan"))]
Self::InvalidPublicInput => None,
}
}
Expand Down
1 change: 0 additions & 1 deletion nova/src/folding/nova/cyclefold/nimfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ where
Ok((proof, (folded_U, folded_W), (U_secondary, W_secondary)))
}

#[cfg(any(test, feature = "spartan"))]
pub fn verify(
&self,
config: &RO::Config,
Expand Down