Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set Bitswap.ProviderSearchDelay to 0s #9530

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/node/bitswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (
DefaultTaskWorkerCount = 8
DefaultEngineTaskWorkerCount = 8
DefaultMaxOutstandingBytesPerPeer = 1 << 20
DefaultProviderSearchDelay = 1000 * time.Millisecond
DefaultProviderSearchDelay = 0 * time.Millisecond
)

type bitswapOptionsOut struct {
Expand Down
12 changes: 8 additions & 4 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -972,11 +972,15 @@ Type: `optionalInteger` (byte count, `null` means default which is 1MB)

### `Internal.Bitswap.ProviderSearchDelay`

This parameter determines how long to wait before looking for providers outside of bitswap.
Other routing systems like the DHT are able to provide results in less than a second, so lowering
this number will allow faster peers lookups in some cases.
Optional delay before looking for providers outside of bitswap,
using routers configured in [`Routing`](#routing) (e.g., DHT, IPNI).

Type: `optionalDuration` (`null` means default which is 1s)
Setting to `1s` may decrease the number of DHT and IPNI queries at the cost of
increased latency. It is advised to keep this unset unless you are confident
the most of requested data will be provided by [`Peering.Peers`](#peering) over
bitswap. More details in [kubo#8807](https://github.com/ipfs/kubo/issues/8807).

Type: `optionalDuration` (`null` means default which is `0s`)

### `Internal.UnixFSShardingSizeThreshold`

Expand Down