From df06db57a35299ff01166c9d4692cf17ab3944aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joa=CC=83o=20Santos=20Reis?= Date: Wed, 31 Jan 2024 09:47:38 +0000 Subject: [PATCH 1/2] Fix integration test slowness and flakiness --- src/app/test_executive/slot_end_test.ml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/app/test_executive/slot_end_test.ml b/src/app/test_executive/slot_end_test.ml index 85e2dde1d90..23abdca7c60 100644 --- a/src/app/test_executive/slot_end_test.ml +++ b/src/app/test_executive/slot_end_test.ml @@ -17,9 +17,9 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct let num_extra_keys = 100 - let slot_tx_end = 10 + let slot_tx_end = 5 - let slot_chain_end = 15 + let slot_chain_end = 8 let sender_account_prefix = "sender-account-" @@ -77,7 +77,7 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct let run network t = let open Malleable_error.Let_syntax in let logger = Logger.create () in - let num_slots = slot_chain_end + 5 in + let num_slots = slot_chain_end + 2 in let receiver = String.Map.find_exn (Network.block_producers network) "receiver" in @@ -105,15 +105,11 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct let window_ms = (Network.constraint_constants network).block_window_duration_ms in - let all_nodes = Network.all_nodes network in + let all_nodes = Network.all_mina_nodes network in let%bind () = wait_for t (Wait_condition.nodes_to_initialize (String.Map.data all_nodes)) in - let%bind () = - section_hard "wait for 3 blocks to be produced (warm-up)" - (wait_for t (Wait_condition.blocks_to_be_produced 3)) - in let genesis_timestamp = Block_time.to_time @@ Block_time.of_int64 From f2aecbf407f591d7ffd114c818c9cf4bb8896f0e Mon Sep 17 00:00:00 2001 From: georgeee Date: Thu, 1 Feb 2024 19:00:52 +0100 Subject: [PATCH 2/2] Introduce mainnet/devnet build profiles in nix To build mainnet node, use `nix build mina#mainnet` For devnet node: `nix build mina#devnet` --- flake.nix | 2 +- nix/ocaml.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index e1e64655771..f4a43192c81 100644 --- a/flake.nix +++ b/flake.nix @@ -262,7 +262,7 @@ packages = { inherit (ocamlPackages) - mina mina_tests mina-ocaml-format mina_client_sdk test_executive; + mina devnet mainnet mina_tests mina-ocaml-format mina_client_sdk test_executive; inherit (pkgs) libp2p_helper marlin_plonk_bindings_stubs; }; diff --git a/nix/ocaml.nix b/nix/ocaml.nix index 070f10ea934..0dee5ed3917 100644 --- a/nix/ocaml.nix +++ b/nix/ocaml.nix @@ -218,6 +218,26 @@ let mina = wrapMina self.mina-dev { }; + mainnet-pkg = self.mina-dev.overrideAttrs (s: { + version = "mainnet"; + configurePhase = '' + ${s.configurePhase} + export DUNE_PROFILE=mainnet + ''; + }); + + mainnet = wrapMina self.mainnet-pkg { }; + + devnet-pkg = self.mina-dev.overrideAttrs (s: { + version = "devnet"; + configurePhase = '' + ${s.configurePhase} + export DUNE_PROFILE=devnet + ''; + }); + + devnet = wrapMina self.devnet-pkg { }; + mina_tests = runMinaCheck { name = "tests"; extraArgs = {