-
Notifications
You must be signed in to change notification settings - Fork 54
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-relay): modify keystore credentials logic #1956
Conversation
This PR may contain changes to configuration options of one of the apps. If you are introducing a breaking change (i.e. the set of options in latest release would no longer be applicable) make sure the original option is preserved with a deprecation note for 2 following releases before it is actually removed. Please also make sure the label |
You can find the image built from this PR at
|
fix: bump version
18ea5db
to
9f9db43
Compare
@vpavlin does this apply to experimental non-mandatory flags too? ( |
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! great improvement.
Had issues compiling with mac M1 (make rln-keystore-generator) but managed to compile it with:
The tool seems to generate the keystore fine! nitpick trace by default |
@alrevuelta can you paste the trace here? (perhaps missed the RLN=true flag?) |
|
yeah, missing the rln=true flag! |
I see. Shouldn't it be implicit in "make rln-keystore-generator"? |
creating pr for it |
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 PR is wonderful, thanks for it !
I only added a few comments. It is especially important that we need to inform the users when a parameter is being deprecated.
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
Description
This PR includes the modification to the waku_rln_keystore lib, where instead of credentials being sorted according to
membership contract etc, we store it as a k-v pair, the key being
sha256(chainId|contractAddress|treeIndex)
When the user starts a new
wakunode
, we hash the 3 together, and check if the corresponding credentials exist, if not,we error out.
The same goes for the
rln_keystore_generator
This brings significant performance gains since reads are O(1) instead of O(n)
Changes
waku_rln_keystore
according to the changes abovewaku_rln_relay
to work with new changes in the keystorerln_keystore_generator
to work with new changes in the keystoreImportant
This is a breaking change to existing keystores, and the version has been incremented to 0.2
How to test
rln_keystore_generator
wakunode2
replace url and private-key as required in both snippets
the
--rln-relay-membership-index
is found after therln_keystore_generator
executesIssue
closes #1922