arnaucube
arnaucube/NovaPublic Self-hosted repository
serde for types (#160)

Srinath Setty srinath@microsoft.com
Mon, 03 Apr 2023 18:54:00 -0700
commit

21d4092b86ad4560f807aec42c57b1ffef7025db

parent

83f2e079a807547c9c5e10fced56dc8c4dadd3a4

3 files changed, 11 insertions(+), 7 deletions(-)

jump to
M Cargo.toml → Cargo.toml

@@ -1,6 +1,6 @@

[package] name = "nova-snark" -version = "0.20.1" +version = "0.20.2" authors = ["Srinath Setty <srinath@microsoft.com>"] edition = "2021" description = "Recursive zkSNARKs without trusted setup"
M src/spartan/pp/mod.rs → src/spartan/pp/mod.rs

@@ -302,7 +302,7 @@ }

} /// A type that represents the memory-checking argument -#[derive(Serialize, Deserialize)] +#[derive(Clone, Serialize, Deserialize)] #[serde(bound = "")] pub struct MemcheckProof<G: Group> { sc_prod: ProductArgument<G>,

@@ -685,7 +685,7 @@ }

} /// A type that represents the prover's key -#[derive(Serialize, Deserialize)] +#[derive(Clone, Serialize, Deserialize)] #[serde(bound = "")] pub struct ProverKey<G: Group, EE: EvaluationEngineTrait<G, CE = G::CE>> { pk_ee: EE::ProverKey,

@@ -695,7 +695,7 @@ S_comm: R1CSShapeSparkCommitment<G>,

} /// A type that represents the verifier's key -#[derive(Serialize, Deserialize)] +#[derive(Clone, Serialize, Deserialize)] #[serde(bound = "")] pub struct VerifierKey<G: Group, EE: EvaluationEngineTrait<G, CE = G::CE>> { num_cons: usize,

@@ -707,7 +707,7 @@

/// A succinct proof of knowledge of a witness to a relaxed R1CS instance /// The proof is produced using Spartan's combination of the sum-check and /// the commitment to a vector viewed as a polynomial commitment -#[derive(Serialize, Deserialize)] +#[derive(Clone, Serialize, Deserialize)] #[serde(bound = "")] pub struct RelaxedR1CSSNARK<G: Group, EE: EvaluationEngineTrait<G, CE = G::CE>> { // outer sum-check

@@ -1356,6 +1356,8 @@ }

} /// A type that holds Spartan's prover key +#[derive(Clone, Serialize, Deserialize)] +#[serde(bound = "")] pub struct SpartanProverKey<G, EE> where G: Group,

@@ -1368,6 +1370,8 @@ pk: ProverKey<G, EE>,

} /// A type that holds Spartan's verifier key +#[derive(Clone, Serialize, Deserialize)] +#[serde(bound = "")] pub struct SpartanVerifierKey<G, EE> where G: Group,

@@ -1378,7 +1382,7 @@ vk: VerifierKey<G, EE>,

} /// A direct SNARK proving a step circuit -#[derive(Serialize, Deserialize)] +#[derive(Clone, Serialize, Deserialize)] #[serde(bound = "")] pub struct SpartanSNARK<G, EE, C> where
M src/spartan/pp/product.rs → src/spartan/pp/product.rs

@@ -163,7 +163,7 @@ }

} /// Provides a product argument using the algorithm described by Setty-Lee, 2020 -#[derive(Serialize, Deserialize)] +#[derive(Clone, Serialize, Deserialize)] #[serde(bound = "")] pub struct ProductArgument<G: Group> { comm_output_vec: Vec<Commitment<G>>,