From 3ae83659fc9c7f3707935a68743a3ff60144e894 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Tue, 14 Jan 2025 09:51:00 +0100 Subject: [PATCH 1/2] quebec/baker: add a minimum delta at the end of round --- src/proto_021_PsQuebec/lib_delegate/baking_scheduling.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/proto_021_PsQuebec/lib_delegate/baking_scheduling.ml b/src/proto_021_PsQuebec/lib_delegate/baking_scheduling.ml index 58c254fb6eed..96520ee07136 100644 --- a/src/proto_021_PsQuebec/lib_delegate/baking_scheduling.ml +++ b/src/proto_021_PsQuebec/lib_delegate/baking_scheduling.ml @@ -550,9 +550,11 @@ let compute_next_timeout state : Baking_state.timeout_kind Lwt.t tzresult Lwt.t match round_proposer state ~level:`Current (snd next_round) with | Some _ -> let delta = - state.global_state.constants.parametric.minimal_block_delay - |> Period.to_seconds - |> fun d -> Int64.div d 5L + max + 1L + ( state.global_state.constants.parametric.minimal_block_delay + |> Period.to_seconds + |> fun d -> Int64.div d 5L ) in (* NB: this means 6 seconds delay, if the first round duration is 30. *) -- GitLab From 52d3e5815d09c64025ffa0ae5954e33398a115a1 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Tue, 14 Jan 2025 09:51:52 +0100 Subject: [PATCH 2/2] alpha/baker: add a minimum delta at the end of round --- src/proto_alpha/lib_delegate/baking_scheduling.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/lib_delegate/baking_scheduling.ml b/src/proto_alpha/lib_delegate/baking_scheduling.ml index 0224854340e6..4dd4e47590d9 100644 --- a/src/proto_alpha/lib_delegate/baking_scheduling.ml +++ b/src/proto_alpha/lib_delegate/baking_scheduling.ml @@ -553,9 +553,11 @@ let compute_next_timeout state : Baking_state.timeout_kind Lwt.t tzresult Lwt.t match round_proposer state ~level:`Current (snd next_round) with | Some _ -> let delta = - state.global_state.constants.parametric.minimal_block_delay - |> Period.to_seconds - |> fun d -> Int64.div d 5L + max + 1L + ( state.global_state.constants.parametric.minimal_block_delay + |> Period.to_seconds + |> fun d -> Int64.div d 5L ) in (* NB: this means 6 seconds delay, if the first round duration is 30. *) -- GitLab