Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Serialize proofs #219

Merged
merged 11 commits into from
Mar 31, 2024
Merged

feat: Serialize proofs #219

merged 11 commits into from
Mar 31, 2024

Conversation

sragss
Copy link
Collaborator

@sragss sragss commented Mar 27, 2024

The strategy is to use ark_serialize::{CanonicalSerialize, CanonicalDeserialize} recursively as low as possible via macros. If we'd like to expose serde::Serialize we should do this at the highest level. If we try to do serde at a lower level we'll have to use serde's serialize_with on nearly every field.

The lack of compatibility between these two appears contentious:

Issues remaining:

  • Does not yet remove generators
  • R1CS proof contains the UniformSpartanKey which should not be in the proof, but rather "known" by the verifier

@sragss
Copy link
Collaborator Author

sragss commented Mar 27, 2024

The PR manually implements ark_serialize::{CanonicalSerialize, CanonicalDeserialize} for types including PhantomData<T>. I believe the macros will work for these as long as T: Send + Sync based on the arkworks default impls.

@sragss sragss requested a review from moodlezoup March 27, 2024 18:06
@sragss sragss marked this pull request as ready for review March 27, 2024 18:06
@sragss
Copy link
Collaborator Author

sragss commented Mar 27, 2024

T: Send + Sync strategy described above works.

@sragss sragss changed the title Serialize proofs feat: Serialize proofs Mar 31, 2024
@sragss sragss merged commit b64a375 into jolt Mar 31, 2024
@sragss sragss deleted the feat/serialize-proofs branch March 31, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants