-
Notifications
You must be signed in to change notification settings - Fork 2
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: integrated rln-v2 into wakuRlnRegistry #11
base: main
Are you sure you want to change the base?
Conversation
contracts are deployed, sepolia etherscan is under maintenance so will verify after. |
LCOV of commit
|
LCOV of commit
|
LCOV of commit
|
LCOV of commit
|
LCOV of commit
|
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, looking good. Left a minor comment.
I would wait to merge until it is clearer the way to go with RLN.
uint256 len = idCommitments.length; | ||
for (uint256 i = 0; i < len; ) { | ||
_register(idCommitments[i]); | ||
function register(uint256[] calldata commitments, uint256[] calldata limits) |
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.
perhaps nitpick:
register(uint256[] calldata idCommitments, uint256[] calldata userMessageLimits)
instead of commitments
, limits
so its easier to see that it maps to
register(uint256 idCommitment, uint256 userMessageLimit)
- idCommitment -> idCommitments
- userMessageLimit -> userMessageLimits
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.
will make that change 👍
unchecked { | ||
++i; | ||
} | ||
} | ||
} | ||
|
||
function register(uint256 idCommitment) external payable override { | ||
revert NotImplemented(); | ||
function register(uint256 idCommitment, uint256 userMessageLimit) external payable override { |
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.
The business logic here is still very unclear, but perhaps we should support a fixed a mount of values? eg require userMessageLimit
to be [100, 1000, 10000]
and somehow connect it to the payable amount. eg 10000 is more expensive than 1000.
(just thinking out loud)
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's how it's been implemented in rln-contract. it's a simple constructor value change if we decide to make it payable.
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.
re: tiers, is that a requirement from waku's side? if so, can add that. with rln-v2 the message limit is kept private when generating proofs so everyone is part of the same anonymity set
LCOV of commit
|
@@ -1,5 +1,5 @@ | |||
{ | |||
"address": "0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4", | |||
"address": "0xABd93f37833107eDbAb58633ad5463aDEa1F95F4", |
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.
imho the point of having a proxy is that if we deploy a new contract, the proxy address does not change (nwaku nodes can point to the same address, with no changes) but the underlying implementation changes (points to new contract).
not sure its the case with this?
our rlnv1 proxy is 0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4. can we keep that in future deployments and you change the contract that it points to? rlnv1, v2, or any other mod?
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 needed to deploy a separate instance to test against without breaking the existing deployment
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.
A simple skip: true
is enough for it to use the old deployment
LCOV of commit
|
…-url Add RPC URL option for a localhost network deployment
Integrates rln-v2 into WakuRln.sol and WakuRlnRegistry. yet to add more test vectors.