nimbus-eth1/nimbus/sync/snap/worker
Jordan Hrycaj 9facab91cb
Prepare snap client for continuing with full sync (#1534)
* Somewhat tighten error handling

why:
  Zombie state is invoked when the current peer turns out to be useless
  for further communication. While there is a chance to further talk
  to a peer about another topic (aka healing) after some protocol failure,
  it makes no sense to do so after a network problem.

  The latter state is explained bu the `peerDegraded` flag that goes
  together with the `zombie` state flag. A degraded peer is dropped
  immediately.

* Remove `--sync-mode=snapCtx` option, always start snap in recovery mode

why:
  No need for a snap sync option without recovery mode, can be achieved
  by deleting the database.

* Code cosmetics, typos, prettify logging, debugging helper, etc.

* Split off snap sync sub-mode handler into separate modules

details:
  The original `worker.nim` source has become a multiplexer for several
  snap sync sub-modes `full` and `snap`. The source modules of the
  incarnations of a particular sync sub-mode are places into the
  `worker/play` directory.

* Update ticker for snap and full sync logging
2023-04-06 20:42:07 +01:00
..
com Prepare snap client for continuing with full sync (#1534) 2023-04-06 20:42:07 +01:00
db Prepare snap client for continuing with full sync (#1534) 2023-04-06 20:42:07 +01:00
pivot Prepare snap client for continuing with full sync (#1534) 2023-04-06 20:42:07 +01:00
play Prepare snap client for continuing with full sync (#1534) 2023-04-06 20:42:07 +01:00
pivot.nim Prepare snap client for continuing with full sync (#1534) 2023-04-06 20:42:07 +01:00
play.nim Prepare snap client for continuing with full sync (#1534) 2023-04-06 20:42:07 +01:00
ticker.nim Prepare snap client for continuing with full sync (#1534) 2023-04-06 20:42:07 +01:00