Graph-node currently "takes your word" for which network you're connecting it to. It should verify this, at least at startup.
If you specific --ethereum-rpc as mainnet the actual connection can be anything (e.g. rinkeby or even something not ETH), it'll simply use the connection. Best case is the log will fill with errors. But it also happens that it skips over blocks as it (off course) doesn't encounter events it should index.
Verifying chainid with net_version would avoid problems.
This is an interesting and good idea. There is currently no concept of chain id graph node, and the strings used for network identification are not canonical outside "mainnet" which has meaning on the network
Graph-node currently "takes your word" for which network you're connecting it to. It should verify this, at least at startup.
If you specific
--ethereum-rpc
asmainnet
the actual connection can be anything (e.g. rinkeby or even something not ETH), it'll simply use the connection. Best case is the log will fill with errors. But it also happens that it skips over blocks as it (off course) doesn't encounter events it should index.Verifying chainid with
net_version
would avoid problems.