graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

Hardhat eth fork, can't index block with graph-node.

Open AtmosProtocol opened this issue 3 years ago • 1 comments

Hi there. I'm trying to index blocks using the fork of EVM chain (hardhat node --fork "rpc-url") and unfortunately getting some troubles with graph-node. Need help.

Errors i get:

graph-node_1 | Aug 07 16:41:57.002 WARN Trying again after eth_getBlockByNumber(latest) no txs RPC call failed (attempt #84) with result Err(Unknown(could not get latest block from Ethereum: failed to send request: error sending request for url (http://host.docker.internal:8545/): error trying to connect: tcp connect error: Connection refused (os error 111))), provider: localhost-rpc-0, component: BlockIngestor graph-node_1 | Aug 07 16:42:10.417 WARN Trying again after eth_getBlockByNumber(latest) no txs RPC call failed (attempt #85) with result Err(Unknown(could not get latest block from Ethereum: failed to send request: error sending request for url (http://host.docker.internal:8545/): error trying to connect: tcp connect error: Connection refused (os error 111))), provider: localhost-rpc-0, component: BlockIngestor graph-node_1 | Aug 07 16:42:23.932 WARN Trying again after object.stat failed (attempt #27) with result Err(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("ipfs")), port: Some(5001), path: "/api/v0/object/stat", query: Some("arg=QmemNaaJDvqjpxoCW8Ahye7jVLdAuRrYjbGUKEtMrSxosD"), fragment: None }, source: TimedOut }), sgd: 1, subgraph_id: QmemNaaJDvqjpxoCW8Ahye7jVLdAuRrYjbGUKEtMrSxosD, component: SubgraphAssignmentProvider

My docker-compose.yml

version: '3' services: graph-node: image: graphprotocol/graph-node ports: - '8000:8000' - '8001:8001' - '8020:8020' - '8030:8030' - '8040:8040' depends_on: - ipfs - postgres extra_hosts: - 172.26.0.1:host-gateway environment: postgres_host: postgres postgres_user: graph-node postgres_pass: let-me-in postgres_db: graph-node ipfs: 'ipfs:5001' ethereum: 'localhost:http://host.docker.internal:8545' GRAPH_LOG: info ETHEREUM_REORG_THRESHOLD: 1 ETHEREUM_ANCESTOR_COUNT: 1 ipfs: image: ipfs/go-ipfs:v0.10.0 ports: - '5001:5001' volumes: - ./data/ipfs:/data/ipfs postgres: image: postgres ports: - '5432:5432' command: [ "postgres", "-cshared_preload_libraries=pg_stat_statements" ] environment: POSTGRES_USER: graph-node POSTGRES_PASSWORD: let-me-in POSTGRES_DB: graph-node PGDATA: "/data/postgres" volumes: - ./data/postgres:/var/lib/postgresql/data

  I would really appreciate for help, getting stuck with that a couple of days.

AtmosProtocol avatar Aug 07 '22 16:08 AtmosProtocol

hi @AtmosProtocol are you still having issues? Are you able to index a non-forked Hardhat node?

azf20 avatar Aug 22 '22 12:08 azf20

hi @AtmosProtocol I think this comment should help: https://github.com/graphprotocol/graph-node/issues/4006#issuecomment-1326707084 closing this, please re-open if you're still having issues!

azf20 avatar Nov 24 '22 17:11 azf20