feat(config): expose ProviderSearchMaxResults#10773
Conversation
| DefaultEngineTaskWorkerCount = 8 | ||
| DefaultMaxOutstandingBytesPerPeer = 1 << 20 | ||
| DefaultProviderSearchDelay = 1000 * time.Millisecond | ||
| DefaultMaxProviders = 10 // matching BitswapClientDefaultMaxProviders from https://github.com/ipfs/boxo/blob/v0.29.1/bitswap/internal/defaults/defaults.go#L15 |
There was a problem hiding this comment.
Open question: should we keep 10, or switch to 0 (unlimited, like in rainbow?)
There was a problem hiding this comment.
IIUC MaxProviders in the context of bitswap is the max number of providers that Bitswap asks the content routing system (Amino DHT) to return, if more are returned only the first MaxProviders are read by Bitswap.
While it wouldn't be more effort for the content routing system to provide more providers (as long as they exist), we may want to bound the number of providers records bitswap/http will try to fetch the content from, for a single CID.
Also, with a MaxProviders that is too low, we may not be able to discover the content, if was advertised by many unstable nodes that have gone offline since.
Increasing DefaultMaxProviders to something like 32 could be a middle ground in ensuring content is likely to be found if there are online providers, while bounding retrieval attempts.
|
@gammazero do you remember if this made any difference at all? |
|
Triage notes:
|
734a57b to
8e72cea
Compare
Replacing hardcoded integer with named default and expose config option for adjusting it, like we do in Rainbow https://github.com/ipfs/kubo/pull/10765/files#r2025455848
8e72cea to
72c71a1
Compare
This PR is replacing hardcoded integer from #10765 with named default and expose config option for adjusting it, like we do in Rainbow.