feat: add configurable retry for transient rpc failures - #9
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gacevicljubisa
requested review from
acud,
akrem-chabchoub,
aloknerurkar,
janos,
martinconic and
sbackend123
August 26, 2026 12:55
martinconic
approved these changes
Aug 27, 2026
- Retry HTTP 408, which proxies in front of an RPC endpoint return on a request timeout and which is as transient as 429 and 5xx. - Report the cancellation alongside the last call error when ctx is what stopped the retries, so callers checking errors.Is(err, context.Canceled) (cmd/export.go) can still tell an aborted run from a failed one without losing the underlying cause. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019vJ64hEPkb1AerN7ggCfoB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Transient network errors (e.g.
net/http: TLS handshake timeout) aborted the whole export. RPC calls now retry with a jittered exponential backoff.--retry-max(default 5,0disables) and--retry-delay(default 1s, doubling up to 30s)FilterLogs,BlockNumberandChainID; per-chunk, so no duplicate or missing logs-32005; not other JSON-RPC errors or context cancellation🤖 Generated with Claude Code