-
Notifications
You must be signed in to change notification settings - Fork 58
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
[PoC] feat: moving to shared store references #680
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
huitseeker
force-pushed
the
immut_store
branch
from
September 18, 2023 14:56
fd23720
to
2a00625
Compare
huitseeker
force-pushed
the
immut_store
branch
2 times, most recently
from
September 18, 2023 17:39
62e0390
to
aafda56
Compare
!benchmark |
arthurpaulino
force-pushed
the
immut_store
branch
from
September 18, 2023 21:16
f30fdda
to
e7f73fd
Compare
huitseeker
force-pushed
the
immut_store
branch
from
September 19, 2023 04:21
e7f73fd
to
0004c04
Compare
!benchmark |
Benchmark for e9bfd6bClick to view benchmark
|
huitseeker
force-pushed
the
immut_store
branch
2 times, most recently
from
September 24, 2023 23:20
499841d
to
bee158f
Compare
benchmark! |
!benchmark |
Are we going to depend on that branch of our |
Wait, this branch lost my last commit |
!benchmark |
Benchmark for 55c17c5Click to view benchmark
|
- Removed the `src/cache_map.rs` file and `cache_map` module from the codebase. - Replaced the use of `CacheMap` with `FrozenMap` from the `elsa` crate in the `PoseidonCache` and `Store` structures across multiple files. - Added `elsa` dependency, version `1.9.0`, with `indexmap` feature to the `Cargo.toml` file. - `CacheMap` imports throughout the codebase have been removed and replaced with imports of `elsa::sync::FrozenMap`.
- Removed mutability modifier from `store` variable
arthurpaulino
force-pushed
the
immut_store
branch
from
September 26, 2023 12:41
519b033
to
9c416ad
Compare
huitseeker
force-pushed
the
immut_store
branch
from
September 26, 2023 14:37
9c416ad
to
8f1a935
Compare
huitseeker
force-pushed
the
immut_store
branch
from
September 26, 2023 14:37
8f1a935
to
efa47ab
Compare
gabriel-barrett
approved these changes
Sep 26, 2023
johnchandlerburnham
approved these changes
Sep 26, 2023
emmorais
approved these changes
Sep 26, 2023
arthurpaulino
approved these changes
Sep 26, 2023
samuelburnham
approved these changes
Sep 26, 2023
This line won't let us merge w/o override, I'll take it upon myself to bypass reqs: |
huitseeker
added a commit
to huitseeker/lurk-rs
that referenced
this pull request
Sep 27, 2023
Mutability leftovers (see lurk-lab#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.
huitseeker
added a commit
to huitseeker/lurk-rs
that referenced
this pull request
Sep 27, 2023
Mutability leftovers (see lurk-lab#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.
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 <[email protected]>
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.
#629 needs some modularity in order to be carried out safely, but both implementations of
Multiframe
(in Lurk and in the LEM module) embark an&'a Store
reference. https://github.com/huitseeker/lurk-rs/tree/lem-integration-review points the direction to suh modularity, but shows that we like to interleave evaluation (needs a&mut Store
) and proving (needs a&'a Store
), which makes defining any function doing both (requires&'a mut Store
), i.e. lifetimed mutable store references unwieldy.In a nutshell:
To circumvent this limitation, we implement a sync variant of elsa's
IndexMap
, which only requires shared references for an append-only structure.Edit: benches show
20%15% slowdown on evaluation (predictably: everything in the store is boxed), hydration is of course worse, no impact on proof/verif/store bencheshttps://gist.github.com/huitseeker/3c7205dd6c9e1025f7dace4a6c6e5b73https://gist.github.com/huitseeker/250e5fde3d72efdd9337e3606b1ca148