Nova serde
dmpierre opened this issue · 0 comments
dmpierre commented
We want to be able to add serde capabilities to struct Nova
. This enables us to checkpoint in case of failures and, when needed, to stop and re-start proving whatever long-running job.
A review of what's needed for the different fields of struct Nova
:
R1CS
and PoseidonConfig
We don't need to serialize R1CS
and PoseidonConfig
.They are deterministically generated from user provided values (e.g. a file path or security parameters). User simply has to make sure he is providing the correct values again.
Serializing ProverParams
KZG
: For theProverKey
, we are using a custom struct, which is basically the same as the one found inark-poly-commit-0.4.0
. Hence, re-use what is found withinark-poly-commit-0.4.0
for thePowers
struct. TheVerifierKey
is imported fromark-poly-commit-0.4.0
and already implements serde methods.Pedersen
: Since we will serializeC::Affine
points, this will be the same as serializing KZGProverParams
.
Remaining fields
Serializing the Witness<C1>
, CommittedInstance<C: CurveGroup>
fields is the same as serializing KZG
since they both consist in C::Affine
points.