Open KeeJef opened 1 year ago
tackling this on https://github.com/javabudd/oxen-core/tree/oxen-1633
@KeeJef @jagerman Do you recommend we use NTP for this type of thing? If not, what is the preferred alternative?
These days I use the built-in systemd-timesync service; it's a lighter weight alternative than a full ntpd service for just keeping the clock synced.
But this depends quite a bit on the hardware and distribution in use: some (maybe most?) VPSes rely on time synchronization on the host system.
Yea that's why I was thinking something like this would require us to reach out to a centralized time server to make sure we're always in sync. If we warn on package install it may be easier to get the appropriate dependencies installed, but if we want to do this in the code itself it might make sense to make requests to an ntp server(pool.ntp.org?).
Recently we've had some Service Nodes register with incorrectly synced clocks, this is an issue because it can cause users messages to fail to send if the Service Node thinks the users timestamp is out of bounds (because its own clock is out of bounds). These Service Nodes will be kicked from the network by other Service Nodes during testing, but they will bounce between decommissioned and registered until all uptime credits are used, exacerbating the time Session users can be affected.
Some options to reduce the prevalence of this issue