From 5fe54dc5991a810fbc0f2ffe6f9ad9678eee4d86 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Mon, 1 Sep 2025 14:01:03 +0100 Subject: [PATCH 1/2] Tezt_cloud: Layer1: Update documentation --- tezt/tests/cloud/layer1.mli | 47 ++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/tezt/tests/cloud/layer1.mli b/tezt/tests/cloud/layer1.mli index 73934933339b..8bf6de5d7352 100644 --- a/tezt/tests/cloud/layer1.mli +++ b/tezt/tests/cloud/layer1.mli @@ -6,27 +6,46 @@ (* *) (*****************************************************************************) -(** Layer 1 test scenario goal is to run experiments in a mainnet or ghostnet - context. +(** LAYER1 tezt-cloud scenario + -------------------------- - [dune exec tezt/tests/cloud/main.exe -- cloud l1 --help] + This scenario runs a small private network derived from Mainnet or Ghostnet + (using a rolling snapshot), with yes‑crypto enabled, and does the following: - The different steps of this scenario are: - - Bootstrap a node using real network so that we have at least one node - with the latest block metadata - - Disconnect the node from this network - - From here, every node will be ran with --private-mode and a known list - of peers (i.e. the full set of nodes involved in the experiment) - - Start bakers - - Wait for the nodes to sync - - Launch some nodes and clients and use them for stresstesting the network - - The experiment won't stop by itself unless some tezt-cloud timeout is - reached or a failure occurs. + 1. Bootstrapping + - Starts one node that first synchronises with the real network to pull in + full metadata. + - Shuts it down, then reconfigures it for private mode with yes‑crypto + enabled and a predetermined list of peers (all the nodes we will spawn). + 2. Peers calculation + - Collects ahead of time the P2P endpoint of every baker and stresstester + node so that each one can be launched in private mode knowing exactly which + peers to connect to. + 3. Bakers + - Each baker gets its own node process and client, imports its public keys, + converts its yes‑wallet, and then runs an agnostic baker over that node. + 4. Stresstest nodes + - Potentially launch one or more stresstest nodes that generate transactions at + the target TPS against the private network. + 5. Metrics & Monitoring + - Every node (bootstrap, bakers, stresstesters) is registered as a Prometheus + scrape target if `--prometheus` is set. + - Teztale archiver is configured automatically to record chain data. + - Metrics on block levels and operation counts are regularly pushed. + 6. Finishing + - The scenario itself never exits; your test runs until you kill it + or a Cloud level timeout or an error is reached. + + For full documentation on the CLI options of the scenario, use: + + [dune exec tezt/tests/cloud/main.exe -- LAYER1 --help] Running an experiment on a fresh snapshot could look like this: {[ + # fetch a rolling snapshot: wget -O ghostnet.snapshot https://snapshots.tzinit.org/ghostnet/rolling + dune exec tezt/tests/cloud/main.exe -- cloud l1 -v --log-file /tmp/log \ --stake 1,1 \ --network ghostnet \ -- GitLab From 723addaef90aedd0939c9af666cccb2165bb0e35 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Mon, 28 Jul 2025 13:51:52 +0100 Subject: [PATCH 2/2] Tezt_cloud: Dal: Add documentation for the scenario --- tezt/tests/cloud/dal.ml | 14 ---- tezt/tests/cloud/dal.mli | 137 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 14 deletions(-) create mode 100644 tezt/tests/cloud/dal.mli diff --git a/tezt/tests/cloud/dal.ml b/tezt/tests/cloud/dal.ml index 23ca85faa598..fcd3513f6d63 100644 --- a/tezt/tests/cloud/dal.ml +++ b/tezt/tests/cloud/dal.ml @@ -6,20 +6,6 @@ (* *) (*****************************************************************************) -(* Prerequisite: - - In order to be able to run the following test successfully, you need to make - sure that your environment is well configured. To do so, have a look at the - tezt/lib_cloud/README.md documentation. - - Additionally, if you are running the test you must ensure that: - - DAL_TRUSTED_SETUP_PATH contains the expected data -- this can be done by - running `./scripts/install_dal_trusted_setup.sh` - - smart rollup binaries are available -- requires to run `make -f kernels.mk - build-deps` and `make -f kernels.mk kernel_sdk` - - floodgate binaries are available -- `make build-floodgate` -*) - module Cryptobox = Dal_common.Cryptobox module Helpers = Dal_common.Helpers module Cli = Scenarios_cli diff --git a/tezt/tests/cloud/dal.mli b/tezt/tests/cloud/dal.mli new file mode 100644 index 000000000000..470ea6cd9655 --- /dev/null +++ b/tezt/tests/cloud/dal.mli @@ -0,0 +1,137 @@ +(*****************************************************************************) +(* *) +(* SPDX-License-Identifier: MIT *) +(* Copyright (c) 2025 Nomadic Labs, *) +(* Copyright (c) 2025 Trilitech *) +(* *) +(*****************************************************************************) + +(** DAL tezt-cloud scenario + -------------------------- + + This scenario deploys a private Octez network augmented with + Tezos’s Data Availability Layer (DAL), plus optional Etherlink and + Echo Rollup operators, producers, and observers. + + Prerequisites + ------------- + In order to be able to run the following test successfully, you need to make + sure that your environment is well configured. To do so, have a look at the + `tezt/lib_cloud/README.md` documentation. + + Additionally, if you are running the test you must ensure that: + - `DAL_TRUSTED_SETUP_PATH` contains the expected data -- this can be done by + running `./scripts/install_dal_trusted_setup.sh` + - smart rollup binaries are available -- requires to run `make -f kernels.mk + build-deps` and `make -f kernels.mk kernel_sdk` + - floodgate binaries are available -- `make build-floodgate` + + Workflow + -------- + + 1. Bootstrapping + - Create a single “bootstrap” L1 node, optionally seeded from a + public network snapshot and run it in private mode. + + 2. DAL layer + - If `--with-dal` is set, spin up an Octez DAL node alongside + the bootstrap L1 node, configured to serve data availability + and validate publish‑commitment proofs. + + 3. Bakers + - We either use the provided unencrypted secret keys or generate + fresh delegate keys, funding them from the bootstrap account according + to the desired stake distribution (`--stake`) or simulating the real network + (using yes-crypto) via the `--simulate-network` option. + + 4. Producers + - For each configured DAL slot index, start a DAL producer daemon that + periodically injects commitments operations into the chain. + + 5. Observers + - Launch observers that monitor on‑chain attestations for particular slots or + baker addresses, collecting metrics on missing or delayed attestations. + + 6. Etherlink + - If `--etherlink` is enabled, start the sequencer and batching + operators, bridge L1 block data into an Ethereum rollup, and fund their + accounts from the bootstrap node. + + 7. Echo Rollup + - If `--echo-rollup` is enabled, deploy a simple smart rollup and operator + that repeatedly sends and reads messages through the rollup inbox. + - Fund their accounts from the bootstrap node. + + 8. Metrics & Monitoring + - Register every node, baker, producer, observer, and rollup operator as + Prometheus scrape targets (if `--prometheus` is enabled). + - Attach a Teztale archiver for historical data. + + 9. Finishing + - The scenario itself never exits; your test runs until you kill it + or a Cloud level timeout or an error is reached. + + For full documentation on the CLI options of the scenario, use: + + [dune exec tezt/tests/cloud/main.exe -- DAL --help] + + Running an experiment on a fresh snapshot could look like this: + + {[ + # fetch a rolling snapshot: + wget -O ghostnet.snapshot https://snapshots.tzinit.org/ghostnet/rolling + + dune exec tezt/tests/cloud/main.exe -- DAL -v --log-file /tmp/log \ + --producers 16 \ + --producer-slot-indices 0 \ + --network ghostnet \ + --tezt-cloud $USER \ + --dockerfile-alias debian \ + --snapshot file:./ghostnet.snapshot \ + --simulate map\(1000,40) \ + --prometheus \ + --grafana \ + --website \ + --monitoring + ]} + + To avoid running such a long command, one can use the configuration file mechanism + provided, using: + + {[ + dune exec tezt/tests/cloud/main.exe -- DAL -v --log-file /tmp/log \ + --config-file + ]} + + Where the configuration file contains: + + {[ + { + "tezt_cloud": "$USER", + "dockerfile_alias": "dal", + "prometheus": true, + "website": true, + "grafana": true, + "monitoring": true, + "scenario_specific": [ + "DAL", + { + "network": "ghostnet", + "producers": 16, + "dal_producers_slot_indices": [ + 0 + ], + "simulate_network": [ + 1000, + 40 + ], + "snapshot": { + "local_file": "./ghostnet.snapshot" + } + } + ] + } + ]} +*) + +val register : (module Scenarios_cli.Dal) -> unit -- GitLab