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
Discovery v5: separate Waku network #770
Comments
Proposed solution looks good to me, and I had something very similar in mind. I was however going to propose the validation function as part of the routing table object instead, and do the validation in the Few additional notes:
|
Thanks, @kdeme. Good points. It makes sense to me to have this be part of routing table instead of Protocol (at least for now) if we start by only validating before adding to the table. I imagine some "leakage" will inevitably occur, but if all Waku nodes maintain a separate routing table and validate their bootstrap nodes also before contacting them, wouldn't the networks remain separate at least in theory? |
Without modifications, "leakage" could happen for example when:
Now with these suggested modifications, one network (waku) will filter out the nodes. However the other network(s) will not. If the same leakage as in 1. or 2. occurs, the other networks will for example accidentally contact a node on the waku network, and this node will still reply to the request with a bunch of (waku only) nodes. These will still reply to ping requests and thus the nodes in the other networks will still store these in the routing table. They will still go around in that network, and thus they will also frequently be contacted. I don't really see an issue with that, aside from bandwidth / cpu usage, which might be of concern of course for the Waku use cases. To fully seperate those, the waku filtering would also have to be applied on the message responses, basically ignoring messages from nodes of the other networks. This is however not possible without more changes in the current implementation as ENRs are not necessarily (They might be, depends on network key, routing table buckets, etc.) stored for each "session" with a node. This too would have to be added. Perhaps at that point a better solution is to make the protocols (slightly) incompatible. I'm thinking then specifically of making the |
Thanks for the very thorough summary, @kdeme. |
shared discovery is something of a feature in that it's harder to take down - how big of a problem is this actually? ie what happens is you connect to a node, figure out that it doesn't support the features you want and discard it - this shouldn't be very expensive |
For me, the unknown would be how easily you'd then find interesting Waku nodes to connect to, especially if you have some further requirements re capabilities, store size, etc. I know this needle-in-a-haystack is something we'd like to test in any case, but it may be worth maintaining a separate discv5 network, at least while we are testing/have only very few nodes of interest to us. wdyt? |
Background
Recently we added a new waku-specific ENR field to identify Waku 2 nodes within a larger ENR-based discovery mechanism, such as Discovery v5.
In a Discovery v5 context, this addition allows Waku nodes to filter discovered nodes to only use/connect to other Waku nodes, but it does not affect which nodes are stored in the underlying routing table. In practice, then, the Waku 2 discv5 network won't be kept separate from other discv5 networks (e.g. for eth2).
Proposed solution
Add a
validator
function to the discovery v5 implementation innim-eth
, that:optional
and defaults tonone
(in order not to affect existing implementations)waku2
-fieldIt should also be possible to fork
nim-eth
for thenim-waku
use case above, though I'd like to avoid this in the long term.cc @oskarth @kdeme
The text was updated successfully, but these errors were encountered: