Closed guseggert closed 1 year ago
@guseggert : what response do we do when we don't get anything from the indexers? Do nothing (to save bandwidth)?
@guseggert : what response do we do when we don't get anything from the indexers? Do nothing (to save bandwidth)?
This doesn't implement that, as that requires some more invasive changes to https://github.com/libp2p/go-libp2p-kad-dht. With this change, in the case that the indexers return nothing then this will send back an empty response message, along with a list of closer peers.
I went ahead and added an option to the DHT to skip sending empty responses: https://github.com/libp2p/go-libp2p-kad-dht/pull/796
@guseggert shall we just return an error to the clients that are trying to write instead of doing nothing silently? I'm afraid that by not giving any feedback to clients we might create problems on the network when providing.
Silently doing nothing on provides is essentially the same as publishing the record to k=19
peers, if I'm not mistaken, which our studies have shown that is not a big deal. Or having a high-churn peer which receives the record and then disappears - again not a big deal.
If anyone is interested in all the details, here's the complete report that includes results of hydra vs non-hydra provider record holders over time (see Figs 10 and 11): https://github.com/protocol/network-measurements/blob/master/results/rfm17-provider-record-liveness.md
2022-11-29 conversation: @guseggert will merge this.
@guseggert shall we just return an error to the clients that are trying to write instead of doing nothing silently? I'm afraid that by not giving any feedback to clients we might create problems on the network when providing.
We could but to what end? There's nothing actionable for nodes and it would spam their logs. In fact we don't want nodes to take an action, like blocking the Hydra peer, because the whole point of this is to keep Hydra nodes in all the queries as a stopgap unitl delegated routing is completed.
This will allow the hydras to run in a mode where they look like DHT nodes, and accept writes, but silently discard the writes and always return only results from indexers.