Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Waku v2: Topic interest behaviour #156

Closed
oskarth opened this issue Jul 15, 2020 · 3 comments
Closed

Waku v2: Topic interest behaviour #156

oskarth opened this issue Jul 15, 2020 · 3 comments

Comments

@oskarth
Copy link
Contributor

oskarth commented Jul 15, 2020

Problem

From vacp2p/research#40:

One difference that is worth noting is that the app topics would not be the same as Waku topics. Why? In Waku we currently don't use topics for routing between full nodes, but only for edge/light nodes in the form of topic interest. In FloodSub, these topics are used for routing.

Why can't we use Waku topics for routing directly? PubSub over libp2p isn't built for rare and ephemeral topics, and nodes have to explicitly subscribe to a topic. See topic sharding section for more on this.

[...]
4. Topic interest behavior

While we target full node traffic here, we want to make sure we maintain the existing bandwidth requirements for light nodes that Waku v1 addressed (https://vac.dev/fixing-whisper-with-waku). This means implementing topic-interest in the form of Waku topics. Note that this would be separate from app topics notes above.

In PubSub terms, this would be a form of content based filtering, as opposed to topic based filtering.

Acceptance criteria

Ensure there is optional support for content based routing for edge nodes.

Possible Solution

Currently in Waku v2 raw spec https://specs.vac.dev/specs/waku/waku-v2.html, we have a message type with a data field in it. Since the data field is likely to be encrypted, and light nodes need to query a specific topic, this could be a field in the Message type.

To disambiguate from pubsub topics, which are used for routing, a suggestion is to call this field contentTopic. This also means consumers such as Status would be able to continue mapping Waku v1 topics to contentTopic.


This could also be called something like contentFilter

@oskarth
Copy link
Contributor Author

oskarth commented Jul 20, 2020

This issue needs to be amend with another one to make it clear how you express topic interest to another node.

@oskarth
Copy link
Contributor Author

oskarth commented Jul 22, 2020

#160 here is that issue

oskarth added a commit that referenced this issue Jul 24, 2020
oskarth added a commit that referenced this issue Jul 28, 2020
* Waku v2: Add content filter for waku topics

This addresses #156 and
#160

* Fix spellcheck and indent

* More protobuf fmt

* spellcheck

* Update specs/waku/waku-v2.md

Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com>

Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com>
oskarth added a commit that referenced this issue Jul 28, 2020
* Waku v2: Add content filter for waku topics

This addresses #156 and
#160

* Fix spellcheck and indent

* More protobuf fmt

* Waku v2: Shape up historical API

Addresses #164

Also spellcheck and protobuf formating

* Spellcheck

* Update specs/waku/waku-v2.md

Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com>

Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com>
@oskarth
Copy link
Contributor Author

oskarth commented Sep 4, 2020

I believe this is solved.

@oskarth oskarth closed this as completed Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant