-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNTP Clock issues #4207
Comments
Maybe we could check (on linux/macos) whether ntpd is running, and if it is, just use the system's time (assuming ntpd will do a better job than we could avoiding drift). If ntpd is not running, or on windows, revert to querying NTP servers ourselves. |
Doesn't Windows also normally have an NTP server it is running? |
I think that if the decision is to rely on an external process (like I wouldn't have code that's mostly dead but spring to life in misconfigured systems; that's generally a recipe for disaster. Considering that Long story short, I'm fine with removing this. Hey @JoelKatz, what's your take? We've been using this code since... must be at least 1998? Are you OK if it goes the way of the dodo and |
I have no objection to removing it. |
I also would prefer removing the NTP stuff from the code base. It is a nice safety net in some edge cases, but it masks operator errors and could lead to unexpected situations. It also seems to have very little impact on the protocol etc. anyways. |
Fixes: XRPLF#4207 Make SNTPClock a simple wrapper around abstract_clock<system_clock>
Here is a patch that removes the SNTP code for review: HowardHinnant@6c239bd |
Fixes: XRPLF#4207 Make SNTPClock a simple wrapper around abstract_clock<system_clock>
Issue Description
The purpose of this issue is to provide a place to discuss a couple of issues surrounding the time keeping used to create ledger close times.
Currently rippled communicates with an NTP server to get the correct time, and this time serves as the basis for determining ledger close times. Which NTP server is used is configurable in rippled.cfg under the
[sntp-servers]
tag where one or more servers can be listed, and one will be chosen for the job. It might be possible, however remotely, for a malicious actor to intercept communications between a node in the XRP network and its NTP server, and shift the network time of the node away from its peers.std::chrono::system_clock::now()
) and leave it up to server operators to keep their machines temporarily synced. This would allow us to remove the code we currently have that reaches out to NTP servers, and remove the associated config tag.The text was updated successfully, but these errors were encountered: