{"record":{"id":"dd02e57618534006","repo":"ipfs/kubo","slug":"the-experimental-accelerateddhtclient-key-has-been","errorCode":null,"errorMessage":"The Experimental.AcceleratedDHTClient key has been moved to Routing.AcceleratedDHTClient in Kubo 0.21, please use this new key and remove the old one.","messagePattern":"The Experimental\\.AcceleratedDHTClient key has been moved to Routing\\.AcceleratedDHTClient in Kubo 0\\.21, please use this new key and remove the old one\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/types.go","lineNumber":556,"sourceCode":"\ntype experimentalAcceleratedDHTClient doNotUse\n\nvar _ json.Unmarshaler = experimentalAcceleratedDHTClient(false)\n\nfunc (experimentalAcceleratedDHTClient) UnmarshalJSON(b []byte) error {\n\td := json.NewDecoder(bytes.NewReader(b))\n\tfor {\n\t\tswitch tok, err := d.Token(); err {\n\t\tcase io.EOF:\n\t\t\treturn nil\n\t\tcase nil:\n\t\t\tswitch tok {\n\t\t\tcase json.Delim('{'), json.Delim('}'):\n\t\t\t\t// accept empty objects\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t//nolint\n\t\t\treturn fmt.Errorf(\"The Experimental.AcceleratedDHTClient key has been moved to Routing.AcceleratedDHTClient in Kubo 0.21, please use this new key and remove the old one.\")\n\t\tdefault:\n\t\t\treturn err\n\t\t}\n\t}\n}\n\n// doNotUse is a type you must not use, it should be struct{} but encoding/json\n// does not support omitempty on structs and I can't be bothered to write custom\n// marshalers on all structs that have a doNotUse field.\ntype doNotUse bool\n\ntype graphsyncEnabled doNotUse\n\nvar _ json.Unmarshaler = graphsyncEnabled(false)\n\nfunc (graphsyncEnabled) UnmarshalJSON(b []byte) error {\n\td := json.NewDecoder(bytes.NewReader(b))\n\tfor {","sourceCodeStart":538,"sourceCodeEnd":574,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/config/types.go#L538-L574","documentation":"Experimental.AcceleratedDHTClient was moved to Routing.AcceleratedDHTClient in Kubo 0.21. Its UnmarshalJSON only accepts an absent key or an empty object and rejects any other content, forcing users to adopt the new location explicitly.","triggerScenarios":"Starting a node whose config.json still contains a non-empty Experimental.AcceleratedDHTClient value after upgrading to Kubo >= 0.21.","commonSituations":"Upgraded nodes where the old flag was set to true; copied configs from older deployments; provisioning scripts still writing the Experimental key.","solutions":["Set the value at the new location: `ipfs config --bool Routing.AcceleratedDHTClient true`.","Remove the old key: `ipfs config delete Experimental.AcceleratedDHTClient` (or strip it from config.json).","Restart the daemon after the change."],"exampleFix":"// before (config.json)\n{\"Experimental\": {\"AcceleratedDHTClient\": true}}\n// after\n{\"Routing\": {\"AcceleratedDHTClient\": true}}","handlingStrategy":"validation","validationCode":"// detect stale key before daemon start\nfunc hasOldAcceleratedDHT(cfg map[string]any) bool {\n    exp, _ := cfg[\"Experimental\"].(map[string]any)\n    _, ok := exp[\"AcceleratedDHTClient\"]\n    return ok\n}","typeGuard":"func usesNewDHTKey(cfg map[string]any) bool {\n    exp, _ := cfg[\"Experimental\"].(map[string]any)\n    v, present := exp[\"AcceleratedDHTClient\"]\n    if !present { return true }\n    b, isObj := v.(map[string]any)\n    return isObj && len(b) == 0\n}","tryCatchPattern":"if err := node.Start(); err != nil {\n    if strings.Contains(err.Error(), \"Experimental.AcceleratedDHTClient\") {\n        // move to Routing.AcceleratedDHTClient and delete old key\n    }\n}","preventionTips":["After upgrading to >=0.21 run: ipfs config --bool Routing.AcceleratedDHTClient true && ipfs config delete Experimental.AcceleratedDHTClient","Update provisioning scripts to write the Routing.* key","Diff config.json against `ipfs config show` defaults after upgrades"],"tags":["config","migration","dht"],"backgroundTag":"removed-config-key","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}