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: Nova structs become generic on their field type (+ update Nova) #556

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

huitseeker
Copy link
Member

@huitseeker huitseeker commented Jul 21, 2023

What this Does

  • makes all of our Nova-related structures generic in the type of the used primary scalar field, provided that field can be attached to a curve cycle with the suitable properties (see CurveCyleEquipped trait)
  • sets up the curve cycle attachments for the pallas::Scalar and bn256::Scalar fields,
  • allows us to start using the Grumpkin cycle.

What This Does Not Do, but helps with (as the present PR is a blocker for those tasks)

In Detail

  • Implemented the CurveCycleEquipped trait, replacing previous curve-specific scalar types for improved generic programming over curve cycles.
  • Updated various files, including fcomm.rs, lurk_proof.rs, lib.rs and nova.rs to accommodate the new CurveCycleEquipped type.
  • Extended LanguageField enum with BN256 and Grumpkin values and updated respective fmt display.
  • Refactored the public_params function in public_parameters/mod.rs and registry.rs to use the new CurveCycleEquipped type.
  • Modified proofs in nova.rs to work with the new CurveCycleEquipped type.
  • Removed nova and pasta_curves::pallas dependencies from lurk-tests.rs and registry.rs respectively, demonstrating reduction in dependency.

Closes #519.

@huitseeker huitseeker requested a review from a team as a code owner July 21, 2023 18:54
@huitseeker huitseeker force-pushed the make_nova_generic branch 4 times, most recently from f796c6c to 5ee1226 Compare July 21, 2023 19:16
@huitseeker huitseeker changed the title [Do Not Merge Until Git Dependencies Removed] refactor: Refactor Nova struct to make them generic on the field type [Do Not Merge Until Git Dependencies Removed] refactor: Nova structs become generic on their field type Jul 21, 2023
- makes all of our Nova-related structures generic in the type of the used primary scalar field, provided the field can be attached to a curve cycle with the suitable properties
- sets up the curve cycle attachments for the pallas::Scalar and bn256::Scalar fields,
- allows us to start using bn256.

- making public parameter caching generic,
- making clutch generic, or supporting SnarkPack,
- making fcomm generic, or supporting SnarkPack,
- making the repl generic.

- Implemented the `CurveCycleEquipped` trait, replacing previous curve-specific scalar types for improved generic programming over curve cycles.
- Updated various files, including `fcomm.rs`, `lurk_proof.rs`, `lib.rs` and `nova.rs` to accommodate the new `CurveCycleEquipped` type.
- Extended `LanguageField` enum with `BN256` and `Grumpkin` values and updated respective `fmt` display.
- Refactored the `public_params` function in `public_parameters/mod.rs and registry.rs` to use the new `CurveCycleEquipped` type.
- Modified proofs in `nova.rs` to work with the new `CurveCycleEquipped` type.
- Removed `nova` and `pasta_curves::pallas` dependencies from `lurk-tests.rs` and `registry.rs` respectively, demonstrating reduction in dependency.
@huitseeker huitseeker changed the title [Do Not Merge Until Git Dependencies Removed] refactor: Nova structs become generic on their field type refactor: Nova structs become generic on their field type (+ update Nova) Jul 28, 2023
@huitseeker huitseeker added this pull request to the merge queue Jul 28, 2023
Merged via the queue into argumentcomputer:master with commit f36971e Jul 28, 2023
6 checks passed
@huitseeker huitseeker deleted the make_nova_generic branch July 28, 2023 20:12
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.

2 participants