Parity-ethereum: Provide RPC health status indicator for ancient blocks in addition to sync status

Created on 1 Nov 2017  路  9Comments  路  Source: openethereum/parity-ethereum

I'm running:

  • Parity version: 1.8.2
  • Operating system: Linux
  • And installed: sudo apt-get install parity_1.8.2_amd64.deb

Chain sync status is displayed as "Chain synchronized (yes)" even parity is still downloading missing blocks. Web3 schript fetching blocks will get null and there is no possibility to check if some blocks are still missing.

image


F8-enhancement 馃帄 M6-rpcapi 馃摚 P7-nicetohave 馃悤

Most helpful comment

It would be great to provide not only yes/no status for ancient blocks, but full download range indicator, displaing downloaded/missing ranges. This is like torrent progress indicator.

grafik

It allows to run scripts on particular block range, if other ranges are still downliading.

All 9 comments

The Ethereum blockchain gets a new block every 15 seconds. Synchronized in this context means, you fetched all blocks up the latest known best block.

Do you mean by "all the blocks" all blocks inclusive older blocks missing after warp sync?

If "yes": the sync status is wrong here, because as you see in the reported issue, the node is still fetching older blocks missing after the warp sync.
If "no": the sync status is formally correct but misleading. The node is still not fully usable: it can't serve web3 operations on missing blocks.
It would be great to have some status in the Node Health displaying how many blocks (or better which block ranges) are still missing.

Is there any easy way to check if the node is still missing some older blocks? It is important if I would like to start some long running web3 script (f.e. walking through the whole chain).

If you need a full node please run with --no-warp

@tomusdrw
thanks for your tip.
Unfortunately I already have warped node, that I now reuse as a full node for development puporses. Full resync --no-warp is possible, but not really desired. Everything I missing here is the additional node status makes it clear whether all missing blocks are synced now and the warped node becomes to full node. It is a convenience RFE

It would be great to provide not only yes/no status for ancient blocks, but full download range indicator, displaing downloaded/missing ranges. This is like torrent progress indicator.

grafik

It allows to run scripts on particular block range, if other ranges are still downliading.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This issue now has a funding of 0.5 ETH (229.17 USD @ $458.35/ETH) attached to it.__

The node health API has been removed. We have a parity specific API that allows you to track the progress of ancient block download parity_chainStatus. It will return undefined if the chain is fully synced or still syncing (major sync/warp). But you can use it coupled with eth_syncing:

  • Check if node is syncing with eth_syncing
  • After eth_syncing starts returning false check parity_chainStatus to see if there's any gap
  • If eth_syncing returns false and parity_chainStatus returns undefined then the node is fully synced.

We could add this information to eth_syncing but it would change its semantics, since it would only return false after the node is fully synced (which I don't think is what the other implementations are doing).

The suggestion from Andr茅 should avoid additional work. I'll close.

Issue Status: 1. Open 2. Cancelled


__The funding of 0.5 ETH (137.87 USD @ $275.75/ETH) attached to this issue has been cancelled by the bounty submitter__

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mr-older picture mr-older  路  3Comments

dukei picture dukei  路  3Comments

BillSantos picture BillSantos  路  3Comments

tzapu picture tzapu  路  3Comments

m-thomson picture m-thomson  路  3Comments