-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update to RLN v2 #21
Update to RLN v2 #21
Conversation
alrevuelta
commented
May 21, 2024
•
edited
Loading
edited
- Updates to support RLN v2
- Changes:
- x86: chore: bump zerokit to v0.5.0 including RLN v2 go-zerokit-rln-x86_64#4
- apple: chore: bump zerokit to v0.5.0 including RLN v2 go-zerokit-rln-apple#6
- arm: chore: bump zerokit to v0.5.0 including RLN v2 go-zerokit-rln-arm#4
rln/rln.go
Outdated
func (r *RLN) MembershipKeyGen() (*IdentityCredential, error) { | ||
// Accepts an optional parameter that sets the user message limit which defaults | ||
// to DEFAULT_USER_MESSAGE_LIMIT | ||
func (r *RLN) MembershipKeyGen(params ...uint32) (*IdentityCredential, error) { |
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 wonder if it wouldnt be better to rename params
to userMessageLimit`?
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.
indeed 5bd2a08
rln/rln.go
Outdated
if len(proofBytes) != 288 { | ||
return nil, fmt.Errorf("invalid proof generated. size: %d expected: 288", |
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.
Since 288 is used both in this and next line, it's probably better to extract to a constant and then the error should be fmt.Errorf("invalid proof generated. size: %d expected: %d", len(proofBytes), yourConstant)
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.
right! 5bd2a08
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. Just left a couple of nitpicks that shouldnt stop merging this PR
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, after Richard's comments are addressed!