nimbus-eth1/nimbus/sync/snap/worker
Jordan Hrycaj 1b4572ed3b
Prep for full sync after snap make 4 (#1282)
* Re-arrange fetching storage slots in batch module

why;
  Previously, fetching partial slot ranges first has a chance of
  terminating the worker peer 9due to network error) while there were
  many inheritable storage slots on the queue.

  Now, inheritance is checked first, then full slot ranges and finally
  partial ranges.

* Update logging

* Bundled node information for healing into single object `NodeSpecs`

why:
  Previously, partial paths and node keys were kept in separate variables.
  This approach was error prone due to copying/reassembling function
  argument objects.

  As all partial paths, keys, and node data types are more or less handled
  as `Blob`s over the network (using Eth/6x, or Snap/1) it makes sense to
  hold these `Blob`s as named field in a single object (even if not all
  fields are active for the current purpose.)

* For good housekeeping, using `NodeKey` type only for account keys

why:
  previously, a mixture of `NodeKey` and `Hash256` was used. Now, only
  state or storage root keys use the `Hash256` type.

* Always accept latest pivot (and not a slightly older one)

why;
  For testing it was tried to use a slightly older pivot state root than
  available. Some anecdotal tests seemed to suggest an advantage so that
  more peers are willing to serve on that older pivot. But this could not
  be confirmed in subsequent tests (still anecdotal, though.)

  As a side note, the distance of the latest pivot to its predecessor is
  at least 128 (or whatever the constant `minPivotBlockDistance` is
  assigned to.)

* Reshuffle name components for some file and function names

why:
  Clarifies purpose:
  "storages" becomes: "storage slots"
  "store" becomes: "range fetch"

* Stash away currently unused modules in sub-folder named "notused"
2022-10-27 14:49:28 +01:00
..
com Prep for full sync after snap make 4 (#1282) 2022-10-27 14:49:28 +01:00
db Prep for full sync after snap make 4 (#1282) 2022-10-27 14:49:28 +01:00
heal_accounts.nim Prep for full sync after snap make 4 (#1282) 2022-10-27 14:49:28 +01:00
heal_storage_slots.nim Prep for full sync after snap make 4 (#1282) 2022-10-27 14:49:28 +01:00
range_fetch_accounts.nim Prep for full sync after snap make 4 (#1282) 2022-10-27 14:49:28 +01:00
range_fetch_storage_slots.nim Prep for full sync after snap make 4 (#1282) 2022-10-27 14:49:28 +01:00
ticker.nim Prep for full sync after snap make 4 (#1282) 2022-10-27 14:49:28 +01:00