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

Add RoutingDHT that implements the routing.Routing interface #947

Closed
wants to merge 1 commit into from

Conversation

dennis-tra
Copy link
Contributor

@dennis-tra dennis-tra commented Sep 28, 2023

Not sure I like that. It would also be good to point to the concerns that people have with the routing.Routing interface. This makes the tests look a little less nice unless we let the topology solely operate on RoutingDHT's.

fixes #929

@dennis-tra dennis-tra added the v2 All issues related to the v2 rewrite label Sep 28, 2023
@@ -383,7 +383,7 @@ func (c *Coordinator) QueryMessage(ctx context.Context, msg *pb.Message, fn coor
ctx, span := c.tele.Tracer.Start(ctx, "Coordinator.QueryMessage")
defer span.End()
if msg == nil {
return coordt.QueryStats{}, fmt.Errorf("no message supplied for query")
return nil, coordt.QueryStats{}, fmt.Errorf("no message supplied for query")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this change? Was it not building before? Or is it a merge conflict?

@@ -61,7 +61,7 @@ func TestDHT_FindPeer_happy_path(t *testing.T) {
d4 := top.AddServer(nil)
top.ConnectChain(ctx, d1, d2, d3, d4)

addrInfo, err := d1.FindPeer(ctx, d4.host.ID())
addrInfo, err := NewRouting(d1).FindPeer(ctx, d4.host.ID())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can wrap the dhts when you create them above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you let the topology operate on Routing DHTs?

@iand
Copy link

iand commented Sep 28, 2023

We should debate whether this actually belongs in Boxo, for example here

@iand
Copy link

iand commented Sep 28, 2023

Just thinking about how best to decouple the Routing adapter

Can we avoid accessing the host field on the DHT (and the Peerstore method)? Places where we do that are candidates for useful methods to expose on the DHT type, for example: Connectedness(), PeerInfo(), ID(), Addrs(), AddAddrs()

Same for accessing .kad - these could be methods on the DHT type that delegate to kad.

These aren't essential for this PR but something to think about as we evolve the usability of this implementation.

@iand
Copy link

iand commented Oct 2, 2023

As per #954 this needs to be applied to zikade

@guillaumemichel
Copy link
Contributor

Closing as v2 has moved to Zikade

Reference: probe-lab/zikade#78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 All issues related to the v2 rewrite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants