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

upgrade halo2curves to 0.6.0 + changes to tests and benches #297

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

srinathsetty
Copy link
Collaborator

No description provided.

@srinathsetty srinathsetty changed the title upgrade halo2curves to 0.6.0 upgrade halo2curves to 0.6.0 + changes to tests and benches Jan 24, 2024
@srinathsetty srinathsetty merged commit 27c5ad1 into main Jan 24, 2024
6 checks passed
@srinathsetty srinathsetty deleted the upgrade branch January 24, 2024 02:14
huitseeker added a commit to huitseeker/Nova that referenced this pull request Feb 14, 2024
* 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.
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