JSON-RPC method eth_getBlockByNumber response for non-existing block mismatch #58

Closed
opened 2021-04-19 09:47:27 +00:00 by ramilexe · 1 comment
ramilexe commented 2021-04-19 09:47:27 +00:00 (Migrated from github.com)
  1. Query geth json-rpc:
    note: make sure block number 0x100500 doesn't exists
>curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0", "method": "eth_getBlockByNumber", "params": ["0x100500", true], "id": 1}' localhost:8545
{"jsonrpc":"2.0","id":1,"result":null}
  1. query ipld-eth-server:
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0", "method": "eth_getBlockByNumber", "params": ["0x100500", true], "id": 1}' localhost:8081
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"sql: no rows in result set"}}

1. Query geth json-rpc: note: make sure block number `0x100500` doesn't exists ``` >curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0", "method": "eth_getBlockByNumber", "params": ["0x100500", true], "id": 1}' localhost:8545 {"jsonrpc":"2.0","id":1,"result":null} ``` 2. query ipld-eth-server: ``` curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0", "method": "eth_getBlockByNumber", "params": ["0x100500", true], "id": 1}' localhost:8081 {"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"sql: no rows in result set"}} ```
ramilexe commented 2021-04-21 13:09:45 +00:00 (Migrated from github.com)

fixed in 53f06a66f5

fixed in https://github.com/vulcanize/ipld-eth-server/pull/53/commits/53f06a66f514ef72be4943e92f2f6d0a80a67a81
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/ipld-eth-server#58
No description provided.