-
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): integrate waku rln registry #1943
Conversation
You can find the image built from this PR at
|
b241aa7
to
a6b3bb8
Compare
783d80a
to
269a2ff
Compare
269a2ff
to
7408bed
Compare
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 as far as I could follow :)
Out of curiosity - why is it removing the |
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
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!
@@ -168,18 +165,16 @@ proc setup(signer = true): Future[OnchainGroupManager] {.async.} = | |||
let web3 = await newWeb3(EthClient) | |||
|
|||
let accounts = await web3.provider.eth_accounts() | |||
web3.defaultAccount = accounts[1] | |||
web3.defaultAccount = accounts[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.
Shall we check the number of accounts is > 0?
web3.defaultAccount = accounts[0] | |
assert accounts.len > 0, "Not enough accounts retrieved" |
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.
Not neccesary (AFAIU:) ) - the web3.provider.eth_accounts()
is an RPC call to an ETH node which will return it the accounts that it knows of (in case of ganache it should be something liek 10 default well known accounts/wallets).
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.
correct, the eth_accounts will always be > 0, since we're using a test rpc provider - ganache
# proc registerBatch(pubkeys: seq[Uint256]) # external payable | ||
# proc withdraw(secret: Uint256, pubkeyIndex: Uint256, receiver: Address) | ||
# proc withdrawBatch( secrets: seq[Uint256], pubkeyIndex: seq[Uint256], receiver: seq[Address]) | ||
proc MEMBERSHIP_DEPOSIT(): Uint256 {.pure.} |
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.
Out of curiosity: why upper case :) ?
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 Nim file is just a wrapper for the contract ABI and in Solidity constants and immutable stored variables are usually capitalized - this particular "proc" is just a representation an automatically generated getter based on https://github.com/vacp2p/rln-contract/blob/bd8403a74e327707afb70e60f582e2546e487891/contracts/RlnBase.sol#L45
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 on point @vpavlin !
Description
This PR integrates waku's fork of the rln contracts - https://github.com/waku-org/waku-rln-contract
Which brings the registry, that serves as an entrypoint into the waku rln membership set, which can have multiple trees located within them
Changes
persistCredentials
from OnchainGroupManagerstartGroupSync
PoseidonHasher
andRegistryContractCode
usingStorageIndex
appropriately and subscribes to theusingStorageIndex
treeThis PR lays the foundation for 2 items -