-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: use identity credentials, and expose hash, bulk insert and delete members functions #58
Conversation
15c0794
to
2bc0ec2
Compare
@rymnc, Also, something slightly concerning is that executing all the test units is taking a lot of time. The whole test suite takes now 4 minutes.
|
@richard-ramos we could revert the offending commit. Are the tests slow with a working version of zerokit? |
This PR vacp2p/zerokit#153 reverts the specific lines causing the issue. I'll try to identify which PR slows down the tests |
@rymnc, To test this out I did the following:
To speed up the testing process, you can remove all |
…te members functions Also update the resources and karma.conf because proof generation is taking longer than usual
2bc0ec2
to
f20bdbb
Compare
This PR is ready for reviewing now! :) |
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.
Looks good, only thing is that we'll need to follow up by updating the example.
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.
Looks good.
README.md
Outdated
@@ -70,24 +70,24 @@ import * as rln from "@waku/rln"; | |||
const rlnInstance = await rln.create(); | |||
``` | |||
|
|||
### Generating RLN Membership Keypair | |||
#### Generating RLN membership credentials |
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.
formatting nitpick
#### Generating RLN membership credentials | |
#### Generating RLN Membership Credentials |
example/index.js
Outdated
@@ -1,7 +1,7 @@ | |||
import * as rln from "@waku/rln"; | |||
|
|||
rln.create().then(async rlnInstance => { | |||
let memKeys = rlnInstance.generateMembershipKey(); | |||
let credentials = rlnInstance.generateIdentityCredentials(); |
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.
let credentials = rlnInstance.generateIdentityCredentials(); | |
const credentials = rlnInstance.generateIdentityCredentials(); |
no?
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.
Also, didn't you/we said we could remove this example? cc @weboko
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.
That was on js-noise, although I think we can remove it here 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.
Before we were talking about noise
's example.
We can remove that one but I'd keep it since it helps to test changes in one repo.
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@waku/rln", | |||
"version": "0.0.14", | |||
"version": "0.1.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.
Big bump :)
Probably time to sort out automated release management?
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.
Was thinking about it as well. I can duplicate from js-waku
to other repos or (just saying) we can move all waku
libs to js-waku
repo.
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.
I think until we expect someone to use RLN in prod we leave it out. We can then reconsider when RLN is used beyond POCs
this.zkRLN, | ||
seedBytes | ||
); | ||
return MembershipKey.fromBytes(memKeys); | ||
return IdentityCredential.fromBytes(memKeys); |
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.
is there a difference between Identity Credentials and Credentials?
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.
Originally MembershipKey
only had IDKey
and IDCommitment
but in waku-org/nwaku#1466 this structure was renamed to IdentityCredential and added 2 new attributes to it (IDTrapdoor and IDNullifier) and renamed IDKey
to IDSecretHash
. For the sake of making it easier to compare js-rln with nwaku rln implementation I decided to rename it as well.
Since this is a breaking change I ended up creating a new minor version instead of just bumping up the revision
bc4e98b
to
c6cb75f
Compare
Requires:
hash
,poseidon_hash
anddelete_leaf
vacp2p/zerokit#148