Force-inclusion server rejects JSON-RPC batch requests with -32700
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 76/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Go
- Estrelas
- 362
- Forks
- 295
- Merge médio
- 9h 29min
- PRs com merge (30d)
- 3
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de evstack/ev-node
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
DA subscriber: inline rollback does not wake catch-upTalvez já em andamento @damiannolan assumiu hoje. Abertaneeds-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
Mantenedores costumam responder em até 1 dia
-
DA follower: split-namespace height counted as done before its other namespace is processedTalvez já em andamento @damiannolan assumiu hoje. Abertaneeds-triage
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 30/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 55/100
Mantenedores costumam responder em até 1 dia
Todas as issues de evstack/ev-node
Issues semelhantes
-
agent:ready
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
turbot/flowpipe#1162 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
LifetimeRemaining divides by zero when expireAfter is 0s, producing NaN disruption costsTalvez já em andamento @weirong-ui assumiu hoje. Abertakind/bug needs-priority needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
kubernetes-sigs/karpenter#3728 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
compaction: redundant exclusion checks after inRangeTalvez já em andamento @moodbased assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
docker/mcp-registry#8199 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia