Force-inclusion server rejects JSON-RPC batch requests with -32700
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Read apps/evm/server/force_inclusion.go and handleJSONRPC first, then review the existing tests in apps/evm/server/force_inclusion_test.go. Check how single requests are routed and how the response helpers handle errors. Done when batch requests without eth_sendRawTransaction are proxied and batches containing it or empty batches receive the specified invalid request error; the issue reports two tests and go test ./server/ as verification.
由索引模型根据 Issue 内容生成。
描述
Version Information
ev-node: main @ e8626b1 (apps/evm, force-inclusion server in apps/evm/server/force_inclusion.go)
Execution Implementation: any EVM execution RPC behind the proxy
System Information
Found by reading the code and reproduced with a unit test (httptest), not on a running network.
OS Type & Version: Linux (cloud dev box)
Architecture: amd64
Network Configuration
No response
Development Environment
Go Version: 1.26.6 (as in apps/evm/go.mod)
Configuration Details
Default force-inclusion server config, with an execution RPC URL set (so that unknown methods are proxied).
Steps to Reproduce
- Start the force-inclusion server with an execution RPC URL.
- Send a JSON-RPC batch, e.g.
[{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]},{"jsonrpc":"2.0","id":2,"method":"eth_blockNumber","params":[]}] - Clients do this on their own: e.g. ethers v6
JsonRpcProvidergroups requests sent within a few milliseconds into one batch by default.
Expected Result
A batch without eth_sendRawTransaction is forwarded to the execution RPC like a single request is today.
A batch that contains eth_sendRawTransaction should not be forwarded as-is, because the transaction would then reach the execution RPC instead of going through forced inclusion. It should get an explicit error (or be handled per element).
Actual Result
handleJSONRPC always unmarshals the body into a single JSONRPCRequest. A JSON array fails that, so the server answers {"error":{"code":-32700,"message":"invalid JSON"}} and nothing reaches the execution RPC, although the request is valid JSON-RPC 2.0.
Relevant Logs
Additional Information
Proposed fix (small, I have it with tests):
- if the body starts with
[, handle it as a batch; - a batch without
eth_sendRawTransactionis proxied unchanged to the execution RPC; - a batch containing
eth_sendRawTransaction, or an empty batch, is rejected with -32600 (Invalid Request). Handling each element separately is possible too, but needs a larger refactor of thewrite*helpers, so I kept it minimal; happy to do it the other way if you prefer.
Two tests in apps/evm/server/force_inclusion_test.go fail on main (the batch is not forwarded / -32700 instead of -32600) and pass with the change; go test ./server/, gofmt and go vet are clean. I haven't run golangci-lint or the e2e tests.
If this approach is fine, I can open the PR.
This report was written with help from an AI assistant (Claude Code) and reviewed before submitting.
- 主要语言
- Go
- 星标
- 362
- 派生
- 295
- 平均合并
- 9 小时 29 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
evstack/ev-node 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
DA subscriber: inline rollback does not wake catch-up可能已有人在做 @damiannolan 今天认领。 未关闭needs-triage
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 1 天内回复
-
DA follower: split-namespace height counted as done before its other namespace is processed可能已有人在做 @damiannolan 今天认领。 未关闭needs-triage
难度 4/5 3-5 天 新手友好度 30/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 55/100
维护者通常 1 天内回复
相似的 Issue
-
agent:ready
难度 2/5 1-3 小时 新手友好度 67/100
turbot/flowpipe#1162 · 1 条评论 ·
维护者通常 1 天内回复
-
LifetimeRemaining divides by zero when expireAfter is 0s, producing NaN disruption costs可能已有人在做 @weirong-ui 今天认领。 未关闭kind/bug needs-priority needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
kubernetes-sigs/karpenter#3728 · 1 条评论 ·
维护者通常 1 天内回复
-
compaction: redundant exclusion checks after inRange可能已有人在做 @moodbased 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
docker/mcp-registry#8199 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复