From e9f36483c7ff85165b091bb3bb3df72833fa5221 Mon Sep 17 00:00:00 2001 From: Victor Allombert Date: Wed, 16 Aug 2023 16:12:01 +0200 Subject: [PATCH 1/3] Alpha/Baker: retrieve operations before 'propose for' --- src/proto_alpha/lib_delegate/baking_lib.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/proto_alpha/lib_delegate/baking_lib.ml b/src/proto_alpha/lib_delegate/baking_lib.ml index f6529fa27b05..6b02fb0430b1 100644 --- a/src/proto_alpha/lib_delegate/baking_lib.ml +++ b/src/proto_alpha/lib_delegate/baking_lib.ml @@ -311,6 +311,13 @@ let propose (cctxt : Protocol_client_context.full) ?minimal_fees () in let* state = create_state cctxt ~config ~current_proposal delegates in + (* Make sure the operation worker is populated to avoid empty blocks + being proposed. *) + let* () = + Operation_worker.retrieve_pending_operations + cctxt + state.global_state.operation_worker + in let* _ = match state.level_state.elected_block with | Some _ -> propose_at_next_level ~minimal_timestamp state -- GitLab From 0bad2aad95a5d283adf56099be26b7758be86238 Mon Sep 17 00:00:00 2001 From: Victor Allombert Date: Wed, 16 Aug 2023 16:14:41 +0200 Subject: [PATCH 2/3] Oxford/Baker: retrieve operations before 'propose for' --- src/proto_018_Proxford/lib_delegate/baking_lib.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/proto_018_Proxford/lib_delegate/baking_lib.ml b/src/proto_018_Proxford/lib_delegate/baking_lib.ml index f6529fa27b05..6b02fb0430b1 100644 --- a/src/proto_018_Proxford/lib_delegate/baking_lib.ml +++ b/src/proto_018_Proxford/lib_delegate/baking_lib.ml @@ -311,6 +311,13 @@ let propose (cctxt : Protocol_client_context.full) ?minimal_fees () in let* state = create_state cctxt ~config ~current_proposal delegates in + (* Make sure the operation worker is populated to avoid empty blocks + being proposed. *) + let* () = + Operation_worker.retrieve_pending_operations + cctxt + state.global_state.operation_worker + in let* _ = match state.level_state.elected_block with | Some _ -> propose_at_next_level ~minimal_timestamp state -- GitLab From 46ee9179e48104deeb1b0f7ecb3fcc8b7ae815e5 Mon Sep 17 00:00:00 2001 From: Victor Allombert Date: Wed, 16 Aug 2023 16:15:08 +0200 Subject: [PATCH 3/3] Nairobi/Baker: retrieve operations before 'propose for' --- src/proto_017_PtNairob/lib_delegate/baking_lib.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/proto_017_PtNairob/lib_delegate/baking_lib.ml b/src/proto_017_PtNairob/lib_delegate/baking_lib.ml index e646d82e62ff..5cdd7eb12b0d 100644 --- a/src/proto_017_PtNairob/lib_delegate/baking_lib.ml +++ b/src/proto_017_PtNairob/lib_delegate/baking_lib.ml @@ -299,6 +299,13 @@ let propose (cctxt : Protocol_client_context.full) ?minimal_fees () in let* state = create_state cctxt ~config ~current_proposal delegates in + (* Make sure the operation worker is populated to avoid empty blocks + being proposed. *) + let* () = + Operation_worker.retrieve_pending_operations + cctxt + state.global_state.operation_worker + in let* _ = match state.level_state.elected_block with | Some _ -> propose_at_next_level ~minimal_timestamp state -- GitLab