fix(proxyd): forward out-of-range block requests to backend#547
Closed
sebastianst wants to merge 1 commit intomainfrom
Closed
fix(proxyd): forward out-of-range block requests to backend#547sebastianst wants to merge 1 commit intomainfrom
sebastianst wants to merge 1 commit intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #547 +/- ##
==========================================
- Coverage 57.61% 57.52% -0.10%
==========================================
Files 94 94
Lines 14204 14194 -10
==========================================
- Hits 8184 8165 -19
- Misses 5522 5531 +9
Partials 498 498
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
geoknee
approved these changes
Feb 10, 2026
54d68c5 to
50245f0
Compare
Contributor
|
So I'm going to propose some changes to this. I think you found a bug, we definetly want proxyd to be eth rpc compliant where possible so this is a bug, however we don't want to send requests to our backends if the the backend consensus group does not recognize the block range as valid. So I think the approraite thing to do would be keep the checks and do not forward to the backends, yet change the error response to be eth compliant and debug log the action |
Member
Author
|
works for me! |
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
Fixes #546.
ErrRewriteBlockOutOfRange/ErrBlockOutOfRangeerrors entirelylatestare now forwarded to the backend instead of being intercepted by the rewriter{"result": null}foreth_getBlockByNumberwith a future block)Previously, proxyd returned HTTP 400 with JSON-RPC error code
-32019("block is out of range") for methods likeeth_getBlockByNumberwhen the requested block was beyondlatest. Per the Ethereum JSON-RPC spec, these methods should returnnull, not an error. This also brokeethclientwhich expectsethereum.NotFoundfor missing blocks, not an RPC error.The rewriter's job is to translate block tags (
latest,safe,finalized) to concrete numbers and enforce max block ranges — not to decide whether a specific block number exists. That's the backend's responsibility.Test plan
RewriteNone(pass-through) instead ofRewriteOverrideErrorgo test ./... -timeout 10m)🤖 Generated with Claude Code