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] Make selector compression optional #15

Merged
merged 7 commits into from
Sep 20, 2023

Conversation

jonathanpwang
Copy link
Collaborator

This PR does the following:

  • Addresses Update serialization format according to upstream privacy-scaling-explorations/halo2#176 by adding a version byte to vkey serialization.
  • Adds keygen_vk_custom function where user can choose whether to turn on selector compression(=combination) or not.
    • In halo2-axiom, keygen_vk will be set so the default is no selector compression.
  • When selector compression is off, the VerifyingKey does not need to store anything about selectors. After keygen_vk_custom, the ConstraintSystem has entirely replaced selectors with fixed columns, and fixed commitments have been updated. The verify_proof function does not use selectors in any way. In keygen_pk you still need to know about selectors, but it reconstructs the ConstraintSystem from scratch anyways.
  • I think I've modified the VerifyingKey::read and write functions accordingly, where there is now a new byte recording whether selector compression is on or off. When off, I skip serializing selectors since they are unnecessary for reasons mentioned above.

@jonathanpwang jonathanpwang merged commit 1bab887 into main Sep 20, 2023
8 checks passed
@jonathanpwang jonathanpwang deleted the feat/optional_selector_compression branch September 20, 2023 17:10
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.

1 participant