Reading `ipfs config Provide.DHT.SweepEnabled` fails with the implicit default config
- 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
dist.ipfs.tech or ipfs-update
### Version
```Text
Kubo version: 0.39.0
Repo version: 18
System version: amd64/linux
Golang version: go1.25.4
```
### Config
```json
{
"Identity": {
"PeerID": "",
"PrivKey": ""
},
"Datastore": {
"StorageMax": "10GB",
"StorageGCWatermark": 90,
"GCPeriod": "1h",
"Spec": {
"mounts": [
{
"mountpoint": "/blocks",
"path": "blocks",
"prefix": "flatfs.datastore",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
"sync": false,
"type": "flatfs"
},
{
"compression": "none",
"mountpoint": "/",
"path": "datastore",
"prefix": "leveldb.datastore",
"type": "levelds"
}
],
"type": "mount"
},
"HashOnRead": false,
"BloomFilterSize": 0,
"BlockKeyCacheSize": null
},
"Addresses": {
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001",
"/ip4/0.0.0.0/udp/4001/webrtc-direct",
"/ip4/0.0.0.0/udp/4001/quic-v1",
"/ip4/0.0.0.0/udp/4001/quic-v1/webtransport",
"/ip6/::/udp/4001/webrtc-direct",
"/ip6/::/udp/4001/quic-v1",
"/ip6/::/udp/4001/quic-v1/webtransport"
],
"Announce": [],
"AppendAnnounce": [],
"NoAnnounce": [],
"API": "/ip4/127.0.0.1/tcp/5001",
"Gateway": "/ip4/127.0.0.1/tcp/8080"
},
"Mounts": {
"IPFS": "/ipfs",
"IPNS": "/ipns",
"MFS": "/mfs",
"FuseAllowOther": false
},
"Discovery": {
"MDNS": {
"Enabled": true
}
},
"Routing": {
"DelegatedRouters": [
"auto"
]
},
"Ipns": {
"RepublishPeriod": "",
"RecordLifetime": "",
"ResolveCacheSize": 128,
"DelegatedPublishers": [
"auto"
]
},
"Bootstrap": [
"auto"
],
"Gateway": {
"HTTPHeaders": {},
"RootRedirect": "",
"NoFetch": false,
"NoDNSLink": false,
"DeserializedResponses": null,
"DisableHTMLErrors": null,
"PublicGateways": null,
"ExposeRoutingAPI": null
},
"API": {
"HTTPHeaders": {}
},
"Swarm": {
"AddrFilters": null,
"DisableBandwidthMetrics": false,
"DisableNatPortMap": false,
"RelayClient": {},
"RelayService": {},
"Transports": {
"Network": {},
"Security": {},
"Multiplexers": {}
},
"ConnMgr": {},
"ResourceMgr": {}
},
"AutoNAT": {},
"AutoTLS": {},
"Pubsub": {
"Router": "",
"DisableSigning": false
},
"Peering": {
"Peers": null
},
"DNS": {
"Resolvers": {
".": "auto"
}
},
"Migration": {},
"AutoConf": {},
"Provide": {
"DHT": {}
},
"Provider": {},
"Reprovider": {},
"HTTPRetrieval": {},
"Experimental": {
"FilestoreEnabled": false,
"UrlstoreEnabled": false,
"Libp2pStreamMounting": false,
"P2pHttpProxy": false,
"OptimisticProvide": false,
"OptimisticProvideJobsPoolSize": 0
},
"Plugins": {
"Plugins": null
},
"Pinning": {
"RemoteServices": {}
},
"Import": {
"CidVersion": null,
"UnixFSRawLeaves": null,
"UnixFSChunker": null,
"HashFunction": null,
"UnixFSFileMaxLinks": null,
"UnixFSDirectoryMaxLinks": null,
"UnixFSHAMTDirectoryMaxFanout": null,
"UnixFSHAMTDirectorySizeThreshold": null,
"BatchMaxNodes": null,
"BatchMaxSize": null,
"FastProvideRoot": null,
"FastProvideWait": null
},
"Version": {},
"Internal": {},
"Bitswap": {}
}
```
### Description
It's quite similar to #7482 and #8088
Steps to reproduce:
- start with an empty ~/.ipfs
- `ipfs init`
- `ipfs config Provide.DHT.SweepEnabled`
fails with
> Error: failed to get config value: "Provide.DHT.SweepEnabled not found"
I expect it to return the default value, even if it's not specified in the config file.
Contributor guide
Assessment
This issue has not been assessed yet.