Module darkfi::rpc::clock_sync

source ยท
Expand description

Clock sync utility module Clock sync module

Constantsยง

  • EPOCH ๐Ÿ”’
  • NTP_ADDRESS ๐Ÿ”’
    TODO: Loop through set of ntps, get their average response concurrenyly.
  • RETRIES ๐Ÿ”’
    Clock sync parameters

Functionsยง

  • This is a very simple check to verify that the system time is correct. Retry loop is used in case discrepancies are found. If all retries fail, system clock is considered invalid. TODO: 1. Add proxy functionality in order not to leak connections
  • clock_check ๐Ÿ”’
  • Raw NTP request execution