-
Notifications
You must be signed in to change notification settings - Fork 4
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
Milestone: Secure, sound and stateful waku-rln-relay #144
Comments
LGTM |
Looks feasible to me. I believe go-waku already supports password-encrypted RLN credentials in a format interchangeable with nwaku implementation. @richard-ramos could clarify better (we didn't test any cross-client credential exchange though). |
For js-waku, the first milestone sounds fine for end of November. |
Tracking js-waku work with waku-org/js-rln#28. I have a bunch of questions, please review. |
Thanks @fryorcraken for your response, by the |
Yes, tracked with waku-org/js-rln#28 |
@fryorcraken The statefulness and soundness only makes sense if js-waku is to integrate the relay logic which is not the case right now, right? so the soundness will be already taken care of in the filter node to which the js node is connected (or is it only the case when using rln web chat?). Likewise, for the statefulness. The lack of these two features won't affect the interoperability of the js-waku with the Go and Nim given that js is gonna use a filter for connection to the network. |
Indeed, right now we haven't integrated RLN validation in Relay for JS. For now the rln-js example uses light push and filter. While we hope the remote node would drop messages with invalid proof, we do check the proof locally. I agree it won't affect interoperability and it may make sense to handle it "later" in JS and focus in being able to send messages with proof from JS for now. |
@rymnc Do you already have a tracking issue for the following? I would like to open one if there isn't any
|
Below are the aspects to be examined in the current milestone:
I believe we are ready for #1 and #2 in nwaku, @richard-ramos is the rln credential encryption in Go waku compatible with the nwaku implementation? |
It is now :) previously i had added the encryption mechanism only for the service node, but chat2 is now using the same encryption mechanism
Done too! |
Problem
This milestone is focused on making waku-rln-relay nodes stateful and more secure.
Security
Rln credential confidentiality: Rln credentials were previously stored in plaintext inside a txt file, which is clearly not secure. To achieve better security we need to ensure that rln credentials are protected and immune to unauthorized access. This can translate to different solutions for different clients. For example, we can benefit from a password-protected and encrypted rln credential file in Go and Nim waku. In contrast, in js-waku we can use a deterministic derivation function that computes the rln credentials from a user's web wallet.
Soundness
Group state verification (Merkle root verification): We need to ensure membership proofs of the incoming messages are for the intended rln group and not any arbitrary one. Due to this, the Merkle root of the incoming messages should be verified against the node's local Merkle tree root. However, due to network delay, rln-relay nodes perceive the updates, not at the same time, thus they may fall behind the current group state and their proofs won't be verified by the other relayers. To account for such delays, 1) the Merkle tree root shall be updated on a per-block basis that is all the membership group updates in each Ethereum block are processed and applied to the Merkle tree in an atomic fashion 2) each node then keeps the roots of the last 5 processed blocks.
Statefullness
Waku-rln-relay is stateless in two aspects: 1) the state of the group gets lost upon node restarts 2) the node cannot detect a disconnect from an eth client (while polling group events), and has no way to resume its state even after a reconnect. In a stateful mode, 1) the membership Merkle tree should be persisted and hence is available even after restart 2) a node should be able to detect disconnect from the eth client and recommence events polling from where it was left off.
Scope
List of issues:
Risks and uncertainty
Not sure whether all three clients can progress with the same speed considering they may have other priorities.
(Optional) End of November is the expected/latest deadline for the Nim waku client. We can discuss the timeline of other clients and see what makes sense for them.
Acceptance criteria
All the tasks specified above should be addressed.
Out of scope
Slashing.
Notes and links
Some of the tasks related to the nwaku client are already captured in this issue waku-org/nwaku#1268
Future steps
Slashing implementation.
cc: @richard-ramos, @fryorcraken, @oskarth @s1fr0, @rymnc
The text was updated successfully, but these errors were encountered: