From c196c812621e856597512725806fd857fc3771aa Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Thu, 1 Aug 2024 14:49:43 +0200 Subject: [PATCH] DAL/Node: fork amplificator before starting the crawler --- src/bin_dal_node/daemon.ml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/bin_dal_node/daemon.ml b/src/bin_dal_node/daemon.ml index 63b1af3c565a..3ad47b581d8a 100644 --- a/src/bin_dal_node/daemon.ml +++ b/src/bin_dal_node/daemon.ml @@ -916,6 +916,15 @@ let run ~data_dir ~configuration_override = let* cryptobox, shards_proofs_precomputation = init_cryptobox config proto_parameters in + let* amplificator = + (* TODO: https://gitlab.com/tezos/tezos/-/issues/7452 + The amplificator also initializes the crypto. This could be avoided. + Also, is this the right moment to start the amplificator? *) + if Profile_manager.is_prover_profile profile_ctxt then + let* amplificator = Amplificator.make () in + return_some amplificator + else return_none + in (* Set value size hooks. *) Value_size_hooks.set_share_size (Cryptobox.Internal_for_tests.encoded_share_size cryptobox) ; @@ -948,12 +957,6 @@ let run ~data_dir ~configuration_override = ?last_notified_level:last_processed_level cctxt in - let* amplificator = - if Profile_manager.is_prover_profile profile_ctxt then - let* amplificator = Amplificator.make () in - return_some amplificator - else return_none - in let* () = match amplificator with | None -> return_unit -- GitLab