[Bug] If eth_getLogs returns block with "removed": true - subgraph stucks indefinitely #5661
Open
1 of 3 tasks
Labels
bug
Something isn't working
Bug report
Maaaybe connected with #3105
My subgraph stucked on my chain on 4073521 block and I see Index node is trying to resync it constantly (see log output).
I checked that Index node is doing that with
eth_getLogs
, and performed the request myself. In the output I saw two different blocks even though the request was only for 1 block:So, I went ahead and checked that these 2 blocks in response one has
removed: false
and another hasremoved: true
, so it seems some reorg happened at that block, and node knows about that so returns data about both events.Although, Index node seems to not to interpret this data correctly and stucks trying to understand why 1 block is actually two blocks (see log output).
Probably, this is an expected behavior:
https://github.com/graphprotocol/graph-node/blob/master/chain/ethereum/src/ethereum_adapter.rs#L1708C1-L1716C22
In these lines of code authors wrote that this function will not properly handle if the chain is a subject of reorgs. But it sounds a bit weird to me as there is no information on ethereum.org (https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) that eth_getLogs shall not return removed blocks after the finality time.
Is this something that could be fixed? Thanks!
Relevant log output
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
OS information
Linux
The text was updated successfully, but these errors were encountered: