-
Notifications
You must be signed in to change notification settings - Fork 53
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
chore(rln-relay): use the only key from keystore if only 1 exists #1984
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
|
3f0df22
to
8d21494
Compare
8d21494
to
735c57b
Compare
waku/waku_keystore/keystore.nim
Outdated
if keystoreCredentials.len == 1: | ||
for v in keystoreCredentials.getFields().values(): | ||
keystoreCredential = v |
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 is quite ugly - the compiler was throwing errors when i tried doing this -
keystoreCredential = keystoreCredentials.getFields().values()[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.
Isn't that because values() returns iterator, which means you'd have to turn it into seq
first before you can access the Nth element?
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.
thanks, addressed in 99b3fe6!
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! thanks!
Description
from the perspective of an end user, i will most likely have only one membership per chainId-contractAddress pair.
To account for this, we are removing
rln-relay-membership-index
as a compulsory argument to wakunode2, and instead, using theonly
available key in the keystoreChanges
Option
typeHow to test
0x0A988fd9CA5BAebDf098b8A73621b2AaDa6492E8
You should see that it is able to fetch the membership index from the decrypted keystore. Additionally, the rpc api is able to append proofs to messages as well.
Issue
Addresses a part of #1906