I'm running a node graph locally using The Graph.
I connected it to a HardHat network.
As soon as I run the docker-compose I noticed that the graph starts scanning the whole blockchain history.
Can I set something in the configuration in order to tell to the graph to NOT start scanning from the genesis block but from the latest one or from a specific one that I want?

1 Answer 1


I didn't find anything on how to force to The Graph to not start scanning as soon as it starts BUT there is the possibility to configure the genesis block.
In the docs I found the variable GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER that is used for this purpose.
This allows you to don't start scanning from the 0 block, very useful when testing (which is exactly the reason why I did not want the graph to start scanning all the time that is started).

  • You can also use startBlock for the smart contracts that you want to track. That way you can tell the graph to start indexing from that block number. Commented Mar 27, 2023 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.