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.92k stars 982 forks source link

Setting multiple ethreum rpc is not working from docker-compose #1328

Closed leonprou closed 5 years ago

leonprou commented 5 years ago

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

What is the current behavior? I cannot connect to multiple networks while running graph-node in docker-compose

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. In docker-compose I set the following:

    environment:
      postgres_host: postgres:5432
      postgres_user: graph-node
      postgres_pass: let-me-in
      postgres_db: graph-node
      ipfs: 'ipfs:5001'
      ethereum: 'fuse:rpc.fusenet.io ropsten:https://ropsten.infura.io/v3/{key}'
      RUST_LOG: info

Then graph-node log gives the error:

graph-node_1  | Oct 31 13:52:44.953 INFO Creating transport, url: rpc.fusenet.io ropsten:https://ropsten.infura.io/v3/{key}, network: fuse
graph-node_1  | Oct 31 13:52:44.959 INFO Successfully connected to IPFS node at: http://ipfs:5001/
graph-node_1  | thread 'main' panicked at 'Failed to connect to Ethereum RPC: Transport("RelativeUrlWithoutBase")', src/libcore/result.rs:1084:5

What is the expected behavior? as @Jannis told me it should work

Jannis commented 5 years ago

This isn't expected to work right now because the Ethereum environment variable is interpreted as a single network string.

What I suggest we'll do is allow the env var to be a CSV list that we split up in the docker/start-node script.

leonprou commented 5 years ago

I see, thanks :)