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

experiment: remove issues with circuit caching #1

Merged
merged 3 commits into from
Nov 1, 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
106 changes: 53 additions & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "proving_ground"
name = "client-side-prover"
version = "0.1.0"
authors = ["Pluto Engineering"]
edition = "2021"
description = "Client side proving"
readme = "README.md"
repository = "https://github.com/pluto/proving_ground"
repository = "https://github.com/pluto/client-side-prover"
license-file = "LICENSE"
keywords = ["zkSNARKs", "cryptography", "proofs"]
# rust-version = "1.79"
Expand Down
32 changes: 24 additions & 8 deletions src/supernova/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,22 @@ where
(circuit_shapes, aux_params)
}

/// Returns just the [`AuxParams`] portion of [`PublicParams`] from a reference to [`PublicParams`].
pub fn aux_params(&self) -> AuxParams<E1> {
AuxParams {
ro_consts_primary: self.ro_consts_primary.clone(),
ro_consts_circuit_primary: self.ro_consts_circuit_primary.clone(),
ck_primary: self.ck_primary.clone(),
augmented_circuit_params_primary: self.augmented_circuit_params_primary.clone(),
ro_consts_secondary: self.ro_consts_secondary.clone(),
ro_consts_circuit_secondary: self.ro_consts_circuit_secondary.clone(),
ck_secondary: self.ck_secondary.clone(),
circuit_shape_secondary: self.circuit_shape_secondary.clone(),
augmented_circuit_params_secondary: self.augmented_circuit_params_secondary.clone(),
digest: self.digest(),
}
}

/// Create a [`PublicParams`] from a vector of raw [`R1CSWithArity`] and
/// auxiliary params.
pub fn from_parts(circuit_shapes: Vec<R1CSWithArity<E1>>, aux_params: AuxParams<E1>) -> Self {
Expand Down Expand Up @@ -491,14 +507,14 @@ where
}

// check the arity of all the primary circuits match the initial input length
pp.circuit_shapes.iter().try_for_each(|circuit| {
if circuit.F_arity != z0_primary.len() {
return Err(SuperNovaError::NovaError(
NovaError::InvalidStepOutputLength,
));
}
Ok(())
})?;
// pp.circuit_shapes.iter().try_for_each(|circuit| {
// if circuit.F_arity != z0_primary.len() {
// return Err(SuperNovaError::NovaError(
// NovaError::InvalidStepOutputLength,
// ));
// }
// Ok(())
// })?;

// base case for the primary
let mut cs_primary = SatisfyingAssignment::<E1>::new();
Expand Down