forked from lurk-lang/arecibo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some Type simplifications (lurk-lang#297)
* refactor: Reorder generic parameters across all SNARK methods and structs 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. * feat: Implement CurveCycleEquipped for various engines - 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'. * refactor: Refactor SNARK parameters and update related functions - 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. * chore: remove type boilerplate * refactor: Refactor supernova for single engine parameters and simplified 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. * refactor: Refactor engine parameterization in circuit tests - 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. * chore: rename SecEng -> Dual * docs: Improve code readability and testing robustness - Improved readability of CurveCycleEquipped function comment in traits module by adding backticks around function name.
- Loading branch information
1 parent
d2479f2
commit 788e878
Showing
16 changed files
with
651 additions
and
917 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.