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

refactor: bundled-proving-keys #3337

Merged
merged 9 commits into from
Nov 17, 2023
Merged

refactor: bundled-proving-keys #3337

merged 9 commits into from
Nov 17, 2023

Conversation

TalDerei
Copy link
Collaborator

@TalDerei TalDerei commented Nov 15, 2023

References #2712. A new LazyProvingKey type is introduced to represent the proving keys. The limitation with the former Lazy type was that Lazy::new() expects a closure. This ultimately creates a tight coupling with the declaration of a static lazy variable and its initialization. The LazyProvingKey enables this separation based on the conditional bundled-proving-keys feature.

This will further reduce the wasm binary size to only include the verification keys, originally from ~90MB to a few MB.

@TalDerei TalDerei changed the title refactor: loading proving keys refactor: loading proving keys and reducing wasm binary size Nov 15, 2023
@TalDerei TalDerei changed the title refactor: loading proving keys and reducing wasm binary size refactor: load proving keys and reduce wasm binary size Nov 15, 2023
@hdevalence
Copy link
Member

This will further reduce the wasm binary size to only include the verification keys, originally from ~90MB to a few MB.

Nice!!!!

@TalDerei TalDerei changed the title refactor: load proving keys and reduce wasm binary size refactor: bundled-proving-keys Nov 15, 2023
Copy link
Member

@redshiftzero redshiftzero left a comment

Choose a reason for hiding this comment

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

thanks for picking this up!

crates/crypto/proof-params/src/lib.rs Outdated Show resolved Hide resolved
crates/crypto/proof-params/src/lib.rs Outdated Show resolved Hide resolved
@TalDerei TalDerei marked this pull request as ready for review November 16, 2023 00:39
Copy link
Member

@redshiftzero redshiftzero left a comment

Choose a reason for hiding this comment

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

great!

crates/core/component/dex/src/swap/plan.rs Outdated Show resolved Hide resolved
This ensures that proving keys are always checked against hardcoded hashes,
regardless of source.
@hdevalence
Copy link
Member

@TalDerei This looks great! I added another commit that merges the check-ID behavior from the existing load_proving_keys method so that we know that proving keys are always loaded with the correct values, if they're loaded at all.

@hdevalence hdevalence merged commit e7e9633 into main Nov 17, 2023
6 checks passed
@hdevalence hdevalence deleted the lazy-proving-key branch November 17, 2023 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants