feat: add ETHEREUM_HTTP_TIMEOUT_MS env var for viem HTTP transport#20919
Merged
PhilWindle merged 2 commits intomerge-train/spartanfrom Mar 12, 2026
Merged
feat: add ETHEREUM_HTTP_TIMEOUT_MS env var for viem HTTP transport#20919PhilWindle merged 2 commits intomerge-train/spartanfrom
PhilWindle merged 2 commits intomerge-train/spartanfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PhilWindle
approved these changes
Mar 12, 2026
Collaborator
|
❌ Failed to cherry-pick to |
This was referenced Mar 12, 2026
Closed
spalladino
added a commit
that referenced
this pull request
Mar 12, 2026
…ackport #20919) (#21434) ## Summary Backport of #20919 to v4-next. Adds `ETHEREUM_HTTP_TIMEOUT_MS` env var to configure the timeout for viem HTTP transports used in L1 RPC calls. Introduces `makeL1HttpTransport` helper to centralize transport creation with consistent timeout support. ## Conflict Resolution Cherry-pick had a conflict in `blob-client/src/client/http.ts` because `next` had refactored `getSlotNumber` to accept `parentBeaconBlockRoot` as a parameter. Resolved by keeping the v4-next code structure and applying only the transport change (`makeL1HttpTransport` with timeout support). ## Commits 1. Cherry-pick with conflict markers (for reviewability) 2. Conflict resolution ClaudeBox log: https://claudebox.work/s/02b67d20aae96377?run=2 --------- Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
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.
Summary
ETHEREUM_HTTP_TIMEOUT_MSenv var to configure the HTTP timeout on viem'shttp()transport (default is viem's 10s)makeL1HttpTransporthelper inethereum/src/client.tsto centralize the repeatedfallback(urls.map(url => http(url, { batch: false })))patterncreatePublicClientcall sites (archiver, aztec-node, sequencer, prover-node, epoch-cache, blob-client) to use the helper with the configurable timeoutMotivation
Users hitting
TimeoutError: The request took too long to respondon archivereth_getLogscalls when querying slow or public L1 RPCs. Viem's default 10s timeout is too short for large log queries and there was no way to configure it.Test plan
yarn buildpassesyarn formatandyarn lintpassETHEREUM_HTTP_TIMEOUT_MS=60000and confirm the archiver no longer times out on largeeth_getLogsranges🤖 Generated with Claude Code