Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth_getfilterchanges response error code on filter not found #5506

Closed
jeremyjams opened this issue Mar 28, 2023 · 0 comments · Fixed by #5513
Closed

eth_getfilterchanges response error code on filter not found #5506

jeremyjams opened this issue Mar 28, 2023 · 0 comments · Fixed by #5513

Comments

@jeremyjams
Copy link

Description
If the filter is not found, the Nethermind eth_getfilterchanges JSON-RPC API response error code is expected to behave like other Ethereum clients.

Further examples illustrates response error codes of couple Ethereum clients:

  • Geth - 32000 🟢
  • Besu - 32000 🟢
  • Nethermind - 32603 🔴

Steps to Reproduce

Geth

  • docker run --rm -p 8545:8545 ethereum/client-go:v1.11.5 --dev --http --http.addr 0.0.0.0
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x00"],"id":1}' -H "Content-Type: application/json" http://localhost:8545
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"filter not found"}}
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x01"],"id":2}' -H "Content-Type: application/json" http://localhost:8545
{"jsonrpc":"2.0","id":2,"error":{"code":-32000,"message":"filter not found"}}

Besu

  • docker run --rm -p 8545:8545 hyperledger/besu:23.1.0 --network=dev --rpc-http-enabled=true --rpc-http-host="0.0.0.0"
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x00"],"id":1}' -H "Content-Type: application/json" http://localhost:8545
{
  "jsonrpc" : "2.0",
  "id" : 1,
  "error" : {
    "code" : -32000,
    "message" : "Filter not found"
  }
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x01"],"id":2}' -H "Content-Type: application/json" http://localhost:8545
{
  "jsonrpc" : "2.0",
  "id" : 2,
  "error" : {
    "code" : -32000,
    "message" : "Filter not found"
  }
}

Nethermind

  • docker run --rm -p 8545:8545 nethermind/nethermind:1.17.3 --config AuraTest --JsonRpc.Enabled true --JsonRpc.Host "0.0.0.0"
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x00"],"id":1}' -H "Content-Type: application/json" http://localhost:8545
{"jsonrpc":"2.0","error":{"code":-32603,"message":"Filter with id: '0' does not exist."},"id":1}
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x01"],"id":2}' -H "Content-Type: application/json" http://localhost:8545
{"jsonrpc":"2.0","error":{"code":-32603,"message":"Filter with id: '1' does not exist."},"id":2}

Actual behavior

  • Nethermind client
{
  "error": {
    "code": -32603,
    "message": "Filter with id: '0' does not exist."
  },
  [...]
}

Expected behavior

  • Other Ethereum clients
{
    "error": {
        "code": -32000,
        "message": "Filter not found"
    },
    [...]
}

Desktop

  • Operating System: Linux - Ubuntu
  • Installation Method: Docker
  • Nethermind@1.17.3 (2023-03-28 latest)

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants