Skip to content

[Feature] Do not ingest blocks if the new head block number is significantly higher than the previously known block head block number #4554

@paymog

Description

@paymog

Description

Logic was recently introduced which guarded against the head block going backwards. It would be great if logic could also be introduced to prevent the head block from skipping forwards by a lot, 10% for example.

Some reasons for why this could be useful:

  1. there's an issue with upstream rpc providers where they misconfigure their infra and switch nodes for a given endpoint, ie: the mainnet endpoint starts serving arbitrum blocks
  2. an indexer does a config update and accidentally configures, eg, the mainnet ingester to use an aribtrum endpoint

If this edge case happens, the block cache gets corrupted and requires significant manual intervention. It would be great if graph node could attempt to detect this issue and prevent the block cache from getting corrupted during the block ingestion process.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

I'm not aware of any blockers.

Some information to help us out

  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions