diff --git a/CHANGES.rst b/CHANGES.rst index a514658860b77927fec4679be110e14eed4056df..8f200be46211a93eb328cd5d6f5468efe576ff69 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -87,6 +87,9 @@ Node an ``unlimited`` option to remove the threshold of RPC connections. (MR :gl:`!12324`) +- Reduced the maximum allowed timestamp drift to 1 seconds. It is recommended to + use NTP to sync the clock of the node. (MR :gl:`!13198`) + Client ------ diff --git a/docs/introduction/howtouse.rst b/docs/introduction/howtouse.rst index 372bcaa47184eb5bf7233099d107ded0455c3631..cd1260970c12bb5662cb3cdc23c5f13ea1bdb4fd 100644 --- a/docs/introduction/howtouse.rst +++ b/docs/introduction/howtouse.rst @@ -124,6 +124,14 @@ concurrently and selects the best one based on its fitness (see process. Thus, an ``octez-validator`` process can appear while monitoring the active processes of the machine. +.. warning:: + + To ensure the best conditions to run a node, we recommend users to use `NTP + `__ to avoid clock + drift. Clock drift may result in not being able to get recent blocks in case + of negative lag time, and in not being able to inject new blocks in case of + positive lag time. + Node Identity ~~~~~~~~~~~~~ diff --git a/src/lib_shell/clock_drift.ml b/src/lib_shell/clock_drift.ml index 7acbe557e6bff0061a77389acd7f832732b6d87f..5c67fd95ef8fce60420bd10b6219e4b8c807ba0e 100644 --- a/src/lib_shell/clock_drift.ml +++ b/src/lib_shell/clock_drift.ml @@ -22,7 +22,7 @@ (* *) (*****************************************************************************) -let max_timestamp_drift : Ptime.span = Ptime.Span.of_int_s 5 +let max_timestamp_drift : Ptime.span = Ptime.Span.of_int_s 1 let soon : unit -> Time.Protocol.t = fun () -> diff --git a/tezt/tests/forge_block.ml b/tezt/tests/forge_block.ml index 2708e329097c5b63600fa88e472c28da20956a36..72f2181395b4fe9fb406886977ae655bb4bd1cc5 100644 --- a/tezt/tests/forge_block.ml +++ b/tezt/tests/forge_block.ml @@ -57,7 +57,7 @@ let test_forge_block () : unit = Log.info "Test activate proto demo time shifted ok" ; let parameter_file = Temp.file (protocol_hash ^ "-parameters.json") in Base.write_file parameter_file ~contents:"{}" ; - let delta = Ptime.Span.of_int_s (-5) in + let delta = Ptime.Span.of_int_s (-1) in let* () = Client.activate_protocol_and_wait ~parameter_file