From d48b794f0e5d5c78400b784d695ca7efe86fe831 Mon Sep 17 00:00:00 2001 From: Andrea Cerone Date: Wed, 2 Aug 2023 13:57:11 +0100 Subject: [PATCH] Testnet experiments: Bootstrap devtools --- devtools/testnet_experiment_tools/dune | 25 +++++++ .../testnet_experiment_tools.ml | 66 +++++++++++++++++++ manifest/main.ml | 23 +++++++ 3 files changed, 114 insertions(+) create mode 100644 devtools/testnet_experiment_tools/dune create mode 100644 devtools/testnet_experiment_tools/testnet_experiment_tools.ml diff --git a/devtools/testnet_experiment_tools/dune b/devtools/testnet_experiment_tools/dune new file mode 100644 index 000000000000..4284e84b87f0 --- /dev/null +++ b/devtools/testnet_experiment_tools/dune @@ -0,0 +1,25 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + +(executable + (name testnet_experiment_tools) + (libraries + tezt + octez-libs.tezt-tezos + tezos-client-base-unix + octez-libs.tezos-base + octez-libs.tezos-base.unix + octez-libs.tezos-stdlib-unix + tezos-client-alpha + tezos-protocol-alpha) + (link_flags + (:standard) + (:include %{workspace_root}/macos-link-flags.sexp)) + (flags + (:standard) + -open Tezt + -open Tezt.Base + -open Tezos_client_base_unix + -open Tezos_stdlib_unix + -open Tezos_protocol_alpha) + (modules testnet_experiment_tools)) diff --git a/devtools/testnet_experiment_tools/testnet_experiment_tools.ml b/devtools/testnet_experiment_tools/testnet_experiment_tools.ml new file mode 100644 index 000000000000..097eaf364945 --- /dev/null +++ b/devtools/testnet_experiment_tools/testnet_experiment_tools.ml @@ -0,0 +1,66 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 Trili Tech *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +open Tezt + +(* These tests can be run locally to generate the data needed to run a + stresstest. *) +module Local = struct + let generate_baker_accounts () = Test.fail "Not implemented" + + let generate_network_configuration () = Test.fail "Not implemented" + + let generate_manager_operations () = Test.fail "Not implemented" +end + +(* These tests must be run remotely by the nodes participating in + a network that wants to be stresstested. *) +module Remote = struct + let run_stresstest () = Test.fail "Not implemented" +end + +let () = + let open Tezt.Test in + register + ~__FILE__ + ~title:"Generate baker accounts" + ~tags:["generate_baker_accounts"] + Local.generate_baker_accounts ; + register + ~__FILE__ + ~title:"Generate Network Configuration" + ~tags:["generate_network_configuration"] + Local.generate_network_configuration ; + register + ~__FILE__ + ~title:"Generate manager operations" + ~tags:["generate_operations"] + Local.generate_manager_operations ; + register + ~__FILE__ + ~title:"Run stresstest" + ~tags:["run_stresstest"] + Remote.run_stresstest ; + Tezt.Test.run () diff --git a/manifest/main.ml b/manifest/main.ml index b0de8eaf284a..8a231de8a5c6 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -7206,6 +7206,29 @@ let _yes_wallet_test = ] ~bisect_ppx:No +let _testnet_experiment_tools = + private_exe + "testnet_experiment_tools" + ~path:("devtools" // "testnet_experiment_tools") + ~synopsis: + "Suite of tools to support the execution of stresstests on testnets" + ~bisect_ppx:No + ~static:false + ~with_macos_security_framework:true + ~opam:"" + ~deps: + [ + tezt_lib |> open_ |> open_ ~m:"Base"; + tezt_tezos; + octez_client_base_unix |> open_; + octez_base; + octez_base_unix; + octez_stdlib_unix |> open_; + Protocol.(client_exn alpha); + Protocol.(main alpha) |> open_; + ] + ~modules:["testnet_experiment_tools"] + let simdal_lib = private_lib "simdal" -- GitLab