Skip to content

Commit

Permalink
Merge pull request #1 from pluto/experiment/memory-pressure
Browse files Browse the repository at this point in the history
experiment: remove issues with circuit caching
  • Loading branch information
devloper authored Nov 1, 2024
2 parents c58e3c1 + 2dda002 commit 316912f
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 63 deletions.
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

0 comments on commit 316912f

Please sign in to comment.