radicle-link icon indicating copy to clipboard operation
radicle-link copied to clipboard

Disco Channel

Open FintanH opened this issue 4 years ago • 4 comments

Currently, the discovery set up takes a Vec<(PeerId, SocketAddr)> and this has to be statically known upon configuring the PeerConfig.

If the Peer is already running and we wanted to add seeds we would have to restart the network stack again. Alternatively, we can use a Channel instead of a Vec for push/popping seeds on/from. All without restarting the network stack.

FintanH avatar Jul 14 '20 08:07 FintanH

:+1:

massimiliano-mantione avatar Jul 14 '20 08:07 massimiliano-mantione

Note that Protocol::run takes a impl futures::Stream<Item = (PeerId, SocketAddr)> -- the caller can wire up a channel as they like without any need for library support.

kim avatar Jul 14 '20 08:07 kim

Is this still something we want to provide library support for? If so, how exactly?

/cc @FintanH @xla

kim avatar Nov 23 '20 16:11 kim

I think it would aid for library users, was hoping contribution back the streaming disco outlined here: https://github.com/radicle-dev/radicle-upstream/blob/c767063ecadae897cf4de37bc8c5f07a2a740f66/proxy/coco/src/config.rs#L117-L157

xla avatar Nov 23 '20 16:11 xla