-
Notifications
You must be signed in to change notification settings - Fork 3
Waku's Requirements on a Consensus Mechanism #333
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
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,77 @@ | ||||||
| # Waku's Requirements on a Consensus Mechanism | ||||||
|
|
||||||
| **Note:** It is unclear at this stage whether these requirements should be fulfilled by Nomos, Status Network, both, or neither. | ||||||
|
|
||||||
| This document outlines limitations in Waku's current reliance on smart contracts and explains how they impede the delivery of Waku's desired properties: privacy, anonymity, and censorship-resistance. | ||||||
|
|
||||||
| ## RLN Protocol Dependency | ||||||
|
|
||||||
| Waku relies on the RLN (Rate Limit Nullifier) protocol to rate-limit message publishers in a permissionless, censorship-resistant, and privacy-preserving manner. | ||||||
| This ensures unlinkability between wallet addresses and messages, as well as between separate messages. | ||||||
|
|
||||||
| ### RPC API Usage | ||||||
|
|
||||||
| Commitments are added to a Merkle tree. The tree’s `root` is used to validate incoming messages (proof verification), while Merkle proofs enable proof generation (for sending messages). | ||||||
| The `root` and `getMerkleProof` functions are available on the RLN EVM smart contract ABI. Note that a user’s RLN identity (commitment) is required when calling `getMerkleProof`. | ||||||
|
|
||||||
| All Waku network nodes must enforce identical message validation rules to prevent network splits at the libp2p-gossipsub layer. | ||||||
| This necessitates consensus on the Merkle tree’s state across the network. | ||||||
|
|
||||||
| To achieve this, range validation is employed: a node verifies messages against the current root and a set of previous roots, accommodating proofs generated on recent prior roots. | ||||||
| However, this requires Waku nodes to constantly track the smart contract’s root, which updates whenever a user registers or withdraws membership. | ||||||
| On L2 networks, roots may change every few seconds, making Waku a heavy consumer of Web3 RPC APIs. | ||||||
|
|
||||||
| **Mitigation Strategy:** | ||||||
| We intend to enhance the smart contract to expose a set of historical `root` values. | ||||||
| This would reduce RPC call frequency, though scalability remains unproven. | ||||||
| Event subscriptions (e.g., WebSocket) could also minimize RPC usage, but we abandoned this approach due to RPC provider instability (shift from WebSocket to HTTP long polling). | ||||||
| Re-evaluation may occur during migration to Status Network, given potential closer relation with RPC providers. | ||||||
|
|
||||||
| *Note:* These constraints primarily affect Waku Relay nodes (cloud/laptop-based). | ||||||
| Edge nodes (mobile/browser) require less frequent RPC access due to lower message volume and relaxed time constraints—since they verify messages without forwarding them (unlike relays, which must validate before propagation). | ||||||
|
||||||
| Edge nodes (mobile/browser) require less frequent RPC access due to lower message volume and relaxed time constraints—since they verify messages without forwarding them (unlike relays, which must validate before propagation). | |
| Edge nodes (mobile/browser) require less frequent RPC access due to lower message volume and relaxed time constraints—since they verify only the small subset of messages of interest to them. |
This seems more accurate to me, at least in terms of what we plan - edge nodes still need to verify messages that they publish with own RLN membership and probably messages that they receive via filter subscription too. However, this is presumably low-rate and can use some on-demand RPC-call strategy.
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 clarification helps, but I find "range validation" unclear - why not: