Closed
Conversation
Contributor
Author
|
BTW we also have a preliminary branch to do PST on the other base - commit in G2 opening in G1 - if you are interested |
|
had a look at the multilinear PST, lgtm |
mmagician
requested changes
Feb 8, 2023
Member
mmagician
left a comment
There was a problem hiding this comment.
mostly looks good! I left a few cleanup comments
Comment on lines
+83
to
+84
| fn serialize_uncompressed<W: Write>(&self, writer: W) -> Result<(), SerializationError> { | ||
| Self::serialize_with_mode(&self, writer, Compress::No) |
Member
There was a problem hiding this comment.
We can skip this, as the default in ark-serialize is already using:
self.serialize_with_mode(writer, Compress::No)
| self.h.serialize_uncompressed(&mut writer)?; | ||
| self.beta_h.serialize_uncompressed(&mut writer)?; | ||
| self.neg_powers_of_h.serialize_uncompressed(&mut writer) | ||
| fn serialize_compressed<W: Write>(&self, writer: W) -> Result<(), SerializationError> { |
Comment on lines
+129
to
+143
| fn deserialize_uncompressed<R: Read>(mut reader: R) -> Result<Self, SerializationError> { | ||
| Self::deserialize_with_mode(&mut reader, Compress::No, ark_serialize::Validate::Yes) | ||
| } | ||
| fn deserialize_compressed<R: Read>(mut reader: R) -> Result<Self, SerializationError> { | ||
| Self::deserialize_with_mode(&mut reader, Compress::Yes, ark_serialize::Validate::Yes) | ||
| } | ||
| fn deserialize_compressed_unchecked<R: Read>( | ||
| mut reader: R, | ||
| ) -> Result<Self, SerializationError> { | ||
| Self::deserialize_with_mode(&mut reader, Compress::Yes, ark_serialize::Validate::No) | ||
| } | ||
| fn deserialize_uncompressed_unchecked<R: Read>( | ||
| mut reader: R, | ||
| ) -> Result<Self, SerializationError> { | ||
| Self::deserialize_with_mode(&mut reader, Compress::No, ark_serialize::Validate::No) |
| fn serialize_uncompressed<W: Write>(&self, mut writer: W) -> Result<(), SerializationError> { | ||
| self.powers_of_g.serialize_uncompressed(&mut writer)?; | ||
| self.powers_of_gamma_g.serialize_uncompressed(&mut writer) | ||
| fn serialize_compressed<W: Write>(&self, writer: W) -> Result<(), SerializationError> { |
| powers_of_g: Cow::Owned(powers_of_g), | ||
| powers_of_gamma_g: Cow::Owned(powers_of_gamma_g), | ||
| }) | ||
| fn deserialize_compressed<R: Read>(mut reader: R) -> Result<Self, SerializationError> { |
| prepared_h, | ||
| prepared_beta_h, | ||
| }) | ||
| fn deserialize_compressed<R: Read>(reader: R) -> Result<Self, SerializationError> { |
| self.beta_h.serialize_unchecked(&mut writer)?; | ||
| self.num_vars.serialize_unchecked(&mut writer)?; | ||
| self.max_degree.serialize_unchecked(&mut writer) | ||
| fn serialize_uncompressed<W: Write>(&self, mut writer: W) -> Result<(), SerializationError> { |
| self.num_vars.serialize_unchecked(&mut writer)?; | ||
| self.supported_degree.serialize_unchecked(&mut writer)?; | ||
| self.max_degree.serialize_unchecked(&mut writer) | ||
| fn serialize_uncompressed<W: Write>(&self, writer: W) -> Result<(), SerializationError> { |
| impl<E: Pairing> Valid for VerifierKey<E> { | ||
| fn check(&self) -> Result<(), SerializationError> { | ||
| if self.num_vars == 0 { | ||
| return Err(SerializationError::InvalidData); |
Member
There was a problem hiding this comment.
it's a shame we can't add an error message here. Perhaps it would be worthwhile to pass a message to SerializationError::InvalidData enum variant, but that requires an upstream change in ark-serialise. I'll open an issue on it, maybe we can improve it for the next release.
| + self.max_degree.serialized_size(compress) | ||
| } | ||
|
|
||
| fn serialize_compressed<W: Write>(&self, writer: W) -> Result<(), SerializationError> { |
Member
|
I moved the commits to #112, which is merged now; thanks everyone for the work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bring the crate to use ark_ec v0.4
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pendingsection inCHANGELOG.mdFiles changedin the Github PR explorer