Sync: improvement checking and waiting about previous block in sync
- Dominant language
- Go
- Stars
- 44
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Current prev block checking & waiting is NOT efficient.
In place of infinite fetch and validate loop, validator has to check and wait prev block for curr block.
Current validator uses `observer` ,but the use of `observer` is not suitable with this case.
I need to another approach for it. :->
- (Maybe `Waiter` or `Notifier`)?
- `LatestSyncBlockHeightNotifier` -> too long name...
- `SyncedHeightNotifier`
- `SyncBlockNotifier` -> O
```
EROR[10-16|14:32:05] validate failure module=sync node=GCDC.WBKY err="getPrevBlock: block.GetBlockByHeight: {\"code\":132,\"message\":\"record does not exist in storage\",\"data\":{}}" height=310 caller=syncer.go:256
INFO[10-16|14:32:05] fetching items from node: node1 module=sync node=GCDC.WBKY fetching_node=node1 height=310 caller=fetcher.go:102
INFO[10-16|14:32:05] fetch get items module=sync node=GCDC.WBKY items=1 height=310 caller=fetcher.go:140
EROR[10-16|14:32:05] validate failure module=sync node=GCDC.WBKY err="getPrevBlock: block.GetBlockByHeight: {\"code\":132,\"message\":\"record does not exist in storage\",\"data\":{}}" height=313 caller=syncer.go:256
INFO[10-16|14:32:05] fetching items from node: node2 module=sync node=GCDC.WBKY fetching_node=node2 height=313 caller=fetcher.go:102
```
Contributor guide
Assessment
This issue has not been assessed yet.