-
Notifications
You must be signed in to change notification settings - Fork 36
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
Some Type simplifications #297
Merged
Merged
Conversation
This file contains 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
…ucts TL;DR: This is deinterleaving, i.e. E1, E2, C1, C2 .. becomes E1, C1, .. E2, C2, ... - Reorganized order of generic parameters across various rust function calls and implementations, affecting structures such as `PublicParams`, `RecursiveSNARK`, and `CompressedSNARK`, among others. - Updated all relevant unit tests to align with the new ordering of parameters.
- Introduced a new convenience trait to pair engines with fields in a curve cycle relationship, extending mod.rs traits. - Added CurveCycleEquipped to the provider mod.rs traits list. - Implemented CurveCycleEquipped to Bn256Engine, Bn256EngineKZG, Bn256EngineZM, Secp256k1Engine, and PallasEngine, setting respective secondary types accordingly. - Expanded functionality for multiple engine systems with the addition of a secondary engine of 'Self'.
- Refactored the bench, examples, and source files to simplify `PublicParams`, `CompressedSNARK`, and `RecursiveSNARK` setup by removing the redundant secondary engine type and circuit parameters. - Modified all functions, methods, and type definitions that depend on the `PublicParams`, `CompressedSNARK`, and `RecursiveSNARK` setup to reflect these changes. - Removed all (default) instances of `TrivialCircuit` parameters from the codebase, simplifying the setup process. - Renamed `SecEngine` to `SecEng`, - Adjustments were made to functions to reflect the updated parameters without changing the functionality or behavior of the code.
…ied testing TL;DR : use CurveCycle and remove Phantom parameters - Altered and simplified generic parameter restrictions for `NonUniformBench` and `NonUniformCircuit`. - Refactored import statements in `benches/common/supernova/mod.rs` for a cleaner and simplified codebase. - Refactored the use of `TrivialTestCircuit` from the `benches/common/supernova/bench.rs` file. - Revised the `RecursiveSNARK` type in `bench.rs`, - Refactored and simplified function signatures in `test.rs`, - Made significant changes to the `TestROM` structure and adjusted related function implementations within `src/supernova/test.rs`. - Overall, improved the use of generics.
- Simplified engine parameterization by replacing dual `E1` and `E2` variables with a single `E1` in relevant function definitions. - Enhanced code readability by changing type constraints to `CurveCycleEquipped` and implementing the `SecEng` projection across multiple function modules. - Updated calls and variable assignments to align with the new engine parameterization. - Retained original functionalities of the affected functions even with the considerable code modifications and simplifications.
huitseeker
requested review from
adr1anh,
porcuquine,
samuelburnham,
winston-h-zhang and
mpenciak
February 5, 2024 13:21
samuelburnham
previously approved these changes
Feb 5, 2024
porcuquine
previously approved these changes
Feb 5, 2024
huitseeker
dismissed stale reviews from porcuquine and samuelburnham
via
February 5, 2024 20:05
05cde95
- Improved readability of CurveCycleEquipped function comment in traits module by adding backticks around function name.
huitseeker
force-pushed
the
type_simplifications
branch
from
February 5, 2024 20:10
05cde95
to
0dc08a9
Compare
porcuquine
approved these changes
Feb 5, 2024
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.
Becomes
E1: CurveCycleEquiped
And
becomes
Note
Lurk is not expected to compile on top of this, Companion PR at lurk-lab/lurk-beta#1092