Skip to content
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

idea: separate filter into two protocols #1423

Closed
richard-ramos opened this issue Nov 25, 2022 · 3 comments
Closed

idea: separate filter into two protocols #1423

richard-ramos opened this issue Nov 25, 2022 · 3 comments

Comments

@richard-ramos
Copy link
Member

Problem

/vac/waku/filter/2.0.0-beta1 is being used for both full nodes and lightnodes. A lightnode could be potentially misidentified as a full node since both types of nodes are indistinguishable due to using the same protocol. This could be specially noticeable if using identify protocol to populate the peer store with information about the protocols supported by the node, and then later, randomly selecting nodes from the peerstore that support filter protocol. A lightnode could be chosen by mistake to subscribe messages from it.

Possible Solutions

Instead of having a single protocol /vac/waku/filter/2.0.0-beta1 what if we instead use two different protocols:

  • /vac/waku/filter/2.0.0-beta1: would be used only by full nodes.
  • /vac/waku/filter-subscriber/2.0.0-beta1. used by light nodes.

When a light node requests a subscription from a full node, the full node would push messages back to the subscriber using the filter-subscriber protocol.

@LNSD
Copy link
Contributor

LNSD commented Nov 28, 2022

@richard-ramos I think this issue belongs to either waku-org/pm or vacp2p/rfc repo.


I can't entirely agree with splitting it into two parts: subscription management and message push. There is a dependency between the two parts and cannot be separated.

But I agree that the Waku filter protocol deserves a "productivization" revisit. And we need to modify the Waku filter wire formats so they are not coupled.

@jm-clius
Copy link
Contributor

jm-clius commented Dec 9, 2022

Although I agree that the there is a strong dependency/linking between the two parts, I think from a libp2p perspective it makes sense to use two protocol IDs (still part of the same Waku protocol). This is especially necessary for a capability discovery based on identify to differentiate filter service nodes from client nodes and directionality of filter messages. I tried to incorporate this idea in vacp2p/rfc#562 and am of course very open to any comments/alternative suggestions. Let's continue the conversation there! :)

@richard-ramos
Copy link
Member Author

Closing the issue as I agree that it should not belong to this repository.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants