diff --git a/Cargo.lock b/Cargo.lock index eb7796e..37a15d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -310,6 +310,59 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +[[package]] +name = "client-side-prover" +version = "0.1.0" +dependencies = [ + "anyhow", + "bellpepper", + "bellpepper-core", + "bincode", + "bitvec", + "byteorder", + "cfg-if", + "criterion", + "digest", + "expect-test", + "ff", + "flate2", + "generic-array 1.1.0", + "getrandom", + "group", + "grumpkin-msm", + "halo2curves", + "handlebars", + "hex", + "itertools 0.13.0", + "neptune", + "num-bigint 0.4.6", + "num-integer", + "num-traits", + "once_cell", + "pairing", + "pprof", + "proptest", + "rand", + "rand_chacha", + "rand_core", + "rayon", + "rayon-scan", + "ref-cast", + "serde", + "serde_json", + "sha2", + "sha3", + "static_assertions", + "subtle", + "tap", + "thiserror", + "tracing", + "tracing-subscriber", + "tracing-test", + "tracing-texray", + "vergen", +] + [[package]] name = "constant_time_eq" version = "0.3.1" @@ -1171,59 +1224,6 @@ dependencies = [ "unarray", ] -[[package]] -name = "proving_ground" -version = "0.1.0" -dependencies = [ - "anyhow", - "bellpepper", - "bellpepper-core", - "bincode", - "bitvec", - "byteorder", - "cfg-if", - "criterion", - "digest", - "expect-test", - "ff", - "flate2", - "generic-array 1.1.0", - "getrandom", - "group", - "grumpkin-msm", - "halo2curves", - "handlebars", - "hex", - "itertools 0.13.0", - "neptune", - "num-bigint 0.4.6", - "num-integer", - "num-traits", - "once_cell", - "pairing", - "pprof", - "proptest", - "rand", - "rand_chacha", - "rand_core", - "rayon", - "rayon-scan", - "ref-cast", - "serde", - "serde_json", - "sha2", - "sha3", - "static_assertions", - "subtle", - "tap", - "thiserror", - "tracing", - "tracing-subscriber", - "tracing-test", - "tracing-texray", - "vergen", -] - [[package]] name = "quick-error" version = "1.2.3" diff --git a/Cargo.toml b/Cargo.toml index cb1f1e1..b4c3098 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/supernova/mod.rs b/src/supernova/mod.rs index 186c5a1..ea93afa 100644 --- a/src/supernova/mod.rs +++ b/src/supernova/mod.rs @@ -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 { + 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>, aux_params: AuxParams) -> Self { @@ -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::::new();