Commit 277f45e
authored
Add RPC provider failover for block ingestor (#6430)
* graph: Fix retry_strategy underflow when limit is 0
Use saturating_sub to avoid underflow when limit is set to 0.
* chain/ethereum: Add RPC provider failover for block ingestor
When do_poll() fails, the ingestor now probes the current provider
before switching. If the current provider is unreachable, all
alternatives are probed in parallel and the first healthy one is
selected. This avoids unnecessary switches on non-RPC failures
(e.g. DB errors, chain reorgs).
Also limits latest_block_ptr retries to ENV_VARS.request_retries
so failures surface to the failover logic instead of retrying
indefinitely.
* docs: Document block ingestor failover behavior
* chain/ethereum: Return provider directly from resolve_provider
Simplify resolve_provider_idx into resolve_provider by returning
a reference to the Arc<A> instead of a usize index, eliminating
the separate indexing step at the call site.1 parent 192869f commit 277f45e
File tree
8 files changed
+442
-31
lines changed- chain/ethereum
- src
- docs
- graph/src/util
8 files changed
+442
-31
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
1177 | 1182 | | |
1178 | 1183 | | |
1179 | 1184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
1249 | | - | |
| 1249 | + | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
| |||
1270 | 1270 | | |
1271 | 1271 | | |
1272 | 1272 | | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1273 | 1281 | | |
1274 | 1282 | | |
1275 | 1283 | | |
| |||
0 commit comments