graphprotocol / graph-node

Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
https://thegraph.com
Apache License 2.0
2.89k stars 962 forks source link

[Bug] Issue when running graph-node with `--fork-base` flag #4627

Closed Eduard-Voiculescu closed 1 year ago

Eduard-Voiculescu commented 1 year ago

Bug report

Running graph-node locally with

cargo run -- --config  ../../streamingFast/graph-node-dev/config/eth-mainnet-substreams.toml --ipfs "localhost:5001" --fork-base https://api.thegraph.com/subgraphs/id/

And then in another terminal, running a graph deploy command with

./node_modules/.bin/graph deploy --node http://127.0.0.1:8020 --ipfs http://127.0.0.1:5001 minimal --debug-fork QmZWbPvcbsULLZqWac7PkHRYXthAQvpyRj5kQjUnzGmFk1  ./subgraph.yaml

The graph-node will try to query the forked base with the wrong deployment hash. It will ignore the --debug-fork from the graph deploy command and try to run queries with the deployment hash that is deployed (after the graph build/create command run prior to the graph deploy command above).

Relevant log output

No response

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out

OS information

None

Eduard-Voiculescu commented 1 year ago

Version of graph client is way too old. Which was omitting the flag as it doesn't exist.