graphprotocol / graphprotocol/graph-node

graphman commands for analyzing and fixing bad block issues

Open
#3,145 1 comment 0 reactions 1 assignee View on GitHub

@tilacog is already working on this.

Since Jan 11, 2022.

area/graphman enhancement
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Sometimes, we're missing transactions from blocks returned from Ethereum nodes.

Usually, we then have to manually

  • compare the block in our database with the block returned from the Ethereum node,
  • identify what subgraphs are or might be affected,
  • roll them back or restart them.

This is tedious. It would be great to have graphman commands that do the following:

  1. Given a network and block number or hash
    • Compare our cached block with the block on this network, identify all contract addresses of mismatching data in the block
    • Print a diff of the block
    • Print lists of all subgraphs that might be affected:
      • All subgraphs for this network that failed on that block
      • All subgraphs for this network that have
        • data sources for one of the contract addresses included in the mismatching block data
        • data sources with no contract address
  2. Fix a block by refetching it from the network
  3. Rewind / restart a list of subgraph deployments, if we don't have commands for this yet

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.