erigon icon indicating copy to clipboard operation
erigon copied to clipboard

eth_getBlockTransactionCountByHash & eth_getBlockTransactionCountByNumber return null

Open soos3d opened this issue 3 years ago • 2 comments

Expected behavior

Should return the number of transactions recorded in that block. Something like this:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x6c"
}

Actual behavior

It returns null

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": null
}

Steps to reproduce the behavior

Send this request to an Ethereum node running Erigon:

curl -X POST 'ERIGON_NODE_URL' \
-H 'Content-Type: application/json' \
--data'{"method":"eth_getBlockTransactionCountByHash","params":["0xef746ecf9ee19f508fb16d204ace10ac799f938d4cb87852fe85ab8de24b70ab"],"id":1,"jsonrpc":"2.0"}'

Sending the same request to an archive node running Geth retrieves the correct result.

The block exists in the Erigon database as the following request returns the correct data:

curl -X POST 'NODE_URL' \
-H 'Content-Type: application/json' \
--data'{"method":"eth_getBlockByHash","params":["0xaafff6dbabc20c5c2d58f5a8f336575f22681fd23a9e53bf81e69d8130a29b9c",false],"id":1,"jsonrpc":"2.0"}'

Requests tested with Postman, web3.py, and web3.js. Web3.py results in a traceback, web3.js and Postman return null.

soos3d avatar Jul 19 '22 14:07 soos3d

Hi @soos3d do you still have this issue?

leonardchinonso avatar Jul 26 '22 11:07 leonardchinonso

Hi @soos3d do you still have this issue?

Yes, it is still doing it.

soos3d avatar Jul 27 '22 19:07 soos3d

This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

github-actions[bot] avatar Dec 29 '22 02:12 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jan 05 '23 02:01 github-actions[bot]