ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
15.99k stars 3k forks source link

Better self-service commands for DHT providing #10265

Open 2color opened 8 months ago

2color commented 8 months ago

Checklist

Description

Background

Newcomers to IPFS often face problems providing to the DHT. The most acute version of this problem is that beyond a certain threshold of CIDs to provide, the default Kubo configuration will simply not work and the node will not be able to make its CIDs discoverable.

To address these pains, there are ongoing efforts to improve the DHT implementation and how records are provided to the DHT.

This feature suggestion attempts to alleviate some of these pains with new self-service commands to provide more insight into the process and enable users to adjust their Kubo configuration based on the insights they observe.

Add LastRun NextRun to ipfs stats provide

The command currently outputs four fields:

TotalProvides:          58
AvgProvideDuration:     1.588721s
LastReprovideDuration:  42.698502s
LastReprovideBatchSize: 29

It would be useful to know when the last provide run was and when the next run will be. These could be named LastRun and NextRun (though these are just suggestions).

Another thing that would be helpful is to clarify the difference between TotalProvides and LastReprovideBatchSize in the usage.

Rename ipfs bitswap reprovide to ipfs dht reprovide

Having the DHT provide command as a subcommand of bitswap makes no sense. Moving it to be a subcommand of dht, i.e. ipfs dht reprovide would make more sense.

Jorropo commented 8 months ago

We deprecated most of ipfs dht in favor of ipfs routing because the DHT isn't the only routing system anymore.

2color commented 8 months ago

We deprecated most of ipfs dht in favor of ipfs routing because the DHT isn't the only routing system anymore.

Does Kubo support providing records to any other routing system? As far as I'm aware, the delegated routing API v1 doesn't specify how provider records are written.

lidel commented 7 months ago

Triage notes: