radicle-link
radicle-link copied to clipboard
Disco Channel
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.
:+1:
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.
Is this still something we want to provide library support for? If so, how exactly?
/cc @FintanH @xla
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