{"record":{"id":"623db7bbf6b64036","repo":"ipfs/kubo","slug":"provide-bloomfprate-must-be-d-1-in-1m-got","errorCode":null,"errorMessage":"Provide.BloomFPRate must be >= %d (1 in 1M), got %d","messagePattern":"Provide\\.BloomFPRate must be >= (.+?) \\(1 in 1M\\), got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/provide.go","lineNumber":207,"sourceCode":"\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn strategy\n}\n\n// ValidateProvideConfig validates the Provide configuration according to DHT requirements.\nfunc ValidateProvideConfig(cfg *Provide) error {\n\t// Validate Provide.Strategy\n\tstrategy := cfg.Strategy.WithDefault(DefaultProvideStrategy)\n\tif _, err := ParseProvideStrategy(strategy); err != nil {\n\t\treturn fmt.Errorf(\"Provide.Strategy: %w\", err)\n\t}\n\n\t// Validate Provide.BloomFPRate\n\tif !cfg.BloomFPRate.IsDefault() {\n\t\trate := cfg.BloomFPRate.WithDefault(DefaultProvideBloomFPRate)\n\t\tif rate < MinProvideBloomFPRate {\n\t\t\treturn fmt.Errorf(\"Provide.BloomFPRate must be >= %d (1 in 1M), got %d\", MinProvideBloomFPRate, rate)\n\t\t}\n\t}\n\n\t// Validate Provide.DHT.Interval\n\tif !cfg.DHT.Interval.IsDefault() {\n\t\tinterval := cfg.DHT.Interval.WithDefault(DefaultProvideDHTInterval)\n\t\tif interval > amino.DefaultProvideValidity {\n\t\t\treturn fmt.Errorf(\"Provide.DHT.Interval (%v) must be less than or equal to DHT provider record validity (%v)\", interval, amino.DefaultProvideValidity)\n\t\t}\n\t\tif interval < 0 {\n\t\t\treturn fmt.Errorf(\"Provide.DHT.Interval must be non-negative, got %v\", interval)\n\t\t}\n\t\t// Provide.DHT.Interval=0 used to disable the entire provide system as a\n\t\t// side effect. It now disables only the periodic reprovide schedule:\n\t\t// new CIDs still announce via fast-provide-root and 'ipfs provide once'.\n\t\t// Operators upgrading from earlier kubo versions must opt in to one of\n\t\t// the two semantics by setting Provide.Enabled explicitly:\n\t\t//   - Provide.Enabled=false fully disables providing (the old behaviour).","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/config/provide.go#L189-L225","documentation":"ValidateProvideConfig checks Provide.BloomFPRate, the bloom-filter false-positive denominator used by +unique/+entities reprovide cycles. Below 1,000,000 (one false positive per million lookups) the filter becomes lossy enough to silently skip a meaningful fraction of CIDs from each reprovide cycle, so kubo rejects such values instead of degrading announcements invisibly.","triggerScenarios":"Node startup (ValidateProvideConfig called from IPFS init) when Provide.BloomFPRate is explicitly set (not default) to a value below MinProvideBloomFPRate = 1_000_000, e.g. 10_000.","commonSituations":"Operator tuning the bloom filter to save memory picks an aggressive small N; copied config from an example or older version using a lower rate; misunderstanding that a lower number means a better rate (it is 1/N, so higher is better).","solutions":["Raise Provide.BloomFPRate to at least 1,000,000 (the default is 4,750,000)","Remove the Provide.BloomFPRate key to use the default rate","If memory pressure motivated the low value, reduce content instead (e.g. fewer pinned DAGs) rather than accepting a lossy filter"],"exampleFix":"// before (config file)\n\"BloomFPRate\": 10000\n// after\n\"BloomFPRate\": 4750000","handlingStrategy":"validation","validationCode":"rate := cfg.Provide.BloomFPRate.WithDefault(config.DefaultProvideBloomFPRate)\nif !cfg.Provide.BloomFPRate.IsDefault() && rate < config.MinProvideBloomFPRate {\n\treturn fmt.Errorf(\"BloomFPRate %d below minimum %d\", rate, config.MinProvideBloomFPRate)\n}","typeGuard":null,"tryCatchPattern":"if err := config.ValidateProvideConfig(cfg.Provide); err != nil {\n\tif strings.Contains(err.Error(), \"BloomFPRate\") {\n\t\tcfg.Provide.BloomFPRate = nil // fall back to default\n\t}\n\treturn err\n}","preventionTips":["Remember the rate is 1/N: higher N means fewer false positives, not more","Never set it below 1,000,000; the default 4,750,000 is a safe choice","Only meaningful when Strategy includes +unique or +entities"],"tags":["config","validation","bloom-filter"],"backgroundTag":"config-value-below-minimum","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"}