Commit 0c9940a
authored
Per chain rpc settings (#6459)
* ethereum, node: Per-chain RPC settings via TOML config
Introduce a ChainSettings struct that holds Ethereum RPC tuning
parameters (timeouts, retries, batch sizes, block ranges, etc.)
per chain instead of reading them from global ENV_VARS. Settings
are parsed from [chains.<name>] TOML sections with serde defaults
falling back to the existing environment variables, preserving full
backwards compatibility.
Thread ChainSettings through Chain, EthereumAdapter, and the
free receipt-fetching functions so each chain can be independently
tuned.
* docs: Document per-chain RPC settings in config and env vars
Add the full list of per-chain Ethereum RPC tuning settings to
docs/config.md with env var fallback defaults, and add a
cross-reference note in docs/environment-variables.md.
* node: Validate per-chain settings on config load
Reject invalid ChainSettings values at startup: max_block_range_size
and max_event_only_range must be positive (i32), and block_batch_size,
block_ptr_batch_size, block_ingestor_max_concurrent_json_rpc_calls,
and get_logs_max_contracts must be non-zero (used as .buffered() args
or filter batch limits where 0 would panic or silently break).
* node, docs: Address review feedback on per-chain settings
- Guard ChainSettings::validate() to Ethereum chains only
- Add zero-value validation for polling_interval, json_rpc_timeout,
request_retries, and target_triggers_per_block_range
- Fix ETHEREUM_POLLING_INTERVAL env var name in doc comment (drop GRAPH_ prefix)
- Fix polling_interval default in docs (500ms → 1000ms)1 parent 1d39f7d commit 0c9940a
File tree
12 files changed
+765
-100
lines changed- chain/ethereum/src
- docs
- gnd/src/commands/test
- node
- resources/tests
- src
- tests/src/fixture
12 files changed
+765
-100
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
| 367 | + | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
550 | 553 | | |
551 | 554 | | |
552 | 555 | | |
| |||
596 | 599 | | |
597 | 600 | | |
598 | 601 | | |
599 | | - | |
| 602 | + | |
600 | 603 | | |
601 | 604 | | |
602 | 605 | | |
| |||
1771 | 1774 | | |
1772 | 1775 | | |
1773 | 1776 | | |
1774 | | - | |
| 1777 | + | |
1775 | 1778 | | |
1776 | 1779 | | |
1777 | 1780 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
71 | 109 | | |
72 | 110 | | |
73 | 111 | | |
| |||
192 | 230 | | |
193 | 231 | | |
194 | 232 | | |
195 | | - | |
| 233 | + | |
196 | 234 | | |
197 | | - | |
| 235 | + | |
198 | 236 | | |
199 | 237 | | |
200 | 238 | | |
| |||
206 | 244 | | |
207 | 245 | | |
208 | 246 | | |
209 | | - | |
| 247 | + | |
210 | 248 | | |
211 | 249 | | |
212 | 250 | | |
| |||
325 | 363 | | |
326 | 364 | | |
327 | 365 | | |
328 | | - | |
329 | 366 | | |
330 | 367 | | |
331 | 368 | | |
332 | 369 | | |
333 | 370 | | |
334 | 371 | | |
| 372 | + | |
335 | 373 | | |
336 | 374 | | |
337 | 375 | | |
| |||
388 | 426 | | |
389 | 427 | | |
390 | 428 | | |
391 | | - | |
392 | 429 | | |
| 430 | + | |
393 | 431 | | |
394 | 432 | | |
395 | 433 | | |
| |||
406 | 444 | | |
407 | 445 | | |
408 | 446 | | |
409 | | - | |
| 447 | + | |
410 | 448 | | |
411 | 449 | | |
412 | 450 | | |
| |||
637 | 675 | | |
638 | 676 | | |
639 | 677 | | |
640 | | - | |
| 678 | + | |
641 | 679 | | |
642 | 680 | | |
643 | 681 | | |
| |||
0 commit comments