diff --git a/src/lib_shell/bootstrap_pipeline.ml b/src/lib_shell/bootstrap_pipeline.ml index eb9c8ff4f82cfa5da5b52b26fc5be25d577f3fbb..3694c3bd0d84663d370850b5cfde06f3ce062bb6 100644 --- a/src/lib_shell/bootstrap_pipeline.ml +++ b/src/lib_shell/bootstrap_pipeline.ml @@ -143,8 +143,8 @@ type t = { (** A block is NOT acceptable if one of the following holds: - - The timestamp of the block is more than 15 seconds ahead in the - future. + - The timestamp of the block is more than s seconds in the + future, where s is specified by the module Clock_drift. - The block is at the same level as the checkpoint, but they are different. diff --git a/src/lib_shell/clock_drift.ml b/src/lib_shell/clock_drift.ml index 744953f0d0c5d724f49e365c668bbfde04edbeb5..ba40f08ea8a0c2e1f7b109e6364284fc61fd1fdf 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 15 +let max_timestamp_drift : Ptime.span = Ptime.Span.of_int_s 5 let soon : unit -> Time.Protocol.t = fun () -> diff --git a/tests_python/tests_008/test_forge_block.py b/tests_python/tests_008/test_forge_block.py index 1aa64a36b47795418ce77dc446283378ebad2018..babcdeb1d04c0946c00954d4d27a58e11965e649 100755 --- a/tests_python/tests_008/test_forge_block.py +++ b/tests_python/tests_008/test_forge_block.py @@ -9,7 +9,7 @@ PROTO_DEMO = 'ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp' @pytest.mark.slow @pytest.mark.incremental class TestForgeBlock: - """ Check that a block more than 15 seconds in the future is rejected """ + """ Check that a block more than 5 seconds in the future is rejected """ def test_setup_network(self, sandbox: Sandbox): sandbox.add_node(1, params=constants.NODE_PARAMS) @@ -21,7 +21,7 @@ class TestForgeBlock: def test_activate_proto_demo_time_shifted_ok(self, sandbox: Sandbox): parameters = {} # type: dict - delta = datetime.timedelta(seconds=10) + delta = datetime.timedelta(seconds=5) sandbox.client(1).activate_protocol_json( PROTO_DEMO, parameters, diff --git a/tests_python/tests_009/test_forge_block.py b/tests_python/tests_009/test_forge_block.py index 1aa64a36b47795418ce77dc446283378ebad2018..babcdeb1d04c0946c00954d4d27a58e11965e649 100755 --- a/tests_python/tests_009/test_forge_block.py +++ b/tests_python/tests_009/test_forge_block.py @@ -9,7 +9,7 @@ PROTO_DEMO = 'ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp' @pytest.mark.slow @pytest.mark.incremental class TestForgeBlock: - """ Check that a block more than 15 seconds in the future is rejected """ + """ Check that a block more than 5 seconds in the future is rejected """ def test_setup_network(self, sandbox: Sandbox): sandbox.add_node(1, params=constants.NODE_PARAMS) @@ -21,7 +21,7 @@ class TestForgeBlock: def test_activate_proto_demo_time_shifted_ok(self, sandbox: Sandbox): parameters = {} # type: dict - delta = datetime.timedelta(seconds=10) + delta = datetime.timedelta(seconds=5) sandbox.client(1).activate_protocol_json( PROTO_DEMO, parameters, diff --git a/tests_python/tests_alpha/test_forge_block.py b/tests_python/tests_alpha/test_forge_block.py index 1aa64a36b47795418ce77dc446283378ebad2018..babcdeb1d04c0946c00954d4d27a58e11965e649 100755 --- a/tests_python/tests_alpha/test_forge_block.py +++ b/tests_python/tests_alpha/test_forge_block.py @@ -9,7 +9,7 @@ PROTO_DEMO = 'ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp' @pytest.mark.slow @pytest.mark.incremental class TestForgeBlock: - """ Check that a block more than 15 seconds in the future is rejected """ + """ Check that a block more than 5 seconds in the future is rejected """ def test_setup_network(self, sandbox: Sandbox): sandbox.add_node(1, params=constants.NODE_PARAMS) @@ -21,7 +21,7 @@ class TestForgeBlock: def test_activate_proto_demo_time_shifted_ok(self, sandbox: Sandbox): parameters = {} # type: dict - delta = datetime.timedelta(seconds=10) + delta = datetime.timedelta(seconds=5) sandbox.client(1).activate_protocol_json( PROTO_DEMO, parameters,