-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add IVCProof to the existing folding schemes (Nova,HyperNova,ProtoGalaxy) #167
Conversation
HyperNova, ProtoGalaxy), so that the FoldingScheme IVC's instance can be constructed from the given parameters and the last IVCProof, which allows to sent the IVCProof between different parties, so that they can continue iterating the IVC from the received IVCProof. Also the serializers allow for the IVCProof to be sent to a verifier that can deserialize it and verify it. This allows to remove the logic from the file [folding/nova/serialize.rs](https://github.com/privacy-scaling-explorations/sonobe/blob/f1d82418ba047cf90805f2d0505370246df24d68/folding-schemes/src/folding/nova/serialize.rs) and [folding/hypernova/serialize.rs](https://github.com/privacy-scaling-explorations/sonobe/blob/f1d82418ba047cf90805f2d0505370246df24d68/folding-schemes/src/folding/hypernova/serialize.rs) (removing the whole files), which is now covered by the `IVCProof` generated serializers (generated by macro instead of handwritten), and the test that the file contained is now abstracted and applied to all the 3 existing folding schemes (Nova, HyperNova, ProtoGalaxy) at the folding/mod.rs file.
…to save big part of the old serialized size
9e4ca2f
to
70a4d77
Compare
…erification works with deserialized data
…zation (for all Nova, HyperNova and ProtoGalaxy), without serializing the R1CS/CCS and thus saving substantial serialized bytes space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is neat! I have one question about keeping the implementation of a serializer trait. Apart from that, this PR removes quite a lot, nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!! Nice work!!!
Add IVCProof to the existing folding schemes (Nova,HyperNova,ProtoGalaxy), with serializers (by macro).
Implement
from_ivc_proof
for the FoldingSchemes trait (and Nova, HyperNova, ProtoGalaxy), so that the FoldingScheme IVC's instance can be constructed from the given parameters and the last IVCProof, which allows to sent the IVCProof between different parties, so that they can continue iterating the IVC from the received IVCProof.Also the serializers allow for the IVCProof to be sent to a verifier that can deserialize it and verify it.
This allows to remove the logic from the file folding/nova/serialize.rs (removing the whole file), which is now covered by the
IVCProof
generated serializers (generated by macro instead of handwritten), and the test that the file contained is now abstracted and applied to all the 3 existing folding schemes (Nova, HyperNova, ProtoGalaxy) at the folding/mod.rs file.It updates too the
IVC::verify
interface so that now it takes less parameters as inputs (basically the new IVCProof).Also, update Nova VerifierParams serializers to avoid serializing the R1CS to save big part of the old serialized size (several MBs reduced).
The main improvement is that now we have the data structure of
IVCProof
which is portable (serializable) between different machines, so that one prover can send their current IVC state with the IVCProof to another one, and the second prover can continue the IVC folding, and eventually generate the Decider compressed zkSNARK proof for a verifier to verify it (or even send the plain IVCProof to a verifier). This also allows to remove the serializers of the Nova & HyperNova structs.And also it adds a unified interface for deserializing the FoldingSchemes::ProverParam & VerifierParam.