Developers Forum for XinFin XDC Network

Mr. Popovich
Mr. Popovich

Posted on

THE GRAPH

Deployment to yodaplus

  1. graph create --node https://graph-node.yodaplus.net:8020/ pro100skm/xsp
  2. graph deploy --node https://graph-node.yodaplus.net:8020/ --ipfs https://graph-node.yodaplus.net:5001 pro100skm/xsp
  3. Thats the link for getting results: https://graph-node.yodaplus.net:8000/subgraphs/name/pro100skm/xsp . But subgraph doesn't work. No data at all.

TheGraph on our server

  1. https://github.com/XinFinOrg/theGraph - last commit 10 months ago. Anyway, I run it.
  2. docker-compose up - simple way to up server
  3. graph create --node http://{ip}:8020/ pro100skm/xsp - creating subgraph
  4. graph deploy --node http://{ip}:8020/ --ipfs http://{ip}:5001 pro100skm/xsp - deploying subgraph to our server

Error:

graph-node_1  | Jul 09 09:36:44.361 ERRO registering metric [deployment_eth_rpc_request_duration] because it was already registered, component: MetricsRegistry
graph-node_1  | Jul 09 09:36:44.361 ERRO registering metric [deployment_eth_rpc_errors] because it was already registered, component: MetricsRegistry
graph-node_1  | Jul 09 09:36:44.370 INFO Scanning blocks [46717592, 46717592], range_size: 1, sgd: 1, subgraph_id: QmXNUHbd8nk9EU89WpgDQ4GPo4XSe7HKcZE9vs85Za25tn, component: BlockStream
graph-node_1  | Jul 09 09:36:44.908 INFO Scanning blocks [46717593, 46717602], range_size: 10, sgd: 1, subgraph_id: QmXNUHbd8nk9EU89WpgDQ4GPo4XSe7HKcZE9vs85Za25tn, component: BlockStream
graph-node_1  | Jul 09 09:36:45.123 INFO Scanning blocks [46717603, 46717702], range_size: 100, sgd: 1, subgraph_id: QmXNUHbd8nk9EU89WpgDQ4GPo4XSe7HKcZE9vs85Za25tn, component: BlockStream
graph-node_1  | Jul 09 09:36:46.880 WARN Trying again after load block 0x855b…998e failed (attempt #10) with result Err(Ethereum node did not find block 0x855b2b1833cf688bc94b36909b98e868717d084ecc5a632a37c793e98b24998e), sgd: 1, subgraph_id: QmXNUHbd8nk9EU89WpgDQ4GPo4XSe7HKcZE9vs85Za25tn, component: BlockStream
graph-node_1  | [2022-07-09T09:36:46Z WARN  web3::transports::http] Error resuming asynchronous request: Ok(b"{\"jsonrpc\":\"2.0\",\"id\":159,\"result\":null}\n")
Enter fullscreen mode Exit fullscreen mode

Discussion (17)

Collapse
vishrut_srivastava_1ec5cb profile image
Vishrut Srivastava

@pro100skm please try now.

Collapse
pro100skm profile image
Mr. Popovich Author

The same. I'll check it after a while. Maybe its indexing

Collapse
vishrut_srivastava_1ec5cb profile image
Vishrut Srivastava

Please check now and let us know.

Thread Thread
pro100skm profile image
Mr. Popovich Author

No, doesn't work. At least returns empty data.

Thread Thread
pro100skm profile image
Mr. Popovich Author

This is libs that I use for compile and build subgraph. Are they ok?

"@graphprotocol/graph-cli": "^0.21.0",
"@graphprotocol/graph-ts": "^0.20.0",
"@openzeppelin/contracts": "^4.6.0",
"@openzeppelin/subgraphs": "^0.1.7-1"

Thread Thread
ncode profile image
ncode

@pro100skm Can you try redeploying it? I have deployed a subgraph on mainnet to query the ERC721 which seems to work fine.

graph-node.yodaplus.net:8000/subgr...

I have used this repo to deploy it.
github.com/wighawag/eip721-subgraph

Thread Thread
vishrut_srivastava_1ec5cb profile image
Vishrut Srivastava

Which subgraph are you using? Do you have the github link?

Thread Thread
pro100skm profile image
Mr. Popovich Author
Thread Thread
ncode profile image
ncode

@pro100skm Getting some compilation erros
xdc.dev/uploads/articles/qx5bp3it3...

Thread Thread
pro100skm profile image
Mr. Popovich Author
Thread Thread
ncode profile image
ncode

@pro100skm I did this deployment on Apothem , I did it twice
First time : I did it from the latest block count , but it only indexed one / two records.
Second time: 35252497 This block count, It's now indexing data when checked after certain intervals.
Deployment : graph-node-apothem.yodaplus.net:80...

Thread Thread
pro100skm profile image
Mr. Popovich Author

apothem is great, but we have a problem with mainnet graphql

Collapse
vishrut_srivastava_1ec5cb profile image
Vishrut Srivastava

We havent touched deployment for 6 months. We have used the same code as github.com/XinFinOrg/theGraph and deployed on AWS. We are debugging the issue. It seems to be an ipfs issue on the deployed server as that is where we are getting the error. We will reply once we have found root cause.

Collapse
belle profile image
Belle

Thank you for your attention to this issue.

Collapse
pro100skm profile image
Mr. Popovich Author

deployed new subgraph for all ERC20 tokens

Source code:
github.com/pro100skm/all-erc20-sub...

Subgraph link:
graph-node.yodaplus.net:8000/subgr...

Collapse
akhekade profile image
Atul Khekade

Will have Devs look at this.

Meanwhile you can use code block ~~ for larger block of code.

Collapse
pro100skm profile image
Mr. Popovich Author

yeah, updated. thx