Search code examples
ethereumgo-ethereum

How to resolve trace_filter does not exist when deploying balancer sub-graph in graph-node?


I've setup graph-node successfully. After that, I was trying to deploy balancer-subgraph in my graph-node.

Sub-graph deployment procedure:

  1. clone
git clone [email protected]:balancer-labs/balancer-subgraph.git
  1. Install dependencies
yarn
  1. Generate the graph code
yarn codegen
  1. Create local node
yarn create:local
  1. Deploy locally
yarn deploy:local

After deploying I'm getting error like below in my graph node logs

Aug 21 13:15:36.545 ERRO Subgraph instance failed to run: RPC error: Error { code: MethodNotFound, message: "the method trace_filter does not exist/is not available", data: None }, code: SubgraphSyncingFailure, id: QmTMsUH9rUVjpBTDRNuUcNHM3rT9ZZmxkDmTYmyKUpzEJn, subgraph_id: QmTMsUH9rUVjpBTDRNuUcNHM3rT9ZZmxkDmTYmyKUpzEJn, component: SubgraphInstanceManager
Aug 21 13:15:41.071 INFO Syncing 1 blocks from Ethereum., code: BlockIngestionStatus, blocks_needed: 1, blocks_behind: 1, latest_block_head: 10703787, current_block_head: 10703786, network_name: mainnet,
component: BlockIngestor

get node version

Geth
Version: 1.9.9-stable
Git Commit: 017449971e1e9e220efcd97d3313a0e27f47003b
Git Commit Date: 20191206
Architecture: amd64
Protocol Versions: [64 63]
Go Version: go1.13.5
Operating System: linux
GOPATH=/home/ubuntu/work
GOROOT=/usr/local/go

Do I need to enable any kind of API to successfully deploy balancer subgraph?


Solution

  • Geth node doesn't have support trace_filter method so far. For some subgraph like balancer-subgraph, when try to deploy it to graph-node, it'll try to call this method trace_filter. but as geth node didn't have API support, graph-node faces error for this

    Reference: Geth JSON-RPC doesn't have trace_filter API support. Follow this link to find the supported APIs by geth node.

    To fully support graph-node need to use parity node. This has supported APIs by parity