-
Notifications
You must be signed in to change notification settings - Fork 62
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_getLogs returns wrong blockHash #208
Comments
I'm running into the same issues, which makes multiple applications I want to set up for the XDC network crash. The Block hashes actually seem random and are also not the parent hashes or comparable. |
Gnosis safe and graph-node use |
It seems this bug disappeared from one block number. For example, The blockHash of block number 45204373 / 0x2b1c395 is 0xeff3b01cb14bd7eaaaf3972249be2b69cea6724acb0949751c29c57bd675ab47. And below command returns right blockHash now. curl -s -X POST https://erpc.apothem.network/ -H "Content-Type: application/json" -d '
{
"id": 1610,
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [
{
"address": "0x53350795c11cee781a7e174479778f848d76ab2a",
"fromBlock": "0x2b1c395",
"toBlock": "0x2b1c395",
"topics": [
[
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac"
]
]
}
]
}' | jq response {
"jsonrpc": "2.0",
"id": 1610,
"result": [
{
"address": "0x53350795c11cee781a7e174479778f848d76ab2a",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000d4ce02705041f04135f1949bc835c1fe0885513c",
"0x00000000000000000000000085f33e1242d87a875301312bd4ebaee8876517ba"
],
"data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"blockNumber": "0x2b1c395",
"transactionHash": "0x2a70ccf516712fd885dd1bf3e45cb6f0b75dd3dd7ad09c747b7798c081ccdca9",
"transactionIndex": "0x1",
"blockHash": "0xeff3b01cb14bd7eaaaf3972249be2b69cea6724acb0949751c29c57bd675ab47",
"logIndex": "0x1",
"removed": false
}
]
} But the older block number of this JSONRPC still returns wrong blockHash, such as 36381303. |
if there is any way we can support this, let us know. This issue really would be great to get fixed as it's holding a lot of our developments back. We also run a mainnet full and archive node, so if access to it helps, I can generate a URL for you to access it. |
Here is another test case. The hash of block 45631260 / 0x2b8471c is Request: curl -s -X POST https://erpc.apothem.network/ -H "Content-Type: application/json" -d '
{
"id": 1610,
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [
{
"address": "0x2a5c77b016df1b3b0ae4e79a68f8adf64ee741ba",
"fromBlock": "0x2b8471c",
"toBlock": "0x2b8471c",
"topics": [
[
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
]
}
]
}' | jq Response: {
"jsonrpc": "2.0",
"id": 1610,
"result": [
{
"address": "0x2a5c77b016df1b3b0ae4e79a68f8adf64ee741ba",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000738bf270934a46bd607ca8cb1222cf16faf099fc",
"0x0000000000000000000000005a4674ab5768e08c347d78ace037b9875a488b73"
],
"data": "0x0000000000000000000000000000000000000000000000004c53ecdc18a60000",
"blockNumber": "0x2b8471c",
"transactionHash": "0x0b1c97fabd7d7a9505e5df426ecf5f8ebbf8bae988eb64e394c177d656cb7199",
"transactionIndex": "0x1",
"blockHash": "0x851cb67720d6a78bef95be0148d0ef620c6daf6fd662befcccf38097f2973873",
"logIndex": "0x1",
"removed": false
}
]
} The blockHash Request: curl -s -X POST https://erpc.apothem.network/ -H "Content-Type: application/json" -d '
{
"id":1,
"jsonrpc":"2.0",
"method":"eth_getBlockByHash",
"params":["0x851cb67720d6a78bef95be0148d0ef620c6daf6fd662befcccf38097f2973873", false]
}' | jq Response: {
"jsonrpc": "2.0",
"id": 1,
"result": null
} This block block 45631260 / 0x2b8471c is created at |
Closed by #320. |
Now the rpc node of xinfin blockchain returns wrong blockHash when call method
eth_getLogs
. Below is an example:request:
response:
The right blockHash shoud be
0xe8ec0bfc021f839fd0a69ae89689e309632af2cc434e8a096732068f0736864b
according to https://explorer.apothem.network/blocks/0x22b2277#transactions. The blockHash0x194a513ea40c94fccaca470cccb24c2ff3bd6398dec9a04e3eb3a4bfef8a330e
in response is wrong.The text was updated successfully, but these errors were encountered: