fix(evm-rpc): retry eRPC upstreams-exhausted errors instead of crashing the dumper - #545
Open
elina-chertova wants to merge 1 commit into
Open
fix(evm-rpc): retry eRPC upstreams-exhausted errors instead of crashing the dumper#545elina-chertova wants to merge 1 commit into
elina-chertova wants to merge 1 commit into
Conversation
When routed through eRPC, a transient upstream failure (all providers
rate-limited or returning 5xx) comes back as an HTTP 200 JSON-RPC error
whose code can be normalized to a misleading value such as -32601
("method not found"). EvmRpcClient treated that as fatal, so a single
provider hiccup crash-looped the dumper. Recognize eRPC's stable
data.code (ErrUpstreamsExhausted / ErrFailsafeRetryExceeded) as a
retryable connection error, matching how a direct provider 5xx is
already retried.
Contributor
Author
|
Related open PRs harden |
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.
Symptom
Alert linea-mainnet_No_Dumper_Data (evm-archive, kind=dump).
dump-linea-mainnet-0is in CrashLoopBackOff (140 restarts / 27h); no raw data written.Root cause (proven from pod logs)
The linea-mainnet dumper was routed through eRPC on 2026-07-22 (infra commit
248d45930"Roll out eRPC to almost every archive ingester"; the dump pod's 27h age matches). eRPC's only primary upstream for linea is Alchemy, which is currently degraded — live probes return HTTP 503-32001 "Unable to complete request at this time"and 429 "compute units per second exceeded" for linea.eRPC does not fail over to the healthy dwellir/uniblock fallbacks, and returns the request as an HTTP 200 body carrying a JSON-RPC error whose code is normalized to
-32601("method eth_getBlockByNumber does not exist/is not available") withdata.code: ErrFailsafeRetryExceeded→cause.code: ErrUpstreamsExhausted.EvmRpcClient.isConnectionErrordid not recognize this shape, so the error was fatal (dump log level 5) and the process exited:Before the eRPC switch the same underlying Alchemy 503 arrived as a raw HTTP 503, which the client already retries — so eRPC repackaging it as a fatal JSON-RPC error is what turned a recoverable degradation into a crash-loop.
Fix
Recognize eRPC's stable
data.code(ErrUpstreamsExhausted/ErrFailsafeRetryExceeded) as a retryable connection error inEvmRpcClient.isConnectionError. This restores parity with a direct provider 5xx: the dumper backs off and retries (retryAttempts=MAX) instead of crash-looping, so a single provider hiccup can no longer take the dump down. A genuine-32601with no eRPCdatastays fatal.Test
evm/evm-rpc/test/rpc-client.test.ts— asserts the production error shape is retryable and a real method-not-found is not. Red on pre-fix (2 fail), green after.Falsification
If the dump still crash-loops after deploying an evm-dump built from this change with the same
-32601/ErrUpstreamsExhaustedfatal line, the classifier isn't matching the real payload shape.Note (operator action, not in this PR)
This stops the crash-loop but does not by itself restore linea data flow: Alchemy is down for linea while eRPC isn't failing over. An operator should route linea to a healthy provider (dwellir + uniblock both return 200 for linea now) or fix the eRPC failover, and raise the Alchemy linea 503/429 with the provider (https://status.alchemy.com). Provider swaps are an operator mitigation, so they're intentionally not included here.