Add serde proof serialization (#123)

* Bump commit.

* Bump commit.

* (WIP) Add serde support

* Minor fixes

* Use neptune const generics

* Use git patches

* Impl serde for CompressedSNARK

* Update dependencies, revert to typenum

* Formatting

* Update bellperson-nonnative patch

* Cleanup

* Remove bellperson-nonnative fork

* Switch back to fil_pasta_curves

* Update forked dependencies

* Cleanup

* Remove unnecessary patch

* Update to lurk-pasta-msm

---------

Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
This commit is contained in:
Samuel Burnham
2023-01-31 13:01:08 -05:00
committed by GitHub
parent 0b2b984fd1
commit 13964b6f16
13 changed files with 93 additions and 37 deletions

View File

@@ -35,12 +35,15 @@ use nifs::NIFS;
use r1cs::{
R1CSGens, R1CSInstance, R1CSShape, R1CSWitness, RelaxedR1CSInstance, RelaxedR1CSWitness,
};
use serde::{Deserialize, Serialize};
use traits::{
circuit::StepCircuit, snark::RelaxedR1CSSNARKTrait, AbsorbInROTrait, Group, ROConstants,
ROConstantsCircuit, ROConstantsTrait, ROTrait,
};
/// A type that holds public parameters of Nova
#[derive(Serialize, Deserialize)]
#[serde(bound = "")]
pub struct PublicParams<G1, G2, C1, C2>
where
G1: Group<Base = <G2 as Group>::Scalar>,
@@ -152,7 +155,8 @@ where
}
/// A SNARK that proves the correct execution of an incremental computation
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(bound = "")]
pub struct RecursiveSNARK<G1, G2, C1, C2>
where
G1: Group<Base = <G2 as Group>::Scalar>,
@@ -497,7 +501,8 @@ where
}
/// A SNARK that proves the knowledge of a valid `RecursiveSNARK`
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(bound = "")]
pub struct CompressedSNARK<G1, G2, C1, C2, S1, S2>
where
G1: Group<Base = <G2 as Group>::Scalar>,