Skip to content

[Bug] Subgraph is requesting a block range that exceeds the current most recent block  #4639

@jurgenwerk

Description

@jurgenwerk

Bug report

We are running a graph node that is consistently around 20-100 blocks behind the latest block indexed in the archive node.

This is on gnosis chain mainnet. We are hosting our own graph node v0.27.0.

The error that keeps appearing is:

May 23 10:57:46.726 WARN Trying again after eth_getLogs RPC call for block range: [28087279..28087335] failed (attempt #10) with result Err(Rpc(Error { code: ServerError(-32001), message: "28087335 could not be found", data: None })), sgd: 3, subgraph_id: QmfBJ5mdAkVbaugY1mcrcqFU2KsTysgwG6smguRFiDDVAC, component: BlockStream

This means the subgraph is requesting a block range that includes some blocks that are not available yet.

I did some testing and the offending block number from the warning message above, at the time of the output, is:

  1. Higher than what is the latest block returned from the archive node
  2. Higher than what is the latest block in the block explorer website (gnosis scan)

It looks like the subgraph has a wrong idea about which block range to request for indexing. It wants blocks that are not available yet.

Perhaps related - this started happening after our subgraph got stuck due to a combination of a reorg and archive node issues and we performed grafting from a lower block number.

Any ideas why the subgraph is behaving like this now and how to mitigate the problem?

Relevant log output

No response

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out

  • Tick this box if this bug is caused by a regression found in the latest release.
  • Tick this box if this bug is specific to the hosted service.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

OS information

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions