-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix(rln): atomic operation edge case #195
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
rymnc
added
the
track:rln
RLN Track - (Secure Messaging/Applied ZK), relay and applications
label
Jul 31, 2023
rymnc
force-pushed
the
fix-atomic-operation-edge-case
branch
from
July 31, 2023 08:09
197b808
to
7f0ac87
Compare
Benchmark for 267d8c1Click to view benchmark
|
Benchmark for 267d8c1Click to view benchmark
|
Benchmark for 05e25b7Click to view benchmark
|
Benchmark for 0d064fbClick to view benchmark
|
Benchmark for 0d064fbClick to view benchmark
|
Benchmark for 05e25b7Click to view benchmark
|
Benchmark for 451a004Click to view benchmark
|
Benchmark for 451a004Click to view benchmark
|
Benchmark for 130fa23Click to view benchmark
|
Benchmark for 130fa23Click to view benchmark
|
Benchmark for f74dbfbClick to view benchmark
|
rymnc
commented
Jul 31, 2023
Comment on lines
+1529
to
+1540
let mut buffer = Cursor::new(Vec::<u8>::new()); | ||
rln.get_root(&mut buffer).unwrap(); | ||
let (root_after_deletion, _) = bytes_le_to_fr(&buffer.into_inner()); | ||
|
||
assert_ne!(root_after_insertion, root_after_deletion); | ||
|
||
// We get the leaf | ||
let mut output_buffer = Cursor::new(Vec::<u8>::new()); | ||
rln.get_leaf(set_index, &mut output_buffer).unwrap(); | ||
let (received_leaf, _) = bytes_le_to_fr(output_buffer.into_inner().as_ref()); | ||
|
||
assert_eq!(received_leaf, Fr::from(0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should address the edge case?
This reverts commit 396c2ec.
Benchmark for f06cb13Click to view benchmark
|
Benchmark for f06cb13Click to view benchmark
|
Benchmark for 5f01a8dClick to view benchmark
|
Benchmark for 5f01a8dClick to view benchmark
|
Benchmark for b44274dClick to view benchmark
|
Benchmark for b44274dClick to view benchmark
|
Benchmark for a11da1aClick to view benchmark
|
Benchmark for a11da1aClick to view benchmark
|
Benchmark for 60a8f16Click to view benchmark
|
Benchmark for 60a8f16Click to view benchmark
|
Benchmark for cc50d40Click to view benchmark
|
Benchmark for cc50d40Click to view benchmark
|
Benchmark for a91dfe5Click to view benchmark
|
Benchmark for a91dfe5Click to view benchmark
|
Benchmark for cfe3ae1Click to view benchmark
|
Benchmark for cfe3ae1Click to view benchmark
|
Finally resolved with @richard-ramos! 🚀 thanks for all the help debugging! |
richard-ramos
approved these changes
Aug 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
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.
Tracking from waku-org/go-zerokit-rln#12
This PR improves readability of the
override_range
fn, by matching on 4 input cases, and handles all of themappropriately.