waku-org / research

Waku Protocol Research
MIT License
3 stars 0 forks source link

Waku Network MVP: the public Waku network #1

Open jm-clius opened 1 year ago

jm-clius commented 1 year ago

We have learned a lot from the Status Communities MVP about the basic building blocks for a working Waku network. However, the Status MVP creates a private network. We want to take what we have learned and build a viable public Waku Network MVP. This issue tracks the work to specify and build the public Waku Network, with the minimum features for a viable network that is scalable, reasonably secure, and honest about trade-offs.

Why "Waku Network MVP"?

This is just a working title until we come up with something better. It denotes that this is our attempt to balance desired network features (such as scalability, anonymity, and security) against the practical tradeoffs necessary to make the network "work" within the medium term. In this paradigm, we recognise that the set of specifications that define an "ideal" messaging network with the highest level of guaranteed anonymity, security, etc. falls outside MVP scope.

What are some features WN must have?

Note: this is not a complete list of requirements, just some ideas of the scope that we should specify as part of this effort.

Auto-scaling with autosharding

The relayer network must be able to scale by automatically sharding content topics via some consistent hashing mechanism to deterministic pubsub topic shards. This should build on the static shard paradigm, by specifying the static shard index (or range of shard indices) across which WN auto-shards will be defined (making the shard something akin to a network-id for WN). This will include defining a pubsub topic format and range, but this must be abstracted from applications/platforms who should only be concerned with the content topic chosen for their application.

DoS Protection

WN should provide basic DoS protection, likely based on membership coupled with some form of rate-limiting. A basic version of the RLN would be ideal here, perhaps without slashing or staking. This should not prohibit more sophisticated methods of DoS protection from being implemented over time. The idea of a plugin JSON-RPC interface for validation could be useful here, e.g. RLN-validation-as-a-service, which would also allow innovation from applications to define their own validation rules where it makes sense.

Light protocols

The protocols for resource-restricted devices, including filter, lightpush, and peer-exchange are being hardened for the Status MVP. These will also form an integral part of WN, but with the added paradigm of making these services decentralizable via a form of service and capability discovery (see next point).

Service/capability discovery

WN must define a capability discovery method by which services, including light protocols and store for historical messages, can be provided by anyone in the network and discovered by interested clients.

Service incentivization

WN will not define any incentivization mechanisms in the MVP phase but, by allowing decentralizing and discovering services, should pave the way for incentivization to be implemented in the network.

How shall we go about this?

Currently, I envision that defining and building the WN MVP would be the main focusing effort for Waku Research after the Status MVP. Building a viable public network is not only crucial for the sustainability of the Waku project itself, but if we can demonstrate the value of such a network, many existing platforms (including Status) would choose to transition to the public network for their benefit as well.

Roughly, the steps we take could be:

  1. Define the minimal requirements and properties that WN must have.
  2. Publish an RFC that encompasses a network design with opinionated use of basic Waku protocols to achieve said requirements.
  3. Breakdown and prioritize tasks.
  4. Dogfood and launch.

cc @fryorcraken @alrevuelta @corpetty @kaiserd

jm-clius commented 1 year ago

Some more features to consider:

alrevuelta commented 1 year ago

Thanks for this @jm-clius. Some quick thoughts:

which would also allow innovation from applications to define their own validation rules where it makes sense.

Unsure if its a good idea. imho there should be one DoS protection solution to rule them all very well defined and neutral, that protects the network from being DoSed. Ethereum has gas to prevent spamming and we should have ???. I dont imagine Ethereum allowing custom validations that allow people to validate according to: OFAC compliant, unethic MEV, or whatever. This has been done but on top of the protocol, which required to change the software to somoe extent, which is difficult and desincentivices doing so.

Some people say its DoS validation but what it really could be is censorship.

timestamp validation

Without going into the possible attack vectors that it can open up, timestamp validation can be a very efficient mechanism to mitigate spam. Specially since other validation techniques may not be enough if one can do a "replay attack" aka spamming with old messages seen in the network, no longer cached by gossipsub.

As an opinion, if the attack vectors that timestamp introduces are really worring to us, then waku will never scale for the end user and it will stay a niche protocol used by privacy obsesed people. Both options are fine, but we have to choose.

TLDR:

alrevuelta commented 1 year ago

Adding:

fryorcraken commented 1 year ago

Agree that for dos protection, I dont think slashing is required, but unsure how RLN can work without staking. The tokenizing waku bandwidth idea does, since just holding is required.

What about joining the RLN using interep credentials? Or proving you own a zk notes in RAILGUN contracts? Do you see major issues to use RLN this way? Or do you consider this as "staking" still?

jm-clius commented 1 year ago

UPDATE: I've removed all references to "Waku Network 1" or "WN1" in the description above and have opted for "Waku Network" or "Waku Network MVP" instead. The 1 was just confusing.

fryorcraken commented 1 year ago

Once we have a viable strategy to handle membership from different sources, it may be interesting to review sismo to define broader membership groups:

alrevuelta commented 1 year ago

Adding a new point.

Improve store protocol decentralization

Problem:

Solution:

Trying to be more specific, these are the short term (low hanging fruit-ish) that we can do to decentralize store without much effort:

fryorcraken commented 1 year ago

Relevant: https://github.com/waku-org/pm/issues/21