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: read and write prover public setup parameters from file #221

Merged
merged 7 commits into from
Oct 7, 2024

Conversation

Dustin-Ray
Copy link
Contributor

@Dustin-Ray Dustin-Ray commented Oct 5, 2024

Rationale for this change

The PublicParameters setup phase involves the calculation of multiple large vectors of group elements in order to instantiate the argument system. The setup phase can potentially be costly in some configurations. The setup phase is transparent and can be cached for later use. This PR adds support for file i/o for PublicParameters along with serde.

Currently the file i/o and serialization are gated behind std in order to conform to a no_std requirement. There might be a more appropriate way to handle this, but currently this allows std enabled test code to easily generate a setup of a configurable size.

What changes are included in this PR?

  • use ark_serialize to implement serde over Vec<G1/G2> affine
  • read and write serialization from a file
  • verify no_std compatibility or gate file generation feature behind std feature perhaps since file ops are trickier in no_std

Are these changes tested?

  • round trip serialization and expected values
  • round trip serialization + file i/o with benches

@Dustin-Ray Dustin-Ray force-pushed the feat/prover-public-params-file-ops branch from 844c9b4 to f36b7ec Compare October 5, 2024 22:11
docs

docs

docs

gate file generation behind test feature

tests

tests

fix: file io and checks

script
@Dustin-Ray Dustin-Ray force-pushed the feat/prover-public-params-file-ops branch from b308678 to 856b238 Compare October 6, 2024 00:11
@Dustin-Ray Dustin-Ray marked this pull request as ready for review October 6, 2024 00:13
Copy link
Contributor

@iajoiner iajoiner left a comment

Choose a reason for hiding this comment

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

Really thanks @Dustin-Ray !

@iajoiner iajoiner merged commit b26ce1b into main Oct 7, 2024
10 checks passed
@iajoiner iajoiner deleted the feat/prover-public-params-file-ops branch October 7, 2024 23:30
Copy link

github-actions bot commented Oct 7, 2024

🎉 This PR is included in version 0.28.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants