NTP is a protocol to allow time synchronization between remote machines. This is particularly essential for Ouroboros is a time-based protocol. In case a local clock is drifting too much compared to the global clock, one would want to re-sync his clock.
We are adding network/clock endpoint which returns NtpStatus type (Drift, Pending, Unavailable).
network/clock endpoint along with corresponding types has to be added@paweljakubas I'm seeing this error in the log when invoking network/clock:
[cardano-wallet.ntp-client:Info:30] [2020-03-04 12:30:46.31 UTC] query to ntp client invoked
[cardano-wallet.ntp-client:Alert:10310] [2020-03-04 12:30:46.32 UTC] ntp client experienced error Network.Socket.ByteString.sendManyTo: does not exist (Network is unreachable) when sending packet using IPv6
[cardano-wallet.ntp-client:Alert:10304] [2020-03-04 12:30:46.32 UTC] ntp client experienced error Network.Socket.ByteString.sendManyTo: does not exist (Network is unreachable) when using IPv6 protocol
Also, if I'm not mistaken there is only a single integration test added for this requirement (https://github.com/input-output-hk/cardano-wallet/blob/master/lib/core-integration/src/Test/Integration/Scenario/API/Network.hs#L202-L210).
I'm wondering if there could be some more unit tests (or properties) added for https://github.com/input-output-hk/cardano-wallet/blob/master/lib/core/src/Network/Ntp.hs#L132-L143 that would excercise all patterns?
Not sure how it works underneath, but is it possible maybe to get NtpSyncUnavailable by tweaking https://github.com/input-output-hk/cardano-wallet/blob/master/lib/core/src/Network/Ntp.hs#L44 ?
After discussing with @paweljakubas -> #1410.
The base library ouroboros-network/ntp-client might need more unit tests added. It is missing error path tests such as NtpSyncUnavailable mentioned by @piotr-iohk.
@piotr-iohk Those look like bona fide errors to me. Your system has IPv6 enabled but lacks connectivity.
@piotr-iohk Those look like bona fide errors to me.
Could be... In any case, thanks for new word. ;)
Closing.
Notice instead of Warning or Alert (https://github.com/input-output-hk/cardano-wallet/pull/1410#discussion_r388840049)
Most helpful comment
@piotr-iohk Those look like bona fide errors to me. Your system has IPv6 enabled but lacks connectivity.