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

Lem integration Review #707

Merged
merged 13 commits into from
Sep 26, 2023

Conversation

huitseeker
Copy link
Contributor

For posterity, this points the way towards a MultiFrame trait that can be implemented by LEM & Lurk

@huitseeker huitseeker requested review from a team as code owners September 26, 2023 20:36
huitseeker and others added 11 commits September 26, 2023 16:39
- Refactored the `MultiFrameTrait` by removing the lifetime parameter, which enhances flexibility and usability in more contexts.
- Updated function signatures across several files by changing lifetime-bound references to borrowed references, improving flexibility and reducing clone necessities for multiframes.
- Updated `MultiFrameTrait` implementation for `MultiFrame` and `NovaProver` with new types, methods and enhancements to frame handling, allowing better processing of hash functions and creation of witness circuit systems.
- Modified the `Groth16Prover` and `NovaProver` to handle the `MultiFrameTrait` without being lifetime-bound, potentially improving flexibility and usability.
- Renamed `NovaProver._p` to `NovaProver._phantom`.
- Refactored several `Store` references to become generic thereby moving away from lifetime annotation.
- Updated `LurkProof` enum in `lurk_proof.rs` to include a new `MultiFrameTrait` generic parameter and updated its verification methods to accommodate the new `nova::Proof` parameters.
* Remove unused implementation of `FrameLike` for LEM's `MultiFrame`
* Add interface `MultiFrameTrait::output` and implement it for both instances
- Removed `Prover` import and replaced its usage with a `padding_predicate` in `get_evaluation_frames` method of `src/circuit/circuit_frame.rs`.
- Modified `src/proof/mod.rs` and `src/lem/multiframe.rs` to pass a `padding_predicate` function to `get_evaluation_frames` to determine if the prover needs padding.
@huitseeker huitseeker force-pushed the lem-integration-review branch from ccc39e3 to 8212bb9 Compare September 26, 2023 20:42
@huitseeker huitseeker merged commit 7f92267 into lurk-lab:lem-integration Sep 26, 2023
huitseeker added a commit to huitseeker/lurk-rs that referenced this pull request Sep 27, 2023
- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see lurk-lab#629 (and its history, incl. lurk-lab#642, lurk-lab#707) and lurk-lab#677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,
huitseeker added a commit to huitseeker/lurk-rs that referenced this pull request Sep 27, 2023
- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see lurk-lab#629 (and its history, incl. lurk-lab#642, lurk-lab#707) and lurk-lab#677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,
huitseeker added a commit to huitseeker/lurk-rs that referenced this pull request Sep 27, 2023
- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see lurk-lab#629 (and its history, incl. lurk-lab#642, lurk-lab#707) and lurk-lab#677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,
huitseeker added a commit to huitseeker/lurk-rs that referenced this pull request Sep 27, 2023
- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see lurk-lab#629 (and its history, incl. lurk-lab#642, lurk-lab#707) and lurk-lab#677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,
huitseeker added a commit to huitseeker/lurk-rs that referenced this pull request Sep 27, 2023
- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see lurk-lab#629 (and its history, incl. lurk-lab#642, lurk-lab#707) and lurk-lab#677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,
huitseeker added a commit to huitseeker/lurk-rs that referenced this pull request Sep 27, 2023
- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see lurk-lab#629 (and its history, incl. lurk-lab#642, lurk-lab#707) and lurk-lab#677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,
huitseeker added a commit to huitseeker/lurk-rs that referenced this pull request Sep 27, 2023
- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see lurk-lab#629 (and its history, incl. lurk-lab#642, lurk-lab#707) and lurk-lab#677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,
huitseeker added a commit to huitseeker/lurk-rs that referenced this pull request Sep 27, 2023
- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see lurk-lab#629 (and its history, incl. lurk-lab#642, lurk-lab#707) and lurk-lab#677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,
huitseeker added a commit that referenced this pull request Sep 28, 2023
* feat: Introduce MultiFrame trait

Mutability leftovers (see #680)

- Updated benchmarking scripts to no longer mutate the `store` variable during evaluation frames retrieval.
- Reformed `get_evaluation_frames` method across several files to use immutable references to `store` instead of mutable references.

Multiframe definition

- Introduced several new traits - `CEKState`, `FrameLike`, `EvaluationStore` and `MultiFrameTrait` to manage complex evaluation and circuit proof operations in the `proof/mod.rs` file.
- Detailed implementations of the above traits introduced in `circuit/circuit_frame.rs`, providing methods for handling evaluation frames, synthesizing data from multiple frames and more.

* refactor: make nova proofs use the generic trait

- uses the generic MultiFrame trait introduced in the prior commit to generically prove using nova,
- For references on the latest work defining this trait, see #629 (and its history, incl. #642, #707) and #677.

- make the benches use the generic trait, so LEM can bench similarly,
- make the examples use the generic trait, so LEM can example similarly,
- make Supernova use the generic trait, so LEM can NIVC similarly,

* use a type alias to simplify test calls

---------

Co-authored-by: Arthur Paulino <arthurleonardo.ap@gmail.com>
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