-
Notifications
You must be signed in to change notification settings - Fork 48
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
Nullifier map optimization #349
Conversation
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.
lgtm
nullifier: &Self::Nullifier, | ||
decryption_key: &Self::DecryptionKey, | ||
) -> bool { | ||
self.open(nullifier, decryption_key).is_some() |
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.
layman question: is there some way to check it can be opened without actually opening it ?
@@ -75,6 +78,16 @@ where | |||
Extend::extend(self, items) | |||
} | |||
|
|||
#[inline] | |||
fn remove(&mut self, item: &T) -> bool { |
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.
btw why was the vector impl needed ?
Seems we're mostly looking up and removing, so the hashset should be better.
Frees the signer memory from holding every nullifier. Now it only holds the user's nullifiers if they haven't been spent yet.
Goes together with Manta-Network/sdk#129
Before we can merge this PR, please make sure that all the following items have been checked off:
CHANGELOG.md
and added the appropriatechangelog
label to the PR.Files changed
in the GitHub PR explorer.CONTRIBUTING.md
.