Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cannot support multiple chains #5748

Open
1 of 3 tasks
ziyiyu opened this issue Dec 29, 2024 · 2 comments
Open
1 of 3 tasks

[Bug] Cannot support multiple chains #5748

ziyiyu opened this issue Dec 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ziyiyu
Copy link

ziyiyu commented Dec 29, 2024

Bug report

I want to listen to multiple chains within a single graph node, and I noticed the description in the docker/Dockerfile file is as follows:
# The etherum network(s) to connect to. Set this to a space-separated list of the networks where each entry has the form NAME:URL
ENV ethereum=""
This seems to imply support for multi-chain.But when I use multiple chains in docker/docker-compose.yml
ethereum: 'mainnet:http://host.docker.internal:8545 polygon:http://host.docker.internal:8545'
The following error will occur.

I'm not sure if this is a bug or if multi-chain monitoring is currently not supported.

Relevant log output

graph-node-1  | Waiting for Postgres (postgres:5432)
graph-node-1  | error: unexpected argument 'polygon:http://host.docker.internal:8545' found
graph-node-1  | 
graph-node-1  | Usage: graph-node [OPTIONS]
graph-node-1  | 
graph-node-1  | For more information, try '--help

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out

  • Tick this box if this bug is caused by a regression found in the latest release.
  • Tick this box if this bug is specific to the hosted service.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

OS information

Linux

@ziyiyu ziyiyu added the bug Something isn't working label Dec 29, 2024
@ootiger
Copy link

ootiger commented Jan 22, 2025

I have the same problem, when will resolve this? @Jannis

@akanoce
Copy link

akanoce commented Mar 2, 2025

Encountered the same issue, and seems like the only working solution is to pass the config via config.toml like

[store]
primary = { connection = "postgresql://${postgres_user}:${postgres_pass}@${postgres_host}:${postgres_port}/${postgres_db}", pool_size = 50 }

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

[chains]
ingestor = "block_ingestor_node"

[chains.mainnet]
shard = "primary"
provider = [
    { label = "mainnet", url = "http://mainnet:8545", features = [
        "archive",
        "traces",
    ] },
]

[chains.testnet]
shard = "primary"
provider = [
    { label = "testnet", url = "http://testnet:8545", features = [
        "archive",
        "traces",
    ] },
]

where testnet:8545 and mainnet:8545 are the addresses or the RPC nodes you want to connect to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@akanoce @ziyiyu @ootiger and others