mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-10 21:46:32 +00:00
* SyncManager cleanups for backfill support Cleanups, fixes and simplifications, in anticipation of backfill support for the `SyncManager`: * reformat sync progress indicator to show time left and % done more prominently: * old: `sync="sPssPsssss:2:2.4229:00h57m (2706898)"` * new: `sync="14d12h31m (0.52%) 1.1378slots/s (wQQQQQDDQQ:1287520)"` * reset average speed when going out of sync * pass all block errors to sync manager, including duplicate/unviable * penalize peers for reporting a head block that is outside of our expected wall clock time (they're likely on a different network or trying to disrupt sync) * remove `SyncFailureKind` (unused) * remove `inRange` (unused) * add `Q` for sync queue requests that are in the `SyncQueue` but not yet in the `BlockProcessor` queue * update last slot in `SyncQueue` after getting peer status * fix race condition between `wakeupWaiters` and `resetWait`, where workers would not be correctly reset if block verification returned a completed future without event loop * log syncmanager direction * Fix ordering issue. Some of the requests size of which are not equal to `chunkSize` could be processed in wrong order which could lead to sync process freezes. Co-authored-by: cheatfate <eugene.kabanov@status.im>