Add serde capabilites to Nova (#107)

* feat: `Nova` can be serialized and deserialized

* chore: (temp) allow dead code as serde is not yet used

* fix: require trait in `where` to not increase restrictions on
`CommitmentScheme`

* feat: add file with nova serialization methods

* fix: change call to get poseidon config and chore: update traits for serde

* chore: remove clang install from CI, move tests and remove unnecessary
allow

* feat: remove serializing r1cs and cs params and provide them at
deserialization time

* chore: initialize r1cs within deserialization function directly
This commit is contained in:
Pierre
2024-06-10 11:24:01 +02:00
committed by GitHub
parent 5ea55cf54e
commit bdfaa66ecb
7 changed files with 318 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ use ark_ec::CurveGroup;
use ark_ff::Field;
use ark_r1cs_std::{boolean::Boolean, groups::GroupOpsBounds, prelude::CurveVar};
use ark_relations::r1cs::SynthesisError;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::Zero;
use ark_std::{rand::RngCore, UniformRand};
use core::marker::PhantomData;
@@ -18,7 +19,7 @@ pub struct Proof<C: CurveGroup> {
pub r_u: C::ScalarField, // blind
}
#[derive(Debug, Clone, Eq, PartialEq)]
#[derive(Debug, Clone, Eq, PartialEq, CanonicalSerialize, CanonicalDeserialize)]
pub struct Params<C: CurveGroup> {
pub h: C,
pub generators: Vec<C::Affine>,