ipfs / ipfs/kubo

bug: local node missing from /routing/v1/providers results

Open
#10,408 8 comments 0 reactions 0 assignees View on GitHub
kind/bug need/triage
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.tech](https://discuss.ipfs.tech/c/help/13).
- [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

ipfs-desktop

### Version

```Text
0.28.0
https://github.com/SgtPooki/repro-kubo-not-announcing-self-as-provider/blob/5fa8b9cfad9b7f5b0a991d7efc58062f824591d8/package.json#L17
```

### Config
config is via ipfsd-ctl in https://github.com/SgtPooki/repro-kubo-not-announcing-self-as-provider/blob/5fa8b9cfad9b7f5b0a991d7efc58062f824591d8/index.js#L16-L40

```js
{
kuboRpcModule: kuboRpcClient,
ipfsBin: kuboPath(),
// test: true,
ipfsOptions: {
config: {
Addresses: {
Swarm: [
'/ip4/0.0.0.0/tcp/4001',
'/ip4/0.0.0.0/tcp/4002/ws'
],
Gateway: '/ip4/127.0.0.1/tcp/8180'
},
Gateway: {
NoFetch: true,
ExposeRoutingAPI: true,
HTTPHeaders: {
'Access-Control-Allow-Origin': ['*'],
'Access-Control-Allow-Methods': ['GET', 'POST', 'PUT', 'OPTIONS']
}
}
}
},
args: ['--enable-pubsub-experiment', '--enable-namesys-pubsub']
}
```

### Description

Repro at https://github.com/SgtPooki/repro-kubo-not-announcing-self-as-provider/

Basically, if I enable `ExposeRoutingAPI`, and `NoFetch`, I should at least get the local kubo node to return itself as a router.

Another question here: is there any scenario where respecting `NoFetch` makes sense with routing/v1 api? i.e. not querying the network for providers, only returning providers we know about? If locally configured providers makes sense at all, do we need a second config option, or can we overload `NoFetch`?

cc @hacdias @lidel

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.