livepeer / livepeer/go-livepeer-basicnet

Routing Loops

Open
#37 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
18
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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

```
A : { B, C }
B : { A, C }
C : { A, B, D }
D : { C, E }
E : { D }
```

and the xor-distance score to `E` (from `A`) 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` to `E` ends up looking like this: `A -> B -> C -> A` when it should be `A -> 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).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how peer tables are populated and how SubReq, TranscodeSub, and TranscodeResponse are routed; compare that behavior with the Kademlia routing question raised here. Determine whether visited-node metadata or the public-transcoder approach from issue #34 is needed, and define done as a protocol decision that prevents the A-B-C-A loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems, networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.