fix(archiver): keep the stream watchdog above the eth client's fetch retry budget - #1349
DylanVerstraete wants to merge 1 commit into
Conversation
PR SummaryLow Risk Overview The flag is now Reviewed by Cursor Bugbot for commit ecf9ecc. Bugbot is set up for automated code reviews on this repo. Configure here. |
…retry budget Audit finding 6. eth::Client::try_fetch_block retries a block fetch for 5 sweeps over [primary, fallbacks] with 10/20/40/60 s back-off, 130 s of waiting in total. The archiver's stream watchdog defaulted to 120 s, so on a block that only a fallback could serve the watchdog rebuilt the stream (reconnect + anchor check) 10 s before the client would have either succeeded via a fallback or surfaced the real error. Default raised to 180 s, the flag is NonZeroU64 (0 meant an immediate, endless reconnect loop), and the relationship is documented on the flag and in the README.
19ddb4e to
407204c
Compare
73b44dd to
ecf9ecc
Compare
Sixth (and smallest) PR of the archiver liveness audit (finding 6). Stacked on #1348 → #1347 → #1346 → #1345 → #1344; retarget to
usc-devas those merge.Problem
eth::Client::try_fetch_blockretries a block fetch for 5 sweeps over[primary, fallbacks…]with 10/20/40/60 s back-off: 130 s of waiting before it gives up. The archiver's stream watchdog (--stream-timeout-secs) defaulted to 120 s. On a block that only a fallback can serve, or a primary that is flapping, the watchdog tore the stream down (reconnect, anchor check, re-subscribe) 10 s before the client would have either succeeded through a fallback or surfaced the real error. With #1348 wiring fallbacks into the archiver this mismatch would have made them mostly pointless.Changes
--stream-timeout-secs120 → 180.NonZeroU64:0produced an immediate timeout and an endless reconnect loop.No behaviour change for deployments that set the flag explicitly (other than rejecting
0).Verification
cargo test -p archiver(36), clippy-D warnings, fmt.