ipfs / ipfs/kubo

"ipfs stats dht" doesn't work with Routing.Type=custom

Open
#9,482 7 comments 0 reactions 0 assignees View on GitHub
exp/expert kind/bug P1 topic/commands topic/dht
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

### Checklist

- [X] This is a bug report, not a question. Ask questions on [discuss.ipfs.io](https://discuss.ipfs.io).
- [X] I have searched on the [issue tracker](https://github.com/ipfs/kubo/issues?q=is%3Aissue) for my bug.
- [X] I am running the latest [kubo version](https://dist.ipfs.tech/#kubo) or have an issue updating.

### Installation method

built from source

### Version

```Text
ipfs version 0.17.0
```

### Config

```json
...

"Routing": {
"Methods": {
"find-peers": {
"RouterName": "ParallelHelper"
},
"find-providers": {
"RouterName": "ParallelHelper"
},
"get-ipns": {
"RouterName": "ParallelHelper"
},
"provide": {
"RouterName": "WanDHT"
},
"put-ipns": {
"RouterName": "ParallelHelper"
}
},
"Routers": {
"CidContact": {
"Parameters": {
"Endpoint": "https://cid.contact/reframe"
},
"Type": "reframe"
},
"ParallelHelper": {
"Parameters": {
"Routers": [
{
"IgnoreErrors": true,
"RouterName": "CidContact",
"Timeout": "3s"
},
{
"ExecuteAfter": "2s",
"IgnoreErrors": false,
"RouterName": "WanDHT",
"Timeout": "5m"
}
]
},
"Type": "parallel"
},
"WanDHT": {
"Parameters": {
"AcceleratedDHTClient": true,
"Mode": "dhtserver",
"PublicIPNetwork": true
},
"Type": "dht"
}
},
"Type": "custom"
},
```
...

### Description

When using custom routing, for example using the config detailed in the [v0.16 release notes](https://github.com/ipfs/kubo/releases/tag/v0.16.0), the `ipfs stats dht` command return `Error: routing service is not a DHT`, even though there is a DHT in there.

I understand the relative complexity of searching for a DHT in a custom routing pipeline and the possible edge cases, but it would be nice if that command would work in the (very common) case where there is exactly one DHT. Not only DHT stats are obviously useful, but my understanding is that it's also the only way to figure out if the accelerated DHT is ready to publish.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.