Skip to content

Commit 20e2b8d

Browse files
authored
Merge pull request #255 from Dhruv-Varshney-developer/main
docs(env-variables): Add HTTP retrieval environment variables documentation.
2 parents 0c15e38 + 6b0f887 commit 20e2b8d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/environment-variables.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
- [`RAINBOW_DHT_ROUTING`](#rainbow_dht_routing)
1717
- [`RAINBOW_HTTP_ROUTERS`](#rainbow_http_routers)
1818
- [`RAINBOW_DNSLINK_RESOLVERS`](#rainbow_dnslink_resolvers)
19+
- [`ROUTING_IGNORE_PROVIDERS`](#routing_ignore_providers)
20+
- [`RAINBOW_HTTP_RETRIEVAL_ENABLE`](#rainbow_http_retrieval_enable)
21+
- [`RAINBOW_HTTP_RETRIEVAL_ALLOWLIST`](#rainbow_http_retrieval_allowlist)
22+
- [`RAINBOW_HTTP_RETRIEVAL_WORKERS`](#rainbow_http_retrieval_workers)
1923
- [Experiments](#experiments)
2024
- [`RAINBOW_SEED_PEERING`](#rainbow_seed_peering)
2125
- [`RAINBOW_SEED_PEERING_MAX_INDEX`](#rainbow_seed_peering_max_index)
@@ -158,6 +162,40 @@ It is possible to override OS resolver by passing root: `. : catch-URL`.
158162

159163
Default: `eth. : https://dns.eth.limo/dns-query, crypto. : https://resolver.unstoppable.io/dns-query`
160164

165+
### `ROUTING_IGNORE_PROVIDERS`
166+
167+
Comma-separated list of peer IDs whose provider records should be ignored during routing.
168+
169+
This is useful when you want to exclude specific peers from being considered as content providers, especially in cases where you know certain peers might advertise content but you prefer not to retrieve from them directly (for example, to ignore peer IDs from bitswap endpoints of providers that offer HTTP).
170+
171+
Default: not set (no peers are ignored)
172+
173+
### `RAINBOW_HTTP_RETRIEVAL_ENABLE`
174+
175+
Controls whether HTTP-based block retrieval is enabled.
176+
177+
When enabled, Rainbow can use [Trustless HTTP Gateways](https://specs.ipfs.tech/http-gateways/trustless-gateway/) to perform block retrievals in parallel to [Bitswap](https://specs.ipfs.tech/bitswap-protocol/). This takes advantage of peers with `/tls` + `/http` multiaddrs (HTTPS is required).
178+
179+
Note that this feature works in the same way as Bitswap: known HTTP-peers receive optimistic block requests even for content that they are not announcing.
180+
181+
Default: `false` (HTTP retrieval disabled)
182+
183+
### `RAINBOW_HTTP_RETRIEVAL_ALLOWLIST`
184+
185+
Comma-separated list of hostnames that are allowed for HTTP retrievals.
186+
187+
When HTTP retrieval is enabled, this setting limits HTTP retrievals to only the specified hostnames. This provides a way to restrict which gateways Rainbow will attempt to retrieve blocks from.
188+
189+
Default: not set (when HTTP retrieval is enabled, all hosts are allowed)
190+
191+
### `RAINBOW_HTTP_RETRIEVAL_WORKERS`
192+
193+
The number of concurrent worker threads to use for HTTP retrievals.
194+
195+
This setting controls the level of parallelism for HTTP-based block retrieval operations. Higher values can improve performance when retrieving many blocks but may increase resource usage.
196+
197+
Default: `32`
198+
161199
## Experiments
162200

163201
### `RAINBOW_SEED_PEERING`
@@ -275,6 +313,7 @@ For example, to log structured JSON (for easier parsing):
275313
```bash
276314
export GOLOG_LOG_FMT="json"
277315
```
316+
278317
The logging format defaults to `color` when the output is a terminal, and
279318
`nocolor` otherwise.
280319

0 commit comments

Comments
 (0)