Data not synced to Binance smart chain
Loki-432 opened this issue · 3 comments
I see this message all the time i check https://pancakeswap.info/
"The data on this site has only synced to Binance Smart Chain block 2244178 (out of 5066663). Please check back soon."
Last data sync was 3 days ago, any fix planned ?
If you noticed, the data sync has increased since 3 days ago. It takes a long time to sync all the data on a blockchain.
The sync has ~5 or so days remaining
OK, thank you for the update, Pancakeswap is great, keep on going guys !
It seems like the query for health (the one that generates the out of sync message) references the subgraph by name, at /src/apollo/queries.js:6
export const SUBGRAPH_HEALTH = gql\`
query health {
indexingStatusForCurrentVersion(subgraphName: "cakeswap") {
synced
health
...
but if you run this query on https://api.bscgraph.org/graphql/
query health {
indexingStatusForCurrentVersion(subgraphName: "cakeswap") {
subgraph
}
}
you get: "subgraph": "QmUf1YRkpWGSp867mLb6ab8aGPCnircwN17SKbrM5UeUW2"
which really does match the latestBlock of about 2924853 (at the time of writing, but increasing steadily).
While on src/apollo/client.js the reference uri for data fetching is: uri: 'https://api.bscgraph.org/subgraphs/id/QmUDNRjYZ7XbgTvfVnXHj6LcTNacDD9GPXHWLjdTKi6om6'
which seems to be hardstuck at block #4983361
It seems like there are two subgraphs named cakeswap, running
query health {
indexingStatusesForSubgraphName(subgraphName:"cakeswap"){
subgraph
}
}
yields:
{"subgraph": "QmUDNRjYZ7XbgTvfVnXHj6LcTNacDD9GPXHWLjdTKi6om6"},
{"subgraph": "QmUf1YRkpWGSp867mLb6ab8aGPCnircwN17SKbrM5UeUW2"}
so it seems to be the case.
Just pointing this out because if the subgraph in the data fetch client does not reflect the one that is increasing, even if the first one gets synced the data won't show up. So it might be a good idea to reference them directly by id in the health query.
(Or maybe you guys already knew all of this, and just kept the data from the hardstuck subgraph since it's more recent, while the other one synchs up, in any case, if another nerd comes up here he'll find an explanation