Open j0sh opened 6 years ago
You are correct in that we have an routing loop issue. There are some possible fixes, one being always caching the message for some period of time via a package like https://github.com/whyrusleeping/timecache.
Caching messages to drop the repeated message? One other fix could be relayer sending message to all peers instead of sending only to the nearest peer, if there are redundant messages the receiver could drop it
So I'm not sure how we're actually populating our peer tables and whether that actually follows Kademlia routing specifications. Depending on how we do this, routing loops seem like they are a possibility in the current network protocol for nodes that are more than two hops apart. As an example, given the topology
and the xor-distance score to
E
(fromA
) being C > B > D > A > E.Since we only send to the closest node, and exclude the peer that we received the message from, the route from
A
toE
ends up looking like this:A -> B -> C -> A
when it should beA -> B -> C -> D -> E
Are we certain that the network protocol will always converge? Should we track visited nodes as part of metadata that's sent with each directed message (
SubReq
,TranscodeSub
,TranscodeResponse
)?One possibility is to bypass the problem altogether since we don't actually need DHT style routing overlays for broadcaster-transcoder interactions, with the requirement that transcoders are public (https://github.com/livepeer/go-livepeer-basicnet/issues/34).