privacy-scaling-explorations/sonobe

Nova serde

dmpierre opened this issue · 0 comments

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 the ProverKey, we are using a custom struct, which is basically the same as the one found in ark-poly-commit-0.4.0. Hence, re-use what is found within ark-poly-commit-0.4.0 for the Powers struct. The VerifierKey is imported from ark-poly-commit-0.4.0 and already implements serde methods.
  • Pedersen: Since we will serialize C::Affine points, this will be the same as serializing KZG ProverParams.

Remaining fields

Serializing the Witness<C1>, CommittedInstance<C: CurveGroup> fields is the same as serializing KZG since they both consist in C::Affine points.