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/hypernova serialization #159

Merged
merged 4 commits into from
Sep 19, 2024
Merged

feat/hypernova serialization #159

merged 4 commits into from
Sep 19, 2024

Conversation

dmpierre
Copy link
Collaborator

@dmpierre dmpierre commented Sep 12, 2024

Implements serde for hypernova prover and verifier params, proof and public inputs. Serding the ccs could make serialization costs increase quickly, so I did not implement the CanonicalDeserialize trait for Hypernova, ProverParams and VerifierParams.

For testing, I followed the same logic as what is being done in test_decider_serialization for nova. Testing is done here.

@dmpierre dmpierre linked an issue Sep 12, 2024 that may be closed by this pull request
@dmpierre dmpierre marked this pull request as ready for review September 16, 2024 09:13
@@ -309,4 +311,201 @@ pub mod tests {
assert!(verified);
println!("Decider verify, {:?}", start.elapsed());
}

#[test]
fn test_decider_serialization() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just not sure on why do we have timers in this test. We can just write formal benchmarks if we want any no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I just followed what was done with nova, I don't mind removing timers. I agree that we could initiate some benchmarks, but I'm not sure that's on the priority list right now? Wdyt? cc @arnaucube

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I use to place dbg! to know the timings while I test things, but agree with removing them.
Regarding benchmarks, I think that it's not a priority since we're still in the 'exploration phase' where things are not much optimized and we know for sure that are slower than they would be.

folding-schemes/src/folding/hypernova/serialize.rs Outdated Show resolved Hide resolved
folding-schemes/src/folding/hypernova/serialize.rs Outdated Show resolved Hide resolved
Copy link
Member

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks for this @dmpierre !

@arnaucube arnaucube added this to the Stabilize lib milestone milestone Sep 17, 2024
Copy link
Collaborator

@arnaucube arnaucube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!! LGTM ^^

@arnaucube arnaucube added this pull request to the merge queue Sep 19, 2024
Merged via the queue into main with commit 1947ab0 Sep 19, 2024
8 checks passed
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.

implement serialization&deserialization for hypernova structs
3 participants