1

I am running an EC2 instance with graph-node, using docker.

Let's assume that I have a list of smart contracts that I want my subgraph to track and, at some point, that list gets updated; so I have to re-compile my subgraph and re-deploy it.

Under this scenario: is my node going to sync all blocks from the blockchain again? Even the ones I already have synced on my database? Or is it going to disregard the blocks that do not have any change in terms of the contracts I am tracking?

Basically I want to understand if the information I already have on my database is going to be replaced by new information or if the graph is "smart enough" to keep the information that has not changed (without compromising the performance).

1 Answer 1

0

This is from the official The Graph documentation:

When making changes to your subgraph definition, for example, to fix a problem in the entity mappings, run the yarn deploy command above again to deploy the updated version of your subgraph. Any update of a subgraph requires that Graph Node reindexes your entire subgraph, again starting with the genesis block.

More information here: https://thegraph.com/docs/en/deploying/deploying-a-subgraph-to-hosted/#redeploying-a-subgraph

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.