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.91k stars 977 forks source link

Starting the node with --subgraphs fails if the block has not been downloaded yet #4352

Closed mangas closed 1 year ago

mangas commented 1 year ago

Do you want to request a feature or report a bug? bug

What is the current behavior? Running the same command with an empty db with both rpc and firehose (+eth_call only adapter) yields different results.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

cargo run -p graph-node -- --config ~/.graph-node/config/eth-mainnet-firehose-eth-call.toml --subgraph QmbHg6vAJRD9ZWz5GTP9oMrfDyetnGTr5KWJBYAq59fm1W --ipfs https://api.thegraph.com/ipfs/
cargo run -p graph-node -- --config ~/.graph-node/config/eth-mainnet-rpc-eth-call.toml --subgraph QmbHg6vAJRD9ZWz5GTP9oMrfDyetnGTr5KWJBYAq59fm1W --ipfs https://api.thegraph.com/ipfs/

The configurations look like:

eth-mainnet-firehose.toml

[general]

[store]
[store.primary]
connection = "postgresql://graph-node:let-me-in@localhost:5432/graph-node"
weight = 1
pool_size = 10

[chains]
ingestor = "block_ingestor_node"
[chains.mainnet]
shard = "primary"
protocol = "ethereum"
provider = [
  { label = "firehose", details = { type = "firehose", url = "https://api.streamingfast.io", token = "$STREAMING_FAST_API_TOKEN", features = ["filters"] }},
  { label = "peering", url = "xxxxxxxxx", features = [ "archive" ] },
]

[deployment]
[[deployment.rule]]
shard = "primary"
indexers = [ "default" ]

eth-mainnet-firehose-eth-call.toml

[general]

[store]
[store.primary]
connection = "postgresql://graph-node:let-me-in@localhost:5432/graph-node"
weight = 1
pool_size = 10

[chains]
ingestor = "block_ingestor_node"
[chains.mainnet]
shard = "primary"
protocol = "ethereum"
provider = [
  { label = "firehose", details = { type = "firehose", url = "https://api.streamingfast.io", token = "$STREAMING_FAST_API_TOKEN", features = ["filters"] }},
  { label = "peering", details = { type = "web3call", url = "xxxxxxxxxx", features = [ "archive" ] }},
]

[deployment]
[[deployment.rule]]
shard = "primary"
indexers = [ "default" ]

What is the expected behavior? They should work the same way

github-actions[bot] commented 1 year ago

Looks like this issue has been open for 6 months with no activity. Is it still relevant? If not, please remember to close it.

azf20 commented 1 year ago

@mangas we have made quite a lot of provider changes, is this still valid?

mangas commented 1 year ago

I don't think this matters anymore