celestiaorg / celestia-node

Celestia Data Availability Nodes
Apache License 2.0
920 stars 918 forks source link

share/discovery: consider withdrawing connecting responsibility from Discovery #2205

Open Wondertan opened 1 year ago

Wondertan commented 1 year ago

Discovery currently discovers and connects to peers. The goal is to make it work for Bitswap to catch up on those connections and sample from them. However, Discovery should not make connections and only provide peers, as connecting is the protocol's responsibility. This should also improve shrex protocols giving them more control.

The only way to do it is by enabling discovery in bitswap using a custom implementation that returns discovered peers for any requested CID

distractedm1nd commented 1 year ago

interesting proposal, I will have to let this one simmer for a bit