blockbook icon indicating copy to clipboard operation
blockbook copied to clipboard

blockbook cannot continue sync after restart system

Open aghamir opened this issue 3 years ago • 2 comments

After I restart the blockbook service, it raise this error

resyncIndex resync: remote best height error
resync: error - remote best height 0 less than sync start height 723

How do I resolve this issue?

aghamir avatar Aug 13 '21 09:08 aghamir

One cannot see your setup from the error description but it looks like the backend is not synchronized correctly (or Blockbook is connecting to wrong backend).

martinboehm avatar Aug 16 '21 19:08 martinboehm

I found the issue. I ran the Geth backend with fast mode. It works correctly and will sync until you restart blockbook service. Because of this issue, after restarting the blockbook service, the blockNumber returns 0. Hence, blockbook returns error in this line and does not continue the process of syncing. I know you work with full mode and this issue does not exist with full mode; however, the blockbook will work with fast mode if at the beginning it starts the sync instead of checking blockNumber or using other rpc.

https://github.com/trezor/blockbook/blob/b82dc92522eee957b7a139c38269a1844fe102f8/db/sync.go#L161

aghamir avatar Aug 17 '21 04:08 aghamir