blockbook cannot continue sync after restart system
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?
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).
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