streamingfast / substreams-uniswap-v3

Apache License 2.0
46 stars 16 forks source link

make deploy_local error #21

Closed userbox020 closed 3 months ago

userbox020 commented 3 months ago

Hello,

I'm trying to deploy the subgraph to my local host but im getting this error after make deploy_local

(base) mruserbox@guru-X99:/home/guru/Desktop/GURU_PROJECT/grap-node/substreams-uniswap-v3$ make deploy_local
cargo build --target wasm32-unknown-unknown --release
   Compiling substreams-uniswap-v3 v0.1.0 (/media/1TB_NVME/graph-node/substreams-uniswap-v3)
    Finished release [optimized] target(s) in 10.36s
substreams pack -o substreams.spkg substreams.yaml
Successfully wrote "substreams.spkg".
mkdir build 2> /dev/null || true
graph build --ipfs http://localhost:5001 subgraph.yaml
  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6 (graph-ts dependency not installed yet)
  Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
  Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
✔ Apply migrations
✔ Load subgraph from subgraph.yaml
✔ Compile subgraph
  Copy schema file build/schema.graphql
  Write subgraph file build/uniswap_v3/substreams.spkg
  Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/
  Add file to IPFS build/schema.graphql
                .. QmUgUVBCvnN7VW5dCoV5rp8gfUGGxai56u2rWtiwDStYUm
  Add file to IPFS build/uniswap_v3/substreams.spkg
                .. QmUMgQbLhL6qdYQtdJjyCdfAJdzS3UNakBpxNCYzhjvuEN
✔ Upload subgraph to IPFS

Build completed: QmagygjECxUq55gxUVv1XmR4QaK36CA81iGeR9tVJX1LUt

graph create uniswap_v3 --node http://127.0.0.1:8020
 ›   Warning: In next major version, this command will be merged as a subcommand for `graph local`.
Created subgraph: uniswap_v3
graph deploy --node http://127.0.0.1:8020 --ipfs http://127.0.0.1:5001 --version-label v0.0.1 uniswap_v3 subgraph.yaml
  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6 (graph-ts dependency not installed yet)
  Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
  Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
✔ Apply migrations
✔ Load subgraph from subgraph.yaml
✔ Compile subgraph
  Copy schema file build/schema.graphql
  Write subgraph file build/uniswap_v3/substreams.spkg
  Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/
  Add file to IPFS build/schema.graphql
                .. QmUgUVBCvnN7VW5dCoV5rp8gfUGGxai56u2rWtiwDStYUm
  Add file to IPFS build/uniswap_v3/substreams.spkg
                .. QmUMgQbLhL6qdYQtdJjyCdfAJdzS3UNakBpxNCYzhjvuEN
✔ Upload subgraph to IPFS

Build completed: QmagygjECxUq55gxUVv1XmR4QaK36CA81iGeR9tVJX1LUt

✖ Failed to deploy to Graph node http://127.0.0.1:8020/: network not supported by registrar: no network mainnet found on chain substreams
/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/gluegun/build/index.js:15
    throw up;
    ^

ExitError: EEXIT: 1
    at Object.exit (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/errors/index.js:21:11)
    at DeployCommand.exit (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/command.js:131:23)
    at /home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/dist/commands/deploy.js:254:26
    at Client._parseResponse (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/index.js:212:14)
    at /home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/index.js:149:10
    at Utils.JSON.parse (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/utils.js:328:3)
    at IncomingMessage.<anonymous> (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/http.js:86:22)
    at IncomingMessage.emit (node:events:532:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  oclif: { exit: 1 },
  code: 'EEXIT'
}

Node.js v22.2.0
make: *** [Makefile:30: deploy_local] Error 1

Seems like ✖ Failed to deploy to Graph node http://127.0.0.1:8020/: network not supported by registrar: no network mainnet found on chain substreams its the most important message in the error, but my local graph-node its working perfectly fine. I have already created and deployed an uniswap v2 subgraph to my local grap-node and its syncing as expected

maoueh commented 3 months ago

Your graph-node config is incorrect. The Subgraph definition specifies mainnet as the expected network.

Ensure that you have a chains definition that looks like:

[chains]
...
[chains.mainnet]
...
userbox020 commented 3 months ago

Your graph-node config is incorrect. The Subgraph definition specifies mainnet as the expected network.

Ensure that you have a chains definition that looks like:

[chains]
...
[chains.mainnet]
...

thanks for the quick reply bro, where do i suppose to check for the chains thing? in the subgraph.yaml?

i share my subgraph.yaml

specVersion: 0.0.6
description: Ethereum Uniswap V3 Subgraph (powered by StreamingFast Substreams)
repository: https://github.com/streamingfast/substreams-uniswap-v3.git
schema:
  file: ./schema.graphql

dataSources:
  - kind: substreams
    name: uniswap_v3
    network: mainnet
    source:
      package:
        moduleName: graph_out
        file: substreams.spkg
    mapping:
      kind: substreams/graph-entities
      apiVersion: 0.0.5

can you please elavorate for me more detail fix? i really dont know how to fix it @maoueh