arkworks-rs / snark

Interfaces for Relations and SNARKs for these relations
https://www.arkworks.rs
Apache License 2.0
776 stars 209 forks source link

Implementing deserialization for Proof, VerifyingKey, Parameters in GM17 #224

Closed ChaitanyaKonda closed 4 years ago

ChaitanyaKonda commented 4 years ago

Implementing fn read<R: Read>(mut _reader: R, _checked: bool) -> io::Result<Self> for Proof, VerifyingKey, Parameters in GM17. Currently they are unimplemented as shown below.

https://github.com/scipr-lab/zexe/blob/9b04691267687bc93beb96a1170d414e3b9182ef/gm17/src/lib.rs#L93 https://github.com/scipr-lab/zexe/blob/9b04691267687bc93beb96a1170d414e3b9182ef/gm17/src/lib.rs#L157 https://github.com/scipr-lab/zexe/blob/9b04691267687bc93beb96a1170d414e3b9182ef/gm17/src/lib.rs#L201

I, working for EY, have implemented working and tested code for this. Please let me know if I can submit a PR with this? Thank you

Pratyush commented 4 years ago

Hi @ChaitanyaKonda, does https://github.com/scipr-lab/zexe/pull/253 solve your issue? You can invoke {serialize,deserialize}_unchecked, and that should be pretty fast =).

ChaitanyaKonda commented 4 years ago

@Pratyush Yes it did, it was very quick indeed! A 40 decrease while deserializing Parameters 💯 Thank you !