nano-node icon indicating copy to clipboard operation
nano-node copied to clipboard

Overhaul of `online_reps` class

Open pwojcikdev opened this issue 8 months ago • 0 comments

This is an overhaul of online_reps class:

  • Run periodic online weight sampling on a dedicated thread, which makes it more robust and easier to debug.
  • Eliminate use of store.online_weight.count () and erasing entries based on their timestamps instead (2 weeks for live, 1 day for beta).
  • Add stats and logging to improve observability.
  • Add asserts to ensure data consistency.
  • Split and rewrite functions, so they are (subjectively) cleaner.
  • Ensure that nano::online_reps::trended () can never return value lower than the limit configured via online_weight_minimum.

pwojcikdev avatar Jun 26 '24 08:06 pwojcikdev