input-output-hk / jormungandr

privacy voting blockchain node
https://input-output-hk.github.io/jormungandr/
Apache License 2.0
364 stars 132 forks source link

Explorer stuck #1654

Open timsahabutdinov opened 4 years ago

timsahabutdinov commented 4 years ago

When I get lastBlockHeight via rest api it shows correct data

# curl -s http://127.0.0.1:3101/api/v0/node/stats

{
    "version": "jormungandr 0.8.7-364cd84",
    "state": "Running",
    "blockRecvCnt": 814,
    "lastBlockContentSize": 315,
    "lastBlockDate": "43.36915",
    "lastBlockFees": 800000,
    "lastBlockHash": "d08f399a7591819729ec4f742e91e386b72871fcac373c6b1a544e5baaafa41f",
    "lastBlockHeight": "134006",
    "lastBlockSum": 63805723522,
    "lastBlockTime": "2020-01-26T15:44:07+00:00",
    "lastBlockTx": 1,
    "lastReceivedBlockTime": "2020-01-26T15:44:26+00:00",
    "peerAvailableCnt": "3532",
    "peerQuarantinedCnt": "59376",
    "peerUnreachableCnt": "1095",
    "txRecvCnt": 2792,
    "uptime": 15137
}

but when I try to get info via explorer it shows wrong chainLength and latestBlockId

# curl -S http://127.0.0.1:3101/explorer/graphql -H 'content-type: application/json' --data  '{"query": "{ status { latestBlock { chainLength id previousBlock { id } } }}"}'

{
    "data": {
        "status": {
            "latestBlock": {
                "chainLength": "133439",
                "id": "73187eda3bfce4979edf83017eb070b9c7d02ded484a6f3a34a09ff90a4d1217",
                "previousBlock": {
                    "id": "7bacf319f39cbaa65c845924b1eef842e44aaca72ed547361a37adcb03d7bd06"
                }
            }
        }
    }
}
dmitrystas commented 4 years ago

It looks like the same problem as #1622 and probably #1652

rinor commented 4 years ago

@timsahabutdinov is it still the case with the latest release?

timsahabutdinov commented 4 years ago

yes, the problem is not solved

timsahabutdinov commented 4 years ago

@rinor

# curl -s http://127.0.0.1:3101/api/v0/node/stats

{"version":"jormungandr 0.8.9-30d20d2","state":"Running","blockRecvCnt":393,"lastBlockContentSize":315,"lastBlockDate":"47.42668","lastBlockFees":800000,"lastBlockHash":"cd483a83e0a268a40fffa16742878f9287037f3b491890d3bb5c8fd95d8d6f86","lastBlockHeight":"147003","lastBlockSum":54999058119,"lastBlockTime":"2020-01-30T18:55:53+00:00","lastBlockTx":1,"lastReceivedBlockTime":"2020-01-30T18:55:54+00:00","peerAvailableCnt":5312,"peerQuarantinedCnt":42320,"peerUnreachableCnt":785,"txRecvCnt":376,"uptime":8501}
# curl -S http://127.0.0.1:3101/explorer/graphql -H 'content-type: application/json' --data  '{"query": "{ status { latestBlock { chainLength id previousBlock { id } } }}"}'

{"data":{"status":{"latestBlock":{"chainLength":"146848","id":"98b818c3310c07cd1d6c2ed1e40f02fd0b3941f2fbb03c16492f1cb3721c41f4","previousBlock":{"id":"4bb2bc3e14ac41c781b122bb0d54641ef8e6c0cc0fbceb9980f3412269fce462"}}}}}