Skip to content

Added serialization support for compatibility with latest plonky2 head#3

Open
cf wants to merge 2 commits into0xPolygonZero:mainfrom
cf:main
Open

Added serialization support for compatibility with latest plonky2 head#3
cf wants to merge 2 commits into0xPolygonZero:mainfrom
cf:main

Conversation

@cf
Copy link

@cf cf commented Jun 27, 2023

Added serialization support for generators which implement SimpleGenerator (required to use this package with the latest plonky2:HEAD):

  • NonNativeAdditionGenerator
  • NonNativeMultipleAddsGenerator
  • NonNativeSubtractionGenerator
  • NonNativeMultiplicationGenerator
  • NonNativeInverseGenerator
  • GLVDecompositionGenerator
  • BigUintDivRemGenerator

@jorgeantonio21
Copy link

jorgeantonio21 commented Sep 20, 2023

This is great and much appreciated ! It would be great to have this one get in ! @dlubarov, @npwardberkeley

Copy link
Contributor

@npwardberkeley npwardberkeley left a comment

Choose a reason for hiding this comment

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

Looks good for the most part!

pub fn get_limb(&self, i: usize) -> U32Target {
self.limbs[i]
}
pub fn write_to_serializer(&self, dst: &mut Vec<u8>) -> IoResult<()> {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: spacing between functions

plonky2 = { version = "0.1.2", default-features = false }
plonky2_u32 = { version = "0.1.0", default-features = false }
plonky2 = { git = "https://github.com/mir-protocol/plonky2", rev = "3de92d9ed1721cec133e4e1e1b3ec7facb756ccf", default-features = false }
plonky2_u32 = { git = "https://github.com/cf/plonky2-u32", rev = "5b3cb748be32844ae449c62eae6f08278e4b4911", default-features = false }
Copy link
Contributor

Choose a reason for hiding this comment

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

For all of these (especially your forked repo here), is there a reason for using these specific commits?

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.

3 participants