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 971 forks source link

IPFS stat error preventing subgraph deployments + indexing on latest docker image (latest tag) #3811

Open brianluong opened 2 years ago

brianluong commented 2 years ago

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

What is the current behavior? Deploying a subgraph hangs forever, when checking the node's logs I see infinite retries for an IPFS operation:

Aug 02 23:27:25.489 WARN Trying again after IPFS stat failed (attempt #861) with 
result Err(reqwest::Error { kind: Status(404), url: Url { scheme: "http", cannot_be_a_base: false, 
username: "", password: None, host: Some(Domain("[gateway.ipfs.io](http://gateway.ipfs.io/)")), 
port: None, path: "/api/v0/files/stat", query: Some("arg=/ipfs/QmWuzKrsiVCDgho5EFk3F9e6epbpAFBrNhs7WTtSsrTmeu"), fragment: None } }), sgd: 1, 
subgraph_id: QmWuzKrsiVCDgho5EFk3F9e6epbpAFBrNhs7WTtSsrTmeu, component: SubgraphAssignmentProvider

This object exists in IPFS:

➜  ~ curl gateway.ipfs.io/ipfs/QmWuzKrsiVCDgho5EFk3F9e6epbpAFBrNhs7WTtSsrTmeu | head -5
dataSources:
  - kind: ethereum/contract
    mapping:
      abis:
        - file:    

We also have an already deployed subgraph that isn't indexing (block head doesn't change). Seeing the same IPFS error here as well.

Workaround For deploying subgraph: Running with an older version of the v0.26.0 image worked

For already deployed subgraph: I think the DB is corrupted after running latest (v0.27.0), now we're seeing:

thread 'tokio-runtime-worker' panicked at 'failed to initialize subgraph provider 
Error querying subgraph assignments: store error: Unrecognized enum variant: ''', node/src/main.rs:398:30

and

/usr/local/bin/start: line 52:    27 Aborted                 (core dumped) graph-node --node-id "${node_id//-/_}" --postgres-url "$postgres_url" --ethereum-rpc $ethereum --ipfs "$ipfs"

Gonna try to clear the database and reindex...

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

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.