subsquid-labs / squid-substrate-template

Squid project template for Substrate-based chains
MIT License
33 stars 50 forks source link

Ingest service stuck at block 0 #67

Closed ayudh37 closed 2 years ago

ayudh37 commented 2 years ago

I am running a Macbook air with M1 chip but have replicated it with a macbook pro machine with intel chip.

After running the docker compose -f archive/docker-compose.yml up command, the archive-ingest-1 service gets stuck at the first block. I've attached an image of the output below.

Screenshot 2022-08-30 at 3 58 17 PM

I am running a substrate node locally and have changed the command of the ingest service to "ws://host.docker.internal:9944".

I can see my chain produce many blocks however even querying the gateway service with the below query gives blockHeight 0.

query {
   metadata {
      blockHeight
      blockHash
  } 
}
eldargab commented 2 years ago

Hey, seems like your chain doesn't finalise blocks!

Apart from that, you should use

query {
  status {
    head
  }
}

to get the number of indexed blocks. .metadata will always contain only one record unless there are runtime upgrades.

ayudh37 commented 2 years ago

I see, btw the above query gave

{
  "data": {
    "status": {
      "head": 0
    }
  }
}
eldargab commented 2 years ago

Yes, according to logs ingester has indexed the genesis block and waits for further blocks, but it only consider finalised ones.