From 85b2854cae14c7a440bb732517145d19a1d626fb Mon Sep 17 00:00:00 2001 From: hansieodendaal Date: Fri, 23 Jan 2026 09:28:00 +0200 Subject: [PATCH] update for main repo changes - removal of DA - removal of executor node --- .github/workflows/lint.yml | 1 - .gitignore | 1 + Cargo.lock | 2241 ++++++++++++++--- Cargo.toml | 78 +- README.md | 1 - book/src/annotated-tree.md | 2 +- book/src/api-levels.md | 6 +- book/src/architecture-overview.md | 14 +- book/src/authoring-scenarios.md | 21 +- book/src/best-practices.md | 2 - book/src/chaos.md | 7 +- book/src/ci-integration.md | 1 - book/src/dsl-cheat-sheet.md | 19 +- book/src/environment-variables.md | 13 +- book/src/examples-advanced.md | 12 +- book/src/examples.md | 10 +- book/src/extending.md | 4 +- book/src/glossary.md | 5 - book/src/internal-crate-reference.md | 4 +- book/src/introduction.md | 3 +- book/src/logging-observability.md | 13 +- book/src/node-control.md | 2 - book/src/operations-overview.md | 2 +- book/src/prerequisites.md | 9 +- book/src/project-context-primer.md | 9 +- book/src/quickstart.md | 14 +- book/src/running-examples.md | 14 +- book/src/running-scenarios.md | 2 +- book/src/scenario-lifecycle.md | 4 +- book/src/testing-philosophy.md | 10 +- book/src/topology-chaos.md | 2 +- book/src/troubleshooting.md | 25 +- book/src/what-you-will-learn.md | 2 +- book/src/workloads.md | 58 +- examples/Cargo.toml | 4 +- .../src/architecture_overview_builder_api.rs | 2 +- .../src/chaos_workloads_random_restart.rs | 3 +- .../doc-snippets/src/dsl_cheat_sheet_build.rs | 2 +- .../dsl_cheat_sheet_build_complete_example.rs | 2 +- .../src/dsl_cheat_sheet_expectations.rs | 2 +- .../src/dsl_cheat_sheet_run_duration.rs | 2 +- .../src/dsl_cheat_sheet_topology.rs | 1 - .../dsl_cheat_sheet_transactions_workload.rs | 2 +- .../src/dsl_cheat_sheet_wallets.rs | 2 +- .../src/dsl_cheat_sheet_workload_chaos.rs | 2 +- .../src/dsl_cheat_sheet_workload_execution.rs | 2 +- ...examples_advanced_aggressive_chaos_test.rs | 2 +- ...examples_advanced_load_progression_test.rs | 13 +- .../examples_advanced_sustained_load_test.rs | 2 +- .../src/examples_chaos_resilience.rs | 2 +- .../src/examples_da_and_transactions.rs | 2 +- .../src/examples_simple_consensus.rs | 2 +- .../src/examples_transaction_workload.rs | 2 +- ...e_reference_add_expectation_builder_ext.rs | 2 +- ..._reference_add_workload_use_in_examples.rs | 2 +- .../doc-snippets/src/node_control_trait.rs | 1 - .../src/quickstart_adjust_topology.rs | 2 +- .../src/quickstart_core_api_pattern.rs | 4 +- .../src/quickstart_step_1_topology.rs | 3 +- .../src/quickstart_step_2_wallets.rs | 2 +- .../src/quickstart_step_3_workloads.rs | 2 +- .../src/quickstart_step_4_expectation.rs | 2 +- .../src/quickstart_step_5_run_duration.rs | 2 +- .../quickstart_step_6_deploy_and_execute.rs | 2 +- .../src/quickstart_swap_deployer_compose.rs | 2 +- ..._philosophy_declarative_over_imperative.rs | 4 +- .../testing_philosophy_determinism_first.rs | 31 +- .../testing_philosophy_minimum_run_windows.rs | 4 +- ..._philosophy_protocol_time_not_wall_time.rs | 2 +- examples/src/bin/compose_runner.rs | 22 +- examples/src/bin/k8s_runner.rs | 22 +- examples/src/bin/local_runner.rs | 19 +- examples/src/demo.rs | 1 - examples/tests/dynamic_join.rs | 32 +- examples/tests/manual_cluster.rs | 2 +- scripts/build/build-bundle.sh | 6 +- scripts/build/build-linux-binaries.sh | 3 +- scripts/build/build_test_image.sh | 10 +- scripts/ops/update-nomos-rev.sh | 8 - scripts/run/run-examples.sh | 38 +- scripts/run/run-test-matrix.sh | 15 +- .../assets/stack/Dockerfile.base | 1 - .../stack/scripts/docker/prepare_binaries.sh | 5 +- .../assets/stack/scripts/run_nomos.sh | 1 - .../stack/scripts/run_nomos_executor.sh | 2 - testing-framework/configs/Cargo.toml | 23 +- testing-framework/configs/src/nodes/common.rs | 76 +- .../configs/src/nodes/executor.rs | 127 - testing-framework/configs/src/nodes/mod.rs | 1 - .../configs/src/nodes/validator.rs | 52 +- .../configs/src/topology/configs/base.rs | 9 +- .../configs/src/topology/configs/consensus.rs | 44 +- .../configs/src/topology/configs/da.rs | 353 --- .../configs/src/topology/configs/mod.rs | 26 +- .../configs/src/topology/configs/runtime.rs | 22 +- .../configs/src/topology/invariants.rs | 18 - testing-framework/core/Cargo.toml | 13 +- testing-framework/core/src/lib.rs | 1 - testing-framework/core/src/manual.rs | 6 - .../core/src/nodes/api_client.rs | 66 +- testing-framework/core/src/nodes/executor.rs | 111 - testing-framework/core/src/nodes/mod.rs | 1 - testing-framework/core/src/nodes/validator.rs | 6 - .../core/src/scenario/capabilities.rs | 14 - .../core/src/scenario/cfgsync.rs | 36 +- .../core/src/scenario/definition.rs | 18 +- .../core/src/scenario/http_probe.rs | 2 - .../core/src/scenario/runtime/node_clients.rs | 67 +- testing-framework/core/src/topology/config.rs | 189 +- .../core/src/topology/deployment.rs | 124 +- .../core/src/topology/generation.rs | 131 +- .../core/src/topology/readiness/balancer.rs | 133 - .../core/src/topology/readiness/membership.rs | 237 -- .../core/src/topology/readiness/mod.rs | 4 - .../core/src/topology/readiness/network.rs | 43 +- testing-framework/core/src/topology/utils.rs | 18 +- .../deployers/compose/Cargo.toml | 8 +- .../compose/assets/docker-compose.yml.tera | 3 - .../deployers/compose/src/deployer/mod.rs | 27 +- .../compose/src/deployer/orchestrator.rs | 19 - .../deployers/compose/src/deployer/ports.rs | 2 - .../compose/src/deployer/readiness.rs | 14 +- .../deployers/compose/src/deployer/setup.rs | 1 - .../deployers/compose/src/descriptor/mod.rs | 23 +- .../deployers/compose/src/descriptor/node.rs | 3 +- .../deployers/compose/src/docker/control.rs | 10 - .../deployers/compose/src/errors.rs | 6 +- .../compose/src/infrastructure/cfgsync.rs | 1 - .../compose/src/infrastructure/environment.rs | 5 +- .../compose/src/infrastructure/ports.rs | 31 +- .../compose/src/lifecycle/block_feed.rs | 1 - .../compose/src/lifecycle/readiness.rs | 20 +- .../deployers/compose/src/lifecycle/wait.rs | 4 - testing-framework/deployers/k8s/Cargo.toml | 12 +- .../helm/nomos-runner/templates/_helpers.tpl | 8 - .../nomos-runner/templates/configmap.yaml | 7 +- .../templates/executor-deployments.yaml | 73 - .../templates/executor-services.yaml | 22 - .../k8s/helm/nomos-runner/values.yaml | 5 - .../k8s/src/deployer/orchestrator.rs | 33 +- .../k8s/src/infrastructure/assets.rs | 13 +- .../k8s/src/infrastructure/cluster.rs | 84 +- .../deployers/k8s/src/infrastructure/helm.rs | 14 +- .../deployers/k8s/src/lifecycle/block_feed.rs | 1 - .../deployers/k8s/src/lifecycle/wait/mod.rs | 2 - .../k8s/src/lifecycle/wait/orchestrator.rs | 60 - testing-framework/deployers/local/Cargo.toml | 23 +- .../deployers/local/src/manual/mod.rs | 25 - .../local/src/node_control/config.rs | 4 - .../deployers/local/src/node_control/mod.rs | 98 - .../deployers/local/src/node_control/state.rs | 16 +- .../deployers/local/src/runner.rs | 8 +- testing-framework/tools/cfgsync_tf/Cargo.toml | 3 - .../cfgsync_tf/src/bin/cfgsync-client.rs | 97 +- .../tools/cfgsync_tf/src/config/builder.rs | 51 +- .../tools/cfgsync_tf/src/config/kms.rs | 20 +- .../tools/cfgsync_tf/src/config/providers.rs | 52 +- .../tools/cfgsync_tf/src/config/validation.rs | 3 +- .../tools/cfgsync_tf/src/host.rs | 13 +- .../tools/cfgsync_tf/src/repo.rs | 14 +- .../tools/cfgsync_tf/src/server.rs | 149 +- testing-framework/workflows/Cargo.toml | 2 +- .../workflows/src/builder/mod.rs | 13 +- .../src/expectations/consensus_liveness.rs | 2 +- .../workflows/src/workloads/chaos.rs | 21 +- .../src/workloads/transaction/workload.rs | 1 - .../workflows/src/workloads/util.rs | 4 +- versions.env | 2 +- 168 files changed, 2311 insertions(+), 3709 deletions(-) delete mode 100755 testing-framework/assets/stack/scripts/run_nomos_executor.sh delete mode 100644 testing-framework/configs/src/nodes/executor.rs delete mode 100644 testing-framework/configs/src/topology/configs/da.rs delete mode 100644 testing-framework/core/src/nodes/executor.rs delete mode 100644 testing-framework/core/src/topology/readiness/balancer.rs delete mode 100644 testing-framework/core/src/topology/readiness/membership.rs delete mode 100644 testing-framework/deployers/k8s/helm/nomos-runner/templates/executor-deployments.yaml delete mode 100644 testing-framework/deployers/k8s/helm/nomos-runner/templates/executor-services.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0713647..e4e9911 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -242,7 +242,6 @@ jobs: POL_PROOF_DEV_MODE: true LOCAL_DEMO_RUN_SECS: 120 LOCAL_DEMO_VALIDATORS: 1 - LOCAL_DEMO_EXECUTORS: 1 NOMOS_CIRCUITS: ${{ github.workspace }}/.tmp/nomos-circuits NOMOS_KZGRS_PARAMS_PATH: ${{ github.workspace }}/.tmp/kzgrs_test_params CARGO_INCREMENTAL: 0 diff --git a/.gitignore b/.gitignore index 0275d82..991ebde 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ NOMOS_RUST_SOURCES_ONLY.txt dump.zsh testing-framework/assets/stack/bin/ testing-framework/assets/stack/kzgrs_test_params/ +null # Local test artifacts (kept when NOMOS_TESTS_KEEP_LOGS=1) tests/workflows/.tmp* diff --git a/Cargo.lock b/Cargo.lock index 08b6e48..a8b2469 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,12 +54,56 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + [[package]] name = "anstyle" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.60.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.60.2", +] + [[package]] name = "anyhow" version = "1.0.100" @@ -833,6 +877,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "broadcast-service" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "derivative", + "futures", + "nomos-core", + "overwatch", + "serde", + "tokio", + "tokio-stream", + "tracing", +] + [[package]] name = "bs58" version = "0.5.1" @@ -858,6 +918,12 @@ version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + [[package]] name = "bytemuck" version = "1.24.0" @@ -954,13 +1020,10 @@ dependencies = [ "clap", "hex", "logos-blockchain-core", - "logos-blockchain-da-network-core", - "logos-blockchain-executor", "logos-blockchain-groth16", "logos-blockchain-key-management-system-service", "logos-blockchain-libp2p", "logos-blockchain-node", - "logos-blockchain-subnetworks-assignations", "logos-blockchain-tracing-service", "logos-blockchain-utils", "rand 0.8.5", @@ -970,13 +1033,141 @@ dependencies = [ "serde_path_to_error", "serde_with", "serde_yaml", - "testing-framework-config", - "testing-framework-core", + "testing-framework-config 0.1.0", + "testing-framework-core 0.1.0", "thiserror 2.0.17", "tokio", "tracing", ] +[[package]] +name = "cfgsync_tf" +version = "0.1.0" +source = "git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master#28685298ba8b8bb8e628ac4649fac150276aa5d0" +dependencies = [ + "anyhow", + "axum", + "clap", + "groth16", + "hex", + "key-management-system-service", + "nomos-core", + "nomos-da-network-core", + "nomos-executor", + "nomos-libp2p", + "nomos-node", + "nomos-tracing-service", + "nomos-utils", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "serde_path_to_error", + "serde_with", + "serde_yaml", + "subnetworks-assignations", + "testing-framework-config 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "testing-framework-core 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "thiserror 2.0.17", + "tokio", + "tracing", +] + +[[package]] +name = "chain-common" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "nomos-core", + "serde", +] + +[[package]] +name = "chain-leader" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "chain-common", + "chain-service", + "cryptarchia-engine", + "futures", + "key-management-system-keys", + "nomos-blend-service", + "nomos-core", + "nomos-da-sampling", + "nomos-ledger", + "nomos-time", + "nomos-wallet", + "overwatch", + "serde", + "services-utils", + "thiserror 1.0.69", + "tokio", + "tracing", + "tracing-futures", + "tx-service", +] + +[[package]] +name = "chain-network" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "chain-common", + "chain-service", + "cryptarchia-engine", + "cryptarchia-sync", + "futures", + "nomos-core", + "nomos-da-sampling", + "nomos-ledger", + "nomos-network", + "nomos-time", + "overwatch", + "rand 0.8.5", + "serde", + "serde_with", + "services-utils", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", + "tracing-futures", + "tx-service", +] + +[[package]] +name = "chain-service" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "broadcast-service", + "bytes", + "cryptarchia-engine", + "cryptarchia-sync", + "futures", + "groth16", + "nomos-core", + "nomos-ledger", + "nomos-network", + "nomos-storage", + "nomos-time", + "nomos-utils", + "num-bigint", + "overwatch", + "serde", + "serde_with", + "services-utils", + "strum", + "thiserror 1.0.69", + "tokio", + "tracing", + "tracing-futures", +] + [[package]] name = "chrono" version = "0.4.42" @@ -1021,6 +1212,23 @@ dependencies = [ "inout", ] +[[package]] +name = "circuits-prover" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "circuits-utils", + "tempfile", +] + +[[package]] +name = "circuits-utils" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "dirs", +] + [[package]] name = "clang-sys" version = "1.8.1" @@ -1048,8 +1256,11 @@ version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ + "anstream", "anstyle", "clap_lex", + "strsim", + "terminal_size", ] [[package]] @@ -1083,6 +1294,30 @@ dependencies = [ "owo-colors", ] +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "common-http-client" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "broadcast-service", + "chain-service", + "futures", + "nomos-core", + "nomos-da-messages", + "nomos-http-api-common", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "url", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -1092,6 +1327,19 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "windows-sys 0.61.2", +] + [[package]] name = "const-hex" version = "1.17.0" @@ -1125,6 +1373,15 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1217,6 +1474,40 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "cryptarchia-engine" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "cfg_eval", + "nomos-utils", + "serde", + "serde_with", + "thiserror 1.0.69", + "time", + "tokio", + "tracing", +] + +[[package]] +name = "cryptarchia-sync" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "bytes", + "cryptarchia-engine", + "futures", + "libp2p", + "libp2p-stream", + "nomos-core", + "rand 0.8.5", + "serde", + "serde_with", + "thiserror 1.0.69", + "tokio", + "tracing", +] + [[package]] name = "crypto-bigint" version = "0.5.5" @@ -1250,6 +1541,64 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "cucumber" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c09939b8de21501b829a3839fa8a01ef6cc226e6bc1f5f163f7104bd5e847d" +dependencies = [ + "anyhow", + "clap", + "console", + "cucumber-codegen", + "cucumber-expressions", + "derive_more", + "either", + "futures", + "gherkin", + "globwalk", + "humantime", + "inventory", + "itertools 0.14.0", + "junit-report", + "linked-hash-map", + "pin-project", + "ref-cast", + "regex", + "sealed", + "smart-default", +] + +[[package]] +name = "cucumber-codegen" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f5afe541b5147a7b986816153ccfd502622bb37789420cfff412685f27c0a95" +dependencies = [ + "cucumber-expressions", + "inflections", + "itertools 0.14.0", + "proc-macro2", + "quote", + "regex", + "syn 2.0.111", + "synthez", +] + +[[package]] +name = "cucumber-expressions" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6401038de3af44fe74e6fccdb8a5b7db7ba418f480c8e9ad584c6f65c05a27a6" +dependencies = [ + "derive_more", + "either", + "nom 8.0.0", + "nom_locate", + "regex", + "regex-syntax", +] + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -1414,6 +1763,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-getters" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2c35ab6e03642397cdda1dd58abbc05d418aef8e36297f336d5aba060fe8df" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_arbitrary" version = "1.4.2" @@ -1425,6 +1785,29 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case 0.10.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.111", + "unicode-xid", +] + [[package]] name = "deunicode" version = "1.6.2" @@ -1527,11 +1910,11 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "testing-framework-core", - "testing-framework-runner-compose", + "testing-framework-core 0.1.0", + "testing-framework-runner-compose 0.1.0", "testing-framework-runner-k8s", - "testing-framework-runner-local", - "testing-framework-workflows", + "testing-framework-runner-local 0.1.0", + "testing-framework-workflows 0.1.0", ] [[package]] @@ -1617,6 +2000,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "enum-as-inner" version = "0.6.1" @@ -1686,6 +2075,19 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "executor-http-client" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "common-http-client", + "futures", + "nomos-core", + "nomos-http-api-common", + "reqwest", + "serde", +] + [[package]] name = "eyre" version = "0.6.12" @@ -1985,6 +2387,23 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gherkin" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70197ce7751bfe8bc828e3a855502d3a869a1e9416b58b10c4bde5cf8a0a3cb3" +dependencies = [ + "heck", + "peg", + "quote", + "serde", + "serde_json", + "syn 2.0.111", + "textwrap", + "thiserror 2.0.17", + "typed-builder", +] + [[package]] name = "gimli" version = "0.32.3" @@ -2053,6 +2472,24 @@ dependencies = [ "spinning_top", ] +[[package]] +name = "groth16" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "ark-bn254 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-groth16", + "ark-serialize 0.4.2", + "generic-array 1.3.5", + "hex", + "num-bigint", + "serde", + "serde_json", + "thiserror 2.0.17", +] + [[package]] name = "group" version = "0.13.0" @@ -2737,6 +3174,12 @@ dependencies = [ "serde_core", ] +[[package]] +name = "inflections" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" + [[package]] name = "inout" version = "0.1.4" @@ -2755,6 +3198,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "inventory" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc61209c082fbeb19919bee74b176221b27223e27b65d781eb91af24eb1fb46e" +dependencies = [ + "rustversion", +] + [[package]] name = "ipconfig" version = "0.3.2" @@ -2783,6 +3235,12 @@ dependencies = [ "serde", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itertools" version = "0.10.5" @@ -2894,6 +3352,18 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "junit-report" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c3a3342e6720a82d7d179f380e9841b73a1dd49344e33959fdfe571ce56b55" +dependencies = [ + "derive-getters", + "quick-xml", + "strip-ansi-escapes", + "time", +] + [[package]] name = "k256" version = "0.13.4" @@ -2931,6 +3401,57 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "key-management-system-keys" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "bytes", + "ed25519-dalek", + "generic-array 1.3.5", + "groth16", + "key-management-system-macros", + "nomos-blend-proofs", + "nomos-utils", + "num-bigint", + "poseidon2", + "rand_core 0.6.4", + "serde", + "subtle", + "thiserror 2.0.17", + "tokio", + "tracing", + "x25519-dalek", + "zeroize", + "zksign", +] + +[[package]] +name = "key-management-system-macros" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "key-management-system-service" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "key-management-system-keys", + "log", + "overwatch", + "serde", + "thiserror 2.0.17", + "tokio", + "tracing", +] + [[package]] name = "kube" version = "0.87.2" @@ -3022,6 +3543,41 @@ dependencies = [ "tracing", ] +[[package]] +name = "kzgrs" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "ark-bls12-381", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-poly-commit", + "ark-serialize 0.4.2", + "blake2", + "blst", + "num-bigint", + "num-traits", + "rand 0.8.5", + "thiserror 1.0.69", +] + +[[package]] +name = "kzgrs-backend" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "blake2", + "itertools 0.12.1", + "kzgrs", + "nomos-core", + "rand 0.8.5", + "serde", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -3196,6 +3752,7 @@ dependencies = [ "quick-protobuf-codec", "rand 0.8.5", "regex", + "serde", "sha2", "tracing", "web-time", @@ -3262,6 +3819,7 @@ dependencies = [ "quick-protobuf", "quick-protobuf-codec", "rand 0.8.5", + "serde", "sha2", "smallvec", "thiserror 2.0.17", @@ -3491,6 +4049,12 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -3521,7 +4085,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "logos-blockchain-api-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "bytes", @@ -3529,17 +4093,9 @@ dependencies = [ "logos-blockchain-chain-broadcast-service", "logos-blockchain-chain-service", "logos-blockchain-core", - "logos-blockchain-da-dispersal-service", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-da-sampling-service", - "logos-blockchain-da-verifier-service", - "logos-blockchain-kzgrs-backend", - "logos-blockchain-libp2p", "logos-blockchain-network-service", "logos-blockchain-sdp-service", "logos-blockchain-storage-service", - "logos-blockchain-subnetworks-assignations", "logos-blockchain-time-service", "logos-blockchain-tx-service", "overwatch", @@ -3555,7 +4111,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "logos-blockchain-blend-crypto", "logos-blockchain-blend-message", @@ -3567,7 +4123,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-crypto" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "blake2", "logos-blockchain-groth16", @@ -3581,7 +4137,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-message" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "blake2", "derivative", @@ -3603,7 +4159,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-network" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "either", "futures", @@ -3621,7 +4177,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-proofs" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "ed25519-dalek", "generic-array 1.3.5", @@ -3636,7 +4192,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-scheduling" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "derivative", @@ -3659,7 +4215,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "fork_stream", @@ -3694,7 +4250,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-broadcast-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "derivative", @@ -3710,7 +4266,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-leader-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "futures", @@ -3719,7 +4275,6 @@ dependencies = [ "logos-blockchain-chain-service-common", "logos-blockchain-core", "logos-blockchain-cryptarchia-engine", - "logos-blockchain-da-sampling-service", "logos-blockchain-key-management-system-keys", "logos-blockchain-ledger", "logos-blockchain-services-utils", @@ -3737,7 +4292,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "futures", @@ -3746,7 +4301,6 @@ dependencies = [ "logos-blockchain-core", "logos-blockchain-cryptarchia-engine", "logos-blockchain-cryptarchia-sync", - "logos-blockchain-da-sampling-service", "logos-blockchain-ledger", "logos-blockchain-network-service", "logos-blockchain-services-utils", @@ -3766,7 +4320,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "bytes", @@ -3796,7 +4350,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "logos-blockchain-core", "serde", @@ -3805,7 +4359,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-prover" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "logos-blockchain-circuits-utils", "tempfile", @@ -3814,7 +4368,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "dirs", ] @@ -3822,13 +4376,12 @@ dependencies = [ [[package]] name = "logos-blockchain-common-http-client" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "futures", "logos-blockchain-chain-broadcast-service", "logos-blockchain-chain-service", "logos-blockchain-core", - "logos-blockchain-da-messages", "logos-blockchain-http-api-common", "reqwest", "serde", @@ -3840,10 +4393,9 @@ dependencies = [ [[package]] name = "logos-blockchain-core" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "ark-ff 0.4.2", - "async-trait", "bincode", "blake2", "bytes", @@ -3870,7 +4422,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-engine" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "cfg_eval", "logos-blockchain-utils", @@ -3885,7 +4437,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-sync" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "bytes", "futures", @@ -3901,221 +4453,10 @@ dependencies = [ "tracing", ] -[[package]] -name = "logos-blockchain-da-dispersal-service" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "async-trait", - "futures", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-core", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-kzgrs-backend", - "logos-blockchain-services-utils", - "logos-blockchain-subnetworks-assignations", - "logos-blockchain-tracing", - "logos-blockchain-utils", - "overwatch", - "serde", - "serde_with", - "thiserror 2.0.17", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "logos-blockchain-da-messages" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "blake2", - "futures", - "logos-blockchain-core", - "logos-blockchain-kzgrs-backend", - "serde", - "tokio", -] - -[[package]] -name = "logos-blockchain-da-network-core" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "cached", - "fixed", - "futures", - "indexmap 2.12.1", - "libp2p", - "libp2p-stream", - "log", - "logos-blockchain-core", - "logos-blockchain-da-messages", - "logos-blockchain-kzgrs-backend", - "logos-blockchain-subnetworks-assignations", - "logos-blockchain-utils", - "rand 0.9.2", - "serde", - "serde_with", - "thiserror 1.0.69", - "tokio", - "tokio-stream", - "tracing", - "tracing-subscriber 0.3.22", -] - -[[package]] -name = "logos-blockchain-da-network-service" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "arc-swap", - "async-trait", - "bitvec", - "blake2", - "futures", - "libp2p", - "libp2p-identity", - "log", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-common-http-client", - "logos-blockchain-core", - "logos-blockchain-da-messages", - "logos-blockchain-da-network-core", - "logos-blockchain-kzgrs-backend", - "logos-blockchain-libp2p", - "logos-blockchain-sdp-service", - "logos-blockchain-services-utils", - "logos-blockchain-storage-service", - "logos-blockchain-subnetworks-assignations", - "logos-blockchain-tracing", - "logos-blockchain-utils", - "multiaddr", - "overwatch", - "rand 0.8.5", - "serde", - "thiserror 1.0.69", - "tokio", - "tokio-stream", - "tracing", - "url", -] - -[[package]] -name = "logos-blockchain-da-sampling-service" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "async-trait", - "bytes", - "either", - "futures", - "hex", - "libp2p-identity", - "logos-blockchain-core", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-kzgrs-backend", - "logos-blockchain-services-utils", - "logos-blockchain-storage-service", - "logos-blockchain-subnetworks-assignations", - "logos-blockchain-tracing", - "logos-blockchain-tx-service", - "overwatch", - "rand 0.8.5", - "serde", - "thiserror 1.0.69", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "logos-blockchain-da-verifier-service" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "async-trait", - "futures", - "libp2p", - "logos-blockchain-core", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-kzgrs-backend", - "logos-blockchain-services-utils", - "logos-blockchain-storage-service", - "logos-blockchain-subnetworks-assignations", - "logos-blockchain-tracing", - "logos-blockchain-tx-service", - "logos-blockchain-utils", - "overwatch", - "serde", - "serde_with", - "thiserror 1.0.69", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "logos-blockchain-executor" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "async-trait", - "axum", - "clap", - "color-eyre", - "futures", - "logos-blockchain-api-service", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-core", - "logos-blockchain-da-dispersal-service", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-da-sampling-service", - "logos-blockchain-da-verifier-service", - "logos-blockchain-http-api-common", - "logos-blockchain-kzgrs-backend", - "logos-blockchain-libp2p", - "logos-blockchain-network-service", - "logos-blockchain-node", - "logos-blockchain-sdp-service", - "logos-blockchain-services-utils", - "logos-blockchain-storage-service", - "logos-blockchain-subnetworks-assignations", - "logos-blockchain-time-service", - "logos-blockchain-tx-service", - "overwatch", - "serde", - "tokio", - "tower 0.4.13", - "tower-http 0.5.2", - "tracing", - "utoipa", - "utoipa-swagger-ui", -] - -[[package]] -name = "logos-blockchain-executor-http-client" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "futures", - "logos-blockchain-common-http-client", - "logos-blockchain-core", - "logos-blockchain-http-api-common", - "reqwest", - "serde", -] - [[package]] name = "logos-blockchain-groth16" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "ark-bn254 0.4.0", "ark-ec 0.4.2", @@ -4133,7 +4474,7 @@ dependencies = [ [[package]] name = "logos-blockchain-http-api-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "axum", "governor", @@ -4148,7 +4489,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-keys" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "bytes", @@ -4174,7 +4515,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-macros" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "proc-macro2", "quote", @@ -4184,7 +4525,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "log", @@ -4196,45 +4537,10 @@ dependencies = [ "tracing", ] -[[package]] -name = "logos-blockchain-kzgrs" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "ark-bls12-381", - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-poly-commit", - "ark-serialize 0.4.2", - "blake2", - "blst", - "num-bigint", - "num-traits", - "rand 0.8.5", - "thiserror 1.0.69", -] - -[[package]] -name = "logos-blockchain-kzgrs-backend" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-serialize 0.4.2", - "blake2", - "itertools 0.12.1", - "logos-blockchain-core", - "logos-blockchain-kzgrs", - "rand 0.8.5", - "serde", -] - [[package]] name = "logos-blockchain-ledger" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "logos-blockchain-blend-crypto", "logos-blockchain-blend-message", @@ -4257,7 +4563,7 @@ dependencies = [ [[package]] name = "logos-blockchain-libp2p" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "backon", @@ -4286,7 +4592,7 @@ dependencies = [ [[package]] name = "logos-blockchain-mmr" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "ark-ff 0.4.2", "logos-blockchain-groth16", @@ -4298,7 +4604,7 @@ dependencies = [ [[package]] name = "logos-blockchain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "futures", @@ -4317,7 +4623,7 @@ dependencies = [ [[package]] name = "logos-blockchain-node" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "axum", @@ -4335,15 +4641,9 @@ dependencies = [ "logos-blockchain-chain-service", "logos-blockchain-core", "logos-blockchain-cryptarchia-engine", - "logos-blockchain-da-messages", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-da-sampling-service", - "logos-blockchain-da-verifier-service", "logos-blockchain-groth16", "logos-blockchain-http-api-common", "logos-blockchain-key-management-system-service", - "logos-blockchain-kzgrs-backend", "logos-blockchain-ledger", "logos-blockchain-libp2p", "logos-blockchain-network-service", @@ -4352,7 +4652,6 @@ dependencies = [ "logos-blockchain-sdp-service", "logos-blockchain-services-utils", "logos-blockchain-storage-service", - "logos-blockchain-subnetworks-assignations", "logos-blockchain-system-sig-service", "logos-blockchain-time-service", "logos-blockchain-tracing", @@ -4381,7 +4680,7 @@ dependencies = [ [[package]] name = "logos-blockchain-pol" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4397,7 +4696,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poq" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4413,7 +4712,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poseidon2" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "ark-bn254 0.4.0", "ark-ff 0.4.2", @@ -4424,7 +4723,7 @@ dependencies = [ [[package]] name = "logos-blockchain-sdp-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "futures", @@ -4442,7 +4741,7 @@ dependencies = [ [[package]] name = "logos-blockchain-services-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "futures", @@ -4457,15 +4756,13 @@ dependencies = [ [[package]] name = "logos-blockchain-storage-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "bytes", "futures", - "libp2p-identity", "logos-blockchain-core", "logos-blockchain-cryptarchia-engine", - "multiaddr", "overwatch", "rocksdb", "serde", @@ -4474,23 +4771,10 @@ dependencies = [ "tracing", ] -[[package]] -name = "logos-blockchain-subnetworks-assignations" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" -dependencies = [ - "counter", - "libp2p-identity", - "logos-blockchain-core", - "logos-blockchain-utils", - "rand 0.8.5", - "serde", -] - [[package]] name = "logos-blockchain-system-sig-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-ctrlc", "async-trait", @@ -4501,14 +4785,15 @@ dependencies = [ [[package]] name = "logos-blockchain-tests" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", - "blst", + "cucumber", "futures", "futures-util", "hex", "logos-blockchain-api-service", + "logos-blockchain-blend-proofs", "logos-blockchain-blend-service", "logos-blockchain-chain-broadcast-service", "logos-blockchain-chain-leader-service", @@ -4518,22 +4803,13 @@ dependencies = [ "logos-blockchain-core", "logos-blockchain-cryptarchia-engine", "logos-blockchain-cryptarchia-sync", - "logos-blockchain-da-dispersal-service", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-da-sampling-service", - "logos-blockchain-da-verifier-service", - "logos-blockchain-executor", - "logos-blockchain-executor-http-client", "logos-blockchain-groth16", "logos-blockchain-http-api-common", "logos-blockchain-key-management-system-service", - "logos-blockchain-kzgrs-backend", "logos-blockchain-libp2p", "logos-blockchain-network-service", "logos-blockchain-node", "logos-blockchain-sdp-service", - "logos-blockchain-subnetworks-assignations", "logos-blockchain-time-service", "logos-blockchain-tracing", "logos-blockchain-tracing-service", @@ -4547,15 +4823,21 @@ dependencies = [ "serde_yaml", "serial_test", "tempfile", + "testing-framework-core 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "testing-framework-runner-compose 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "testing-framework-runner-local 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "testing-framework-workflows 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "thiserror 2.0.17", "time", "tokio", "tracing", + "tracing-subscriber 0.3.22", ] [[package]] name = "logos-blockchain-time-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "cfg_eval", @@ -4577,7 +4859,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "opentelemetry", "opentelemetry-http", @@ -4600,7 +4882,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "logos-blockchain-tracing", @@ -4614,7 +4896,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tx-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "futures", @@ -4636,7 +4918,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "blake2", @@ -4653,7 +4935,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utxotree" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "ark-ff 0.4.2", "logos-blockchain-core", @@ -4668,7 +4950,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "logos-blockchain-core", "logos-blockchain-key-management-system-keys", @@ -4682,7 +4964,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "async-trait", "bytes", @@ -4706,7 +4988,7 @@ dependencies = [ [[package]] name = "logos-blockchain-witness-generator" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "tempfile", ] @@ -4714,7 +4996,7 @@ dependencies = [ [[package]] name = "logos-blockchain-zksign" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=97b411ed0ce269e72a6253c8cd48eea41db5ab71#97b411ed0ce269e72a6253c8cd48eea41db5ab71" +source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4839,6 +5121,18 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "mmr" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "ark-ff 0.4.2", + "groth16", + "poseidon2", + "rpds", + "serde", +] + [[package]] name = "moka" version = "0.12.11" @@ -4895,6 +5189,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" dependencies = [ "core2", + "serde", "unsigned-varint 0.8.0", ] @@ -5114,6 +5409,717 @@ dependencies = [ "memchr", ] +[[package]] +name = "nom_locate" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b577e2d69827c4740cba2b52efaad1c4cc7c73042860b199710b3575c68438d" +dependencies = [ + "bytecount", + "memchr", + "nom 8.0.0", +] + +[[package]] +name = "nomos-api" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "broadcast-service", + "bytes", + "chain-service", + "futures", + "kzgrs-backend", + "nomos-core", + "nomos-da-dispersal", + "nomos-da-network-core", + "nomos-da-network-service", + "nomos-da-sampling", + "nomos-da-verifier", + "nomos-libp2p", + "nomos-network", + "nomos-sdp", + "nomos-storage", + "nomos-time", + "overwatch", + "serde", + "serde_json", + "subnetworks-assignations", + "tokio", + "tokio-stream", + "tracing", + "tx-service", + "utoipa", + "utoipa-swagger-ui", +] + +[[package]] +name = "nomos-blend" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "nomos-blend-crypto", + "nomos-blend-message", + "nomos-blend-network", + "nomos-blend-proofs", + "nomos-blend-scheduling", +] + +[[package]] +name = "nomos-blend-crypto" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "blake2", + "groth16", + "nomos-utils", + "poq", + "poseidon2", + "rs-merkle-tree", + "thiserror 1.0.69", +] + +[[package]] +name = "nomos-blend-message" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "blake2", + "derivative", + "groth16", + "itertools 0.14.0", + "key-management-system-keys", + "nomos-blend-crypto", + "nomos-blend-proofs", + "nomos-core", + "nomos-utils", + "serde", + "serde-big-array", + "serde_with", + "thiserror 1.0.69", + "tracing", + "zeroize", +] + +[[package]] +name = "nomos-blend-network" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "either", + "futures", + "futures-timer", + "key-management-system-keys", + "libp2p", + "nomos-blend-message", + "nomos-blend-proofs", + "nomos-blend-scheduling", + "nomos-core", + "nomos-libp2p", + "tracing", +] + +[[package]] +name = "nomos-blend-proofs" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "ed25519-dalek", + "generic-array 1.3.5", + "groth16", + "nomos-blend-crypto", + "num-bigint", + "poq", + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "nomos-blend-scheduling" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "derivative", + "fork_stream", + "futures", + "key-management-system-keys", + "multiaddr", + "nomos-blend-message", + "nomos-blend-proofs", + "nomos-core", + "nomos-utils", + "rand 0.8.5", + "serde", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "nomos-blend-service" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "broadcast-service", + "chain-service", + "cryptarchia-engine", + "fork_stream", + "futures", + "groth16", + "key-management-system-service", + "libp2p", + "libp2p-stream", + "nomos-blend", + "nomos-core", + "nomos-ledger", + "nomos-libp2p", + "nomos-network", + "nomos-sdp", + "nomos-time", + "nomos-utils", + "overwatch", + "poq", + "rand 0.8.5", + "serde", + "serde_with", + "services-utils", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "nomos-core" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "ark-ff 0.4.2", + "async-trait", + "bincode", + "blake2", + "bytes", + "const-hex", + "cryptarchia-engine", + "futures", + "generic-array 1.3.5", + "groth16", + "hex", + "key-management-system-keys", + "multiaddr", + "nom 8.0.0", + "nomos-blend-proofs", + "nomos-utils", + "num-bigint", + "pol", + "poseidon2", + "serde", + "strum", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "nomos-da-dispersal" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "broadcast-service", + "futures", + "key-management-system-keys", + "kzgrs-backend", + "nomos-core", + "nomos-da-network-core", + "nomos-da-network-service", + "nomos-tracing", + "nomos-utils", + "overwatch", + "serde", + "serde_with", + "services-utils", + "subnetworks-assignations", + "thiserror 2.0.17", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "nomos-da-messages" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "blake2", + "futures", + "kzgrs-backend", + "nomos-core", + "serde", + "tokio", +] + +[[package]] +name = "nomos-da-network-core" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "cached", + "fixed", + "futures", + "indexmap 2.12.1", + "kzgrs-backend", + "libp2p", + "libp2p-stream", + "log", + "nomos-core", + "nomos-da-messages", + "nomos-utils", + "rand 0.9.2", + "serde", + "serde_with", + "subnetworks-assignations", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", + "tracing-subscriber 0.3.22", +] + +[[package]] +name = "nomos-da-network-service" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "arc-swap", + "async-trait", + "bitvec", + "blake2", + "broadcast-service", + "common-http-client", + "futures", + "kzgrs-backend", + "libp2p", + "libp2p-identity", + "log", + "multiaddr", + "nomos-core", + "nomos-da-messages", + "nomos-da-network-core", + "nomos-libp2p", + "nomos-sdp", + "nomos-storage", + "nomos-tracing", + "nomos-utils", + "overwatch", + "rand 0.8.5", + "serde", + "services-utils", + "subnetworks-assignations", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "nomos-da-sampling" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "bytes", + "either", + "futures", + "hex", + "kzgrs-backend", + "libp2p-identity", + "nomos-core", + "nomos-da-network-core", + "nomos-da-network-service", + "nomos-storage", + "nomos-tracing", + "overwatch", + "rand 0.8.5", + "serde", + "services-utils", + "subnetworks-assignations", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", + "tx-service", +] + +[[package]] +name = "nomos-da-verifier" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "futures", + "kzgrs-backend", + "libp2p", + "nomos-core", + "nomos-da-network-core", + "nomos-da-network-service", + "nomos-storage", + "nomos-tracing", + "nomos-utils", + "overwatch", + "serde", + "serde_with", + "services-utils", + "subnetworks-assignations", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", + "tx-service", +] + +[[package]] +name = "nomos-executor" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "axum", + "broadcast-service", + "clap", + "color-eyre", + "futures", + "kzgrs-backend", + "nomos-api", + "nomos-core", + "nomos-da-dispersal", + "nomos-da-network-core", + "nomos-da-network-service", + "nomos-da-sampling", + "nomos-da-verifier", + "nomos-http-api-common", + "nomos-libp2p", + "nomos-network", + "nomos-node", + "nomos-sdp", + "nomos-storage", + "nomos-time", + "overwatch", + "serde", + "services-utils", + "subnetworks-assignations", + "tokio", + "tower 0.4.13", + "tower-http 0.5.2", + "tracing", + "tx-service", + "utoipa", + "utoipa-swagger-ui", +] + +[[package]] +name = "nomos-http-api-common" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "axum", + "governor", + "key-management-system-keys", + "nomos-core", + "serde", + "serde_json", + "serde_with", + "tower_governor", +] + +[[package]] +name = "nomos-ledger" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "cryptarchia-engine", + "groth16", + "key-management-system-keys", + "mmr", + "nomos-blend-crypto", + "nomos-blend-message", + "nomos-blend-proofs", + "nomos-core", + "nomos-utils", + "num-bigint", + "rand 0.8.5", + "rpds", + "serde", + "thiserror 1.0.69", + "tracing", + "utxotree", +] + +[[package]] +name = "nomos-libp2p" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "backon", + "blake2", + "cryptarchia-sync", + "default-net", + "either", + "futures", + "hex", + "igd-next 0.16.2", + "libp2p", + "multiaddr", + "natpmp", + "netdev", + "nomos-utils", + "num_enum", + "rand 0.8.5", + "serde", + "serde_with", + "thiserror 1.0.69", + "tokio", + "tracing", + "zerocopy", +] + +[[package]] +name = "nomos-network" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "cryptarchia-sync", + "futures", + "nomos-core", + "nomos-libp2p", + "overwatch", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "nomos-node" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "axum", + "broadcast-service", + "chain-leader", + "chain-network", + "chain-service", + "clap", + "color-eyre", + "cryptarchia-engine", + "futures", + "groth16", + "hex", + "http 1.4.0", + "key-management-system-service", + "kzgrs-backend", + "nomos-api", + "nomos-blend", + "nomos-blend-service", + "nomos-core", + "nomos-da-messages", + "nomos-da-network-core", + "nomos-da-network-service", + "nomos-da-sampling", + "nomos-da-verifier", + "nomos-http-api-common", + "nomos-ledger", + "nomos-libp2p", + "nomos-network", + "nomos-sdp", + "nomos-storage", + "nomos-system-sig", + "nomos-time", + "nomos-tracing", + "nomos-tracing-service", + "nomos-utils", + "nomos-wallet", + "num-bigint", + "overwatch", + "pol", + "poq", + "serde", + "serde_ignored", + "serde_json", + "serde_with", + "serde_yaml", + "services-utils", + "subnetworks-assignations", + "thiserror 2.0.17", + "time", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tower-http 0.5.2", + "tracing", + "tx-service", + "utoipa", + "utoipa-swagger-ui", +] + +[[package]] +name = "nomos-sdp" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "futures", + "key-management-system-keys", + "nomos-core", + "overwatch", + "serde", + "thiserror 2.0.17", + "tokio", + "tokio-stream", + "tracing", + "tx-service", +] + +[[package]] +name = "nomos-storage" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "bytes", + "cryptarchia-engine", + "futures", + "libp2p-identity", + "multiaddr", + "nomos-core", + "overwatch", + "rocksdb", + "serde", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "nomos-system-sig" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-ctrlc", + "async-trait", + "overwatch", + "tracing", +] + +[[package]] +name = "nomos-time" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "cfg_eval", + "cryptarchia-engine", + "futures", + "log", + "nomos-utils", + "overwatch", + "serde", + "serde_with", + "sntpc", + "thiserror 2.0.17", + "time", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "nomos-tracing" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "opentelemetry", + "opentelemetry-http", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions", + "opentelemetry_sdk", + "rand 0.8.5", + "reqwest", + "serde", + "tokio", + "tracing", + "tracing-appender", + "tracing-gelf", + "tracing-loki", + "tracing-opentelemetry", + "tracing-subscriber 0.3.22", + "url", +] + +[[package]] +name = "nomos-tracing-service" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "nomos-tracing", + "overwatch", + "serde", + "tracing", + "tracing-appender", + "tracing-subscriber 0.3.22", +] + +[[package]] +name = "nomos-utils" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "blake2", + "cipher", + "const-hex", + "humantime", + "overwatch", + "rand 0.8.5", + "serde", + "serde_with", + "time", +] + +[[package]] +name = "nomos-wallet" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "bytes", + "chain-service", + "futures", + "groth16", + "hex", + "key-management-system-service", + "nomos-core", + "nomos-ledger", + "nomos-storage", + "overwatch", + "serde", + "services-utils", + "thiserror 1.0.69", + "tokio", + "tracing", + "wallet", +] + [[package]] name = "nonempty" version = "0.7.0" @@ -5240,6 +6246,12 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "openssl" version = "0.10.75" @@ -5403,7 +6415,7 @@ name = "overwatch-derive" version = "0.1.0" source = "git+https://github.com/logos-co/Overwatch?rev=f5a9902#f5a99022f389d65adbd55e51f1e3f9eead62432a" dependencies = [ - "convert_case", + "convert_case 0.8.0", "proc-macro-error2", "proc-macro2", "quote", @@ -5460,6 +6472,33 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "peg" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f76678828272f177ac33b7e2ac2e3e73cc6c1cd1e3e387928aa69562fa51367" +dependencies = [ + "peg-macros", + "peg-runtime", +] + +[[package]] +name = "peg-macros" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "636d60acf97633e48d266d7415a9355d4389cea327a193f87df395d88cd2b14d" +dependencies = [ + "peg-runtime", + "proc-macro2", + "quote", +] + +[[package]] +name = "peg-runtime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555b1514d2d99d78150d3c799d4c357a3e2c2a8062cd108e93a06d9057629c5" + [[package]] name = "pem" version = "3.0.6" @@ -5605,6 +6644,22 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "pol" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "circuits-prover", + "circuits-utils", + "groth16", + "num-bigint", + "num-traits", + "serde", + "serde_json", + "thiserror 2.0.17", + "witness-generator", +] + [[package]] name = "polling" version = "3.11.0" @@ -5619,12 +6674,39 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "poq" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "circuits-prover", + "circuits-utils", + "groth16", + "num-bigint", + "pol", + "serde", + "serde_json", + "thiserror 2.0.17", + "witness-generator", +] + [[package]] name = "portable-atomic" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +[[package]] +name = "poseidon2" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "ark-bn254 0.4.0", + "ark-ff 0.4.2", + "jf-poseidon2", + "num-bigint", +] + [[package]] name = "potential_utf" version = "0.1.4" @@ -5833,6 +6915,15 @@ dependencies = [ "unsigned-varint 0.8.0", ] +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", +] + [[package]] name = "quinn" version = "0.11.9" @@ -6020,6 +7111,26 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "regex" version = "1.12.2" @@ -6187,11 +7298,11 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "testing-framework-core", - "testing-framework-runner-compose", + "testing-framework-core 0.1.0", + "testing-framework-runner-compose 0.1.0", "testing-framework-runner-k8s", - "testing-framework-runner-local", - "testing-framework-workflows", + "testing-framework-runner-local 0.1.0", + "testing-framework-workflows 0.1.0", "tokio", "tracing", "tracing-subscriber 0.3.22", @@ -6424,6 +7535,17 @@ version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" +[[package]] +name = "sealed" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f968c5ea23d555e670b449c1c5e7b2fc399fdaec1d304a17cd48e288abc107" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "sec1" version = "0.7.3" @@ -6637,6 +7759,21 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "services-utils" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "futures", + "log", + "overwatch", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + [[package]] name = "sha2" version = "0.10.9" @@ -6716,6 +7853,23 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "smart-default" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "smawk" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" + [[package]] name = "snap" version = "1.1.1" @@ -6783,6 +7937,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strip-ansi-escapes" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025" +dependencies = [ + "vte", +] + [[package]] name = "strsim" version = "0.11.1" @@ -6810,6 +7973,19 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "subnetworks-assignations" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "counter", + "libp2p-identity", + "nomos-core", + "nomos-utils", + "rand 0.8.5", + "serde", +] + [[package]] name = "subtle" version = "2.6.1" @@ -6858,6 +8034,39 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "synthez" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d8a928f38f1bc873f28e0d2ba8298ad65374a6ac2241dabd297271531a736cd" +dependencies = [ + "syn 2.0.111", + "synthez-codegen", + "synthez-core", +] + +[[package]] +name = "synthez-codegen" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb83b8df4238e11746984dfb3819b155cd270de0e25847f45abad56b3671047" +dependencies = [ + "syn 2.0.111", + "synthez-core", +] + +[[package]] +name = "synthez-core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "906fba967105d822e7c7ed60477b5e76116724d33de68a585681fb253fc30d5c" +dependencies = [ + "proc-macro2", + "quote", + "sealed", + "syn 2.0.111", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -6947,6 +8156,16 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "terminal_size" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" +dependencies = [ + "rustix", + "windows-sys 0.60.2", +] + [[package]] name = "testing-framework-config" version = "0.1.0" @@ -6961,19 +8180,12 @@ dependencies = [ "logos-blockchain-core", "logos-blockchain-cryptarchia-engine", "logos-blockchain-cryptarchia-sync", - "logos-blockchain-da-dispersal-service", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-da-sampling-service", - "logos-blockchain-da-verifier-service", - "logos-blockchain-executor", "logos-blockchain-groth16", "logos-blockchain-key-management-system-service", "logos-blockchain-ledger", "logos-blockchain-libp2p", "logos-blockchain-node", "logos-blockchain-sdp-service", - "logos-blockchain-subnetworks-assignations", "logos-blockchain-time-service", "logos-blockchain-tracing", "logos-blockchain-tracing-service", @@ -6982,7 +8194,49 @@ dependencies = [ "num-bigint", "rand 0.8.5", "serde", - "testing-framework-env", + "testing-framework-env 0.1.0", + "thiserror 2.0.17", + "time", + "tracing", +] + +[[package]] +name = "testing-framework-config" +version = "0.1.0" +source = "git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master#28685298ba8b8bb8e628ac4649fac150276aa5d0" +dependencies = [ + "blst", + "chain-leader", + "chain-network", + "chain-service", + "cryptarchia-engine", + "cryptarchia-sync", + "groth16", + "hex", + "key-management-system-service", + "nomos-api", + "nomos-blend-service", + "nomos-core", + "nomos-da-dispersal", + "nomos-da-network-core", + "nomos-da-network-service", + "nomos-da-sampling", + "nomos-da-verifier", + "nomos-executor", + "nomos-ledger", + "nomos-libp2p", + "nomos-node", + "nomos-sdp", + "nomos-time", + "nomos-tracing", + "nomos-tracing-service", + "nomos-utils", + "nomos-wallet", + "num-bigint", + "rand 0.8.5", + "serde", + "subnetworks-assignations", + "testing-framework-env 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", "thiserror 2.0.17", "time", "tracing", @@ -6999,9 +8253,6 @@ dependencies = [ "logos-blockchain-chain-service", "logos-blockchain-common-http-client", "logos-blockchain-core", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-executor", "logos-blockchain-groth16", "logos-blockchain-http-api-common", "logos-blockchain-key-management-system-service", @@ -7019,8 +8270,47 @@ dependencies = [ "serde_with", "serde_yaml", "tempfile", - "testing-framework-config", - "testing-framework-env", + "testing-framework-config 0.1.0", + "testing-framework-env 0.1.0", + "thiserror 2.0.17", + "tokio", + "tracing", +] + +[[package]] +name = "testing-framework-core" +version = "0.1.0" +source = "git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master#28685298ba8b8bb8e628ac4649fac150276aa5d0" +dependencies = [ + "anyhow", + "async-trait", + "chain-service", + "common-http-client", + "futures", + "groth16", + "hex", + "key-management-system-service", + "nomos-core", + "nomos-da-network-core", + "nomos-da-network-service", + "nomos-executor", + "nomos-http-api-common", + "nomos-libp2p", + "nomos-network", + "nomos-node", + "nomos-tracing", + "nomos-tracing-service", + "nomos-utils", + "prometheus-http-query", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "serde_with", + "serde_yaml", + "tempfile", + "testing-framework-config 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "testing-framework-env 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", "thiserror 2.0.17", "tokio", "tracing", @@ -7030,13 +8320,18 @@ dependencies = [ name = "testing-framework-env" version = "0.1.0" +[[package]] +name = "testing-framework-env" +version = "0.1.0" +source = "git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master#28685298ba8b8bb8e628ac4649fac150276aa5d0" + [[package]] name = "testing-framework-runner-compose" version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "cfgsync_tf", + "cfgsync_tf 0.1.0", "logos-blockchain-core", "logos-blockchain-groth16", "logos-blockchain-key-management-system-service", @@ -7049,9 +8344,33 @@ dependencies = [ "serde", "tempfile", "tera", - "testing-framework-config", - "testing-framework-core", - "testing-framework-env", + "testing-framework-config 0.1.0", + "testing-framework-core 0.1.0", + "testing-framework-env 0.1.0", + "thiserror 2.0.17", + "tokio", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "testing-framework-runner-compose" +version = "0.1.0" +source = "git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master#28685298ba8b8bb8e628ac4649fac150276aa5d0" +dependencies = [ + "anyhow", + "async-trait", + "cfgsync_tf 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "nomos-tracing", + "nomos-tracing-service", + "reqwest", + "serde", + "tempfile", + "tera", + "testing-framework-config 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "testing-framework-core 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "testing-framework-env 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", "thiserror 2.0.17", "tokio", "tracing", @@ -7073,9 +8392,9 @@ dependencies = [ "serde", "serde_yaml", "tempfile", - "testing-framework-config", - "testing-framework-core", - "testing-framework-env", + "testing-framework-config 0.1.0", + "testing-framework-core 0.1.0", + "testing-framework-env 0.1.0", "thiserror 2.0.17", "tokio", "tracing", @@ -7088,19 +8407,29 @@ name = "testing-framework-runner-local" version = "0.1.0" dependencies = [ "async-trait", - "logos-blockchain-executor", "logos-blockchain-libp2p", "logos-blockchain-network-service", "logos-blockchain-node", "logos-blockchain-utils", "rand 0.8.5", - "testing-framework-config", - "testing-framework-core", + "testing-framework-config 0.1.0", + "testing-framework-core 0.1.0", "thiserror 2.0.17", "tokio", "tracing", ] +[[package]] +name = "testing-framework-runner-local" +version = "0.1.0" +source = "git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master#28685298ba8b8bb8e628ac4649fac150276aa5d0" +dependencies = [ + "async-trait", + "testing-framework-core 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "thiserror 2.0.17", + "tracing", +] + [[package]] name = "testing-framework-workflows" version = "0.1.0" @@ -7111,13 +8440,44 @@ dependencies = [ "logos-blockchain-key-management-system-service", "rand 0.8.5", "reqwest", - "testing-framework-config", - "testing-framework-core", + "testing-framework-config 0.1.0", + "testing-framework-core 0.1.0", "thiserror 2.0.17", "tokio", "tracing", ] +[[package]] +name = "testing-framework-workflows" +version = "0.1.0" +source = "git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master#28685298ba8b8bb8e628ac4649fac150276aa5d0" +dependencies = [ + "async-trait", + "chain-service", + "executor-http-client", + "futures", + "key-management-system-service", + "nomos-core", + "rand 0.8.5", + "reqwest", + "testing-framework-config 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "testing-framework-core 0.1.0 (git+https://github.com/logos-blockchain/logos-blockchain-testing.git?branch=master)", + "thiserror 2.0.17", + "tokio", + "tracing", +] + +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -7688,6 +9048,48 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tx-service" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "async-trait", + "futures", + "nomos-core", + "nomos-network", + "nomos-storage", + "overwatch", + "rand 0.8.5", + "serde", + "serde_json", + "services-utils", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tracing", + "utoipa", +] + +[[package]] +name = "typed-builder" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31aa81521b70f94402501d848ccc0ecaa8f93c8eb6999eb9747e72287757ffda" +dependencies = [ + "typed-builder-macro", +] + +[[package]] +name = "typed-builder-macro" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076a02dc54dd46795c2e9c8282ed40bcfb1e22747e955de9389a1de28190fb26" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "typenum" version = "1.19.0" @@ -7730,12 +9132,30 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + [[package]] name = "unicode-segmentation" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -7778,6 +9198,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "utoipa" version = "4.2.3" @@ -7826,6 +9252,21 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2eebbbfe4093922c2b6734d7c679ebfebd704a0d7e56dfcb0d05818ce28977d" +[[package]] +name = "utxotree" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "ark-ff 0.4.2", + "groth16", + "nomos-core", + "num-bigint", + "poseidon2", + "rpds", + "serde", + "thiserror 1.0.69", +] + [[package]] name = "uuid" version = "1.19.0" @@ -7855,6 +9296,15 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vte" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" +dependencies = [ + "memchr", +] + [[package]] name = "walkdir" version = "2.5.0" @@ -7865,6 +9315,20 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "wallet" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "key-management-system-keys", + "nomos-core", + "nomos-ledger", + "num-bigint", + "rpds", + "thiserror 2.0.17", + "tracing", +] + [[package]] name = "want" version = "0.3.1" @@ -8404,6 +9868,15 @@ version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +[[package]] +name = "witness-generator" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "circuits-utils", + "tempfile", +] + [[package]] name = "writeable" version = "0.6.2" @@ -8604,3 +10077,19 @@ dependencies = [ "num_enum", "thiserror 1.0.69", ] + +[[package]] +name = "zksign" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=06e2738bb83851fa6ba94ef36d03a4b7be8e17a8#06e2738bb83851fa6ba94ef36d03a4b7be8e17a8" +dependencies = [ + "circuits-prover", + "circuits-utils", + "groth16", + "num-bigint", + "poseidon2", + "serde", + "serde_json", + "thiserror 2.0.17", + "witness-generator", +] diff --git a/Cargo.toml b/Cargo.toml index e7f3f17..992339d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,50 +40,42 @@ testing-framework-runner-local = { default-features = false, path = "testing-f testing-framework-workflows = { default-features = false, path = "testing-framework/workflows" } # Logos git dependencies (pinned to latest master) -broadcast-service = { package = "logos-blockchain-chain-broadcast-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } +broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } cfgsync_tf = { default-features = false, path = "testing-framework/tools/cfgsync_tf" } -chain-leader = { package = "logos-blockchain-chain-leader-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71", features = [ +chain-leader = { default-features = false, features = [ "pol-dev-mode", -] } -chain-network = { package = "logos-blockchain-chain-network-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -chain-service = { package = "logos-blockchain-chain-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -common-http-client = { package = "logos-blockchain-common-http-client", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -cryptarchia-engine = { package = "logos-blockchain-cryptarchia-engine", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -cryptarchia-sync = { package = "logos-blockchain-cryptarchia-sync", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -executor-http-client = { package = "logos-blockchain-executor-http-client", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -groth16 = { package = "logos-blockchain-groth16", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -key-management-system-service = { package = "logos-blockchain-key-management-system-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -kzgrs = { package = "logos-blockchain-kzgrs", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -kzgrs-backend = { package = "logos-blockchain-kzgrs-backend", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -logos-blockchain-executor = { package = "logos-blockchain-executor", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-api = { package = "logos-blockchain-api-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-blend-message = { package = "logos-blockchain-blend-message", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-blend-service = { package = "logos-blockchain-blend-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-cli = { package = "logos-blockchain-cli", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-core = { package = "logos-blockchain-core", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-da-dispersal = { package = "logos-blockchain-da-dispersal-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-da-network-core = { package = "logos-blockchain-da-network-core", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-da-network-service = { package = "logos-blockchain-da-network-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-da-sampling = { package = "logos-blockchain-da-sampling-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-da-verifier = { package = "logos-blockchain-da-verifier-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-http-api-common = { package = "logos-blockchain-http-api-common", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-ledger = { package = "logos-blockchain-ledger", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-libp2p = { package = "logos-blockchain-libp2p", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-network = { package = "logos-blockchain-network-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-node = { package = "logos-blockchain-node", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-sdp = { package = "logos-blockchain-sdp-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-time = { package = "logos-blockchain-time-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-tracing = { package = "logos-blockchain-tracing", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-tracing-service = { package = "logos-blockchain-tracing-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-utils = { package = "logos-blockchain-utils", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -nomos-wallet = { package = "logos-blockchain-wallet-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -poc = { package = "logos-blockchain-poc", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -pol = { package = "logos-blockchain-pol", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -subnetworks-assignations = { package = "logos-blockchain-subnetworks-assignations", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -tests = { package = "logos-blockchain-tests", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -tx-service = { package = "logos-blockchain-tx-service", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -wallet = { package = "logos-blockchain-wallet", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } -zksign = { package = "logos-blockchain-zksign", default-features = false, git = "https://github.com/logos-co/nomos-node.git", rev = "97b411ed0ce269e72a6253c8cd48eea41db5ab71" } +], git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +kzgrs = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-kzgrs", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +kzgrs-backend = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-kzgrs-backend", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-cli = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cli", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } # External crates async-trait = { default-features = false, version = "0.1" } @@ -94,7 +86,7 @@ overwatch = { default-features = false, git = "https://github.com/logos-c overwatch-derive = { default-features = false, git = "https://github.com/logos-co/Overwatch", rev = "f5a9902" } rand = { default-features = false, version = "0.8" } reqwest = { default-features = false, version = "0.12" } -serde = { default-features = true, version = "1.0", features = ["derive"] } +serde = { default-features = true, features = ["derive"], version = "1.0" } serde_json = { default-features = false, version = "1.0" } serde_with = { default-features = false, version = "3.14.0" } serde_yaml = { default-features = false, version = "0.9.33" } diff --git a/README.md b/README.md index 441fbac..387065b 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,6 @@ Key environment variables for customization: | `POL_PROOF_DEV_MODE=true` | **Required** — Disable expensive proof generation (set automatically by `scripts/run/run-examples.sh`) | (none) | | `NOMOS_TESTNET_IMAGE` | Docker image tag for compose/k8s | `logos-blockchain-testing:local` | | `NOMOS_DEMO_VALIDATORS` | Number of validator nodes | Varies by example | -| `NOMOS_DEMO_EXECUTORS` | Number of executor nodes | Varies by example | | `NOMOS_LOG_DIR` | Directory for persistent log files | (temporary) | | `NOMOS_LOG_LEVEL` | Logging verbosity | `info` | diff --git a/book/src/annotated-tree.md b/book/src/annotated-tree.md index 9909dc4..37f2f71 100644 --- a/book/src/annotated-tree.md +++ b/book/src/annotated-tree.md @@ -81,7 +81,7 @@ Helper utilities: **Compose runner** includes: - **Prometheus** at `http://localhost:9090` (metrics scraping) -- Node metrics exposed per validator/executor +- Node metrics exposed per validator - Access in expectations: `ctx.telemetry().prometheus().map(|p| p.base_url())` **Logging** controlled by: diff --git a/book/src/api-levels.md b/book/src/api-levels.md index f2fdc59..0459468 100644 --- a/book/src/api-levels.md +++ b/book/src/api-levels.md @@ -17,7 +17,7 @@ use std::time::Duration; use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; -let plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) +let plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(5) .transactions_with(|txs| txs.rate(5).users(3)) .da_with(|da| da.channel_rate(1).blob_rate(1).headroom_percent(20)) @@ -56,7 +56,7 @@ let da_workload = da::Workload::with_rate( da::Workload::default_headroom_percent(), ); -let plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) +let plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(5) .with_workload(tx_workload) .with_workload(da_workload) @@ -97,7 +97,7 @@ use testing_framework_workflows::{ScenarioBuilderExt, workloads::transaction}; let tx_workload = transaction::Workload::with_rate(5) .expect("transaction rate must be non-zero"); -let plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) +let plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(5) .with_workload(tx_workload) // direct instantiation .expect_consensus_liveness() // DSL diff --git a/book/src/architecture-overview.md b/book/src/architecture-overview.md index 6774173..2143a9e 100644 --- a/book/src/architecture-overview.md +++ b/book/src/architecture-overview.md @@ -142,7 +142,7 @@ The framework is consumed via **runnable example binaries** in `examples/src/bin **Recommended:** Use the convenience script: ```bash -scripts/run/run-examples.sh -t -v -e +scripts/run/run-examples.sh -t -v # mode: host, compose, or k8s ``` @@ -169,7 +169,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn scenario_plan() -> testing_framework_core::scenario::Scenario<()> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(50) .transactions_with(|txs| txs.rate(5).users(20)) .da_with(|da| da.channel_rate(1).blob_rate(2)) @@ -180,7 +180,7 @@ pub fn scenario_plan() -> testing_framework_core::scenario::Scenario<()> { ``` **Key API Points:** -- Topology uses `.topology_with(|t| { t.validators(N).executors(M) })` closure pattern +- Topology uses `.topology_with(|t| { t.validators(N) })` closure pattern - Workloads are configured via `_with` closures (`transactions_with`, `da_with`, `chaos_with`) - Chaos workloads require `.enable_node_control()` and a compatible runner @@ -197,14 +197,14 @@ Three deployer implementations: **Compose-specific features:** - Observability is external (set `NOMOS_METRICS_QUERY_URL` / `NOMOS_METRICS_OTLP_INGEST_URL` / `NOMOS_GRAFANA_URL` as needed) - Optional OTLP trace/metrics endpoints (`NOMOS_OTLP_ENDPOINT`, `NOMOS_OTLP_METRICS_ENDPOINT`) -- Node control for chaos testing (restart validators/executors) +- Node control for chaos testing (restart validators) ## Assets and Images ### Docker Image Built via `scripts/build/build_test_image.sh`: - Embeds KZG circuit parameters and binaries from `testing-framework/assets/stack/kzgrs_test_params/kzgrs_test_params` -- Includes runner scripts: `run_nomos_node.sh`, `run_nomos_executor.sh` +- Includes runner scripts: `run_nomos_node.sh` - Tagged as `NOMOS_TESTNET_IMAGE` (default: `logos-blockchain-testing:local`) - **Recommended:** Use prebuilt bundle via `scripts/build/build-bundle.sh --platform linux` and set `NOMOS_BINARIES_TAR` before building image @@ -217,7 +217,7 @@ KZG parameters required for DA workloads: ### Compose Stack Templates and configs in `testing-framework/runners/compose/assets/`: -- `docker-compose.yml.tera` — Stack template (validators, executors) +- `docker-compose.yml.tera` — Stack template (validators) - Cfgsync config: `testing-framework/assets/stack/cfgsync.yaml` - Monitoring assets (not deployed by the framework): `testing-framework/assets/stack/monitoring/` @@ -235,7 +235,7 @@ Templates and configs in `testing-framework/runners/compose/assets/`: - **Compose runner:** Default logs to container stdout/stderr (`docker logs`). To write per-node files, set `tracing_settings.logger: !File` in `testing-framework/assets/stack/cfgsync.yaml` (and mount a writable directory). - **K8s runner:** Logs to pod stdout/stderr (`kubectl logs`). To write per-node files, set `tracing_settings.logger: !File` in `testing-framework/assets/stack/cfgsync.yaml` (and mount a writable directory). -**File naming:** Per-node files use prefix `nomos-node-{index}` or `nomos-executor-{index}` (may include timestamps). +**File naming:** Per-node files use prefix `nomos-node-{index}` (may include timestamps). ## Observability diff --git a/book/src/authoring-scenarios.md b/book/src/authoring-scenarios.md index 5db7240..9dd16db 100644 --- a/book/src/authoring-scenarios.md +++ b/book/src/authoring-scenarios.md @@ -37,14 +37,12 @@ use testing_framework_workflows::ScenarioBuilderExt; let scenario = ScenarioBuilder::topology_with(|t| { t.network_star() // Star network (one gateway + nodes) .validators(3) // 3 validator nodes - .executors(1) // 1 executor node }) ``` **What goes in topology?** -- Node counts (validators, executors) +- Node counts (validators) - Network shape (`network_star()` is currently the only built-in layout) -- Role split (validators vs. executors) **What does NOT go in topology?** - Traffic rates (that's workloads) @@ -139,7 +137,6 @@ async fn hello_consensus_liveness() -> Result<()> { let mut scenario = ScenarioBuilder::topology_with(|t| { t.network_star() .validators(3) - .executors(1) }) .wallets(20) .transactions_with(|tx| tx.rate(10).users(5)) @@ -207,7 +204,7 @@ use testing_framework_workflows::ScenarioBuilderExt; #[tokio::test] async fn test_consensus_liveness() -> Result<()> { let mut scenario = ScenarioBuilder::topology_with(|t| { - t.network_star().validators(3).executors(1) + t.network_star().validators(3) }) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(30)) @@ -222,7 +219,7 @@ async fn test_consensus_liveness() -> Result<()> { #[tokio::test] async fn test_transaction_inclusion() -> Result<()> { let mut scenario = ScenarioBuilder::topology_with(|t| { - t.network_star().validators(2).executors(1) + t.network_star().validators(2) }) .wallets(10) .transactions_with(|tx| tx.rate(5).users(5)) @@ -248,13 +245,13 @@ use testing_framework_workflows::ScenarioBuilderExt; pub fn minimal_topology() -> ScenarioBuilder { ScenarioBuilder::topology_with(|t| { - t.network_star().validators(2).executors(1) + t.network_star().validators(2) }) } pub fn production_like_topology() -> ScenarioBuilder { ScenarioBuilder::topology_with(|t| { - t.network_star().validators(7).executors(3) + t.network_star().validators(7) }) } @@ -296,11 +293,10 @@ use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; -async fn test_liveness_with_topology(validators: usize, executors: usize) -> Result<()> { +async fn test_liveness_with_topology(validators: usize) -> Result<()> { let mut scenario = ScenarioBuilder::topology_with(|t| { t.network_star() .validators(validators) - .executors(executors) }) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(60)) @@ -335,9 +331,8 @@ async fn liveness_large() -> Result<()> { ### Topology **Do include:** -- Node counts (`.validators(3)`, `.executors(1)`) +- Node counts (`.validators(3)`) - Network shape (`.network_star()`) -- Role split (validators vs. executors) **Don't include:** - Traffic rates (workload concern) @@ -372,7 +367,7 @@ async fn liveness_large() -> Result<()> { ## Best Practices 1. **Keep scenarios focused**: One scenario = one behavior under test -2. **Start small**: 2-3 validators, 1 executor, 30-60 seconds +2. **Start small**: 2-3 validators, 30-60 seconds 3. **Use descriptive names**: `test_consensus_survives_validator_restart` not `test_1` 4. **Extract common patterns**: Shared topology builders, helper functions 5. **Document intent**: Add comments explaining what you're testing and why diff --git a/book/src/best-practices.md b/book/src/best-practices.md index 57dcd47..cc08dd8 100644 --- a/book/src/best-practices.md +++ b/book/src/best-practices.md @@ -38,7 +38,6 @@ pub fn standard_da_topology() -> GeneratedTopology { TopologyBuilder::new() .network_star() .validators(3) - .executors(2) .generate() } ``` @@ -200,7 +199,6 @@ docker stats # monitor resource usage **Minimal viable topology** - Consensus: 3 validators (minimum for Byzantine fault tolerance) -- DA: 2+ executors (test dispersal and sampling) - Network: Star topology (simplest for debugging) **Workload rate selection** diff --git a/book/src/chaos.md b/book/src/chaos.md index 171fe47..4ddcf59 100644 --- a/book/src/chaos.md +++ b/book/src/chaos.md @@ -9,7 +9,7 @@ recovery. The built-in restart workload lives in ## How it works - Requires `NodeControlCapability` (`enable_node_control()` in the scenario builder) and a runner that provides a `NodeControlHandle`. -- Randomly selects nodes (validators, executors) to restart based on your +- Randomly selects nodes (validators) to restart based on your include/exclude flags. - Respects min/max delay between restarts and a target cooldown to avoid flapping the same node too frequently. @@ -29,14 +29,13 @@ use testing_framework_workflows::{ScenarioBuilderExt, workloads::chaos::RandomRe pub fn random_restart_plan() -> testing_framework_core::scenario::Scenario< testing_framework_core::scenario::NodeControlCapability, > { - ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(1)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .enable_node_control() .with_workload(RandomRestartWorkload::new( Duration::from_secs(45), // min delay Duration::from_secs(75), // max delay Duration::from_secs(120), // target cooldown true, // include validators - true, // include executors )) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(150)) @@ -53,6 +52,6 @@ pub fn random_restart_plan() -> testing_framework_core::scenario::Scenario< ## Best practices - Keep delays/cooldowns realistic; avoid back-to-back restarts that would never happen in production. -- Limit chaos scope: toggle validators vs executors based on what you want to +- Limit chaos scope: toggle validators based on what you want to test. - Combine with observability: monitor metrics/logs to explain failures. diff --git a/book/src/ci-integration.md b/book/src/ci-integration.md index 8b8d5c2..8a94123 100644 --- a/book/src/ci-integration.md +++ b/book/src/ci-integration.md @@ -79,7 +79,6 @@ jobs: with: path: | ../nomos-node/target/release/nomos-node - ../nomos-node/target/release/nomos-executor key: ${{ runner.os }}-nomos-${{ hashFiles('../nomos-node/**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-nomos- diff --git a/book/src/dsl-cheat-sheet.md b/book/src/dsl-cheat-sheet.md index 4daec71..d40c3f3 100644 --- a/book/src/dsl-cheat-sheet.md +++ b/book/src/dsl-cheat-sheet.md @@ -23,7 +23,6 @@ pub fn topology() -> Builder<()> { ScenarioBuilder::topology_with(|t| { t.network_star() // Star topology (all connect to seed node) .validators(3) // Number of validator nodes - .executors(2) // Number of executor nodes }) } ``` @@ -35,7 +34,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn wallets_plan() -> testing_framework_core::scenario::Scenario<()> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .wallets(50) // Seed 50 funded wallet accounts .build() } @@ -48,7 +47,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn transactions_plan() -> testing_framework_core::scenario::Scenario<()> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .wallets(50) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block @@ -65,7 +64,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn da_plan() -> testing_framework_core::scenario::Scenario<()> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(1)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .wallets(50) .da_with(|da| { da.channel_rate(1) // number of DA channels to run @@ -85,7 +84,7 @@ use testing_framework_core::scenario::{NodeControlCapability, ScenarioBuilder}; use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; pub fn chaos_plan() -> testing_framework_core::scenario::Scenario { - ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .enable_node_control() // Enable node control capability .chaos_with(|c| { c.restart() // Random restart chaos @@ -105,7 +104,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn expectations_plan() -> testing_framework_core::scenario::Scenario<()> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .expect_consensus_liveness() // Assert blocks are produced continuously .build() } @@ -120,7 +119,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn run_duration_plan() -> testing_framework_core::scenario::Scenario<()> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .with_run_duration(Duration::from_secs(120)) // Run for 120 seconds .build() } @@ -133,7 +132,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn build_plan() -> testing_framework_core::scenario::Scenario<()> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)).build() // Construct the final Scenario + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)).build() // Construct the final Scenario } ``` @@ -165,7 +164,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn execution() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .expect_consensus_liveness() .build(); @@ -188,7 +187,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn run_test() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(50) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block diff --git a/book/src/environment-variables.md b/book/src/environment-variables.md index c332115..0b52b9d 100644 --- a/book/src/environment-variables.md +++ b/book/src/environment-variables.md @@ -32,21 +32,18 @@ Control which runner to use and the test topology: | Variable | Default | Effect | |----------|---------|--------| | `NOMOS_DEMO_VALIDATORS` | 1 | Number of validators (all runners) | -| `NOMOS_DEMO_EXECUTORS` | 1 | Number of executors (all runners) | | `NOMOS_DEMO_RUN_SECS` | 60 | Run duration in seconds (all runners) | | `LOCAL_DEMO_VALIDATORS` | — | Legacy: Number of validators (host runner only) | -| `LOCAL_DEMO_EXECUTORS` | — | Legacy: Number of executors (host runner only) | | `LOCAL_DEMO_RUN_SECS` | — | Legacy: Run duration (host runner only) | -| `COMPOSE_NODE_PAIRS` | — | Compose-specific topology format: "validators×executors" (e.g., `3x2`) | +| `COMPOSE_NODE_PAIRS` | — | Compose-specific topology format: "validators" (e.g., `3`) | **Example:** ```bash -# Run with 5 validators, 2 executors, for 120 seconds +# Run with 5 validators, for 120 seconds NOMOS_DEMO_VALIDATORS=5 \ -NOMOS_DEMO_EXECUTORS=2 \ NOMOS_DEMO_RUN_SECS=120 \ -scripts/run/run-examples.sh -t 120 -v 5 -e 2 host +scripts/run/run-examples.sh -t 120 -v 5 host ``` --- @@ -58,14 +55,12 @@ Required for host runner when not using helper scripts: | Variable | Required | Default | Effect | |----------|----------|---------|--------| | `NOMOS_NODE_BIN` | Yes (host) | — | Path to `nomos-node` binary | -| `NOMOS_EXECUTOR_BIN` | Yes (host) | — | Path to `nomos-executor` binary | | `NOMOS_NODE_PATH` | No | — | Path to nomos-node git checkout (dev workflow) | **Example:** ```bash export NOMOS_NODE_BIN=/path/to/nomos-node/target/release/nomos-node -export NOMOS_EXECUTOR_BIN=/path/to/nomos-node/target/release/nomos-executor ``` --- @@ -309,7 +304,7 @@ scripts/run/run-examples.sh -t 120 -v 5 -e 2 compose ## Node Configuration (Advanced) -Node-level configuration passed through to nomos-node/nomos-executor: +Node-level configuration passed through to nomos-node: | Variable | Default | Effect | |----------|---------|--------| diff --git a/book/src/examples-advanced.md b/book/src/examples-advanced.md index c08e862..adae6f9 100644 --- a/book/src/examples-advanced.md +++ b/book/src/examples-advanced.md @@ -13,9 +13,9 @@ Realistic advanced scenarios demonstrating framework capabilities for production | Example | Topology | Workloads | Deployer | Key Feature | |---------|----------|-----------|----------|-------------| -| Load Progression | 3 validators + 2 executors | Increasing tx rate | Compose | Dynamic load testing | -| Sustained Load | 4 validators + 2 executors | High tx + DA rate | Compose | Stress testing | -| Aggressive Chaos | 4 validators + 2 executors | Frequent restarts + traffic | Compose | Resilience validation | +| Load Progression | 3 validators | Increasing tx rate | Compose | Dynamic load testing | +| Sustained Load | 4 validators | High tx + DA rate | Compose | Stress testing | +| Aggressive Chaos | 4 validators | Frequent restarts + traffic | Compose | Resilience validation | ## Load Progression Test @@ -34,7 +34,7 @@ pub async fn load_progression_test() -> Result<()> { println!("Testing with rate: {}", rate); let mut plan = - ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(50) .transactions_with(|txs| txs.rate(rate).users(20)) .expect_consensus_liveness() @@ -65,7 +65,7 @@ use testing_framework_runner_compose::ComposeDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn sustained_load_test() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4)) .wallets(100) .transactions_with(|txs| txs.rate(15).users(50)) .da_with(|da| da.channel_rate(2).blob_rate(3)) @@ -96,7 +96,7 @@ use testing_framework_runner_compose::ComposeDeployer; use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; pub async fn aggressive_chaos_test() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4)) .enable_node_control() .wallets(50) .transactions_with(|txs| txs.rate(10).users(20)) diff --git a/book/src/examples.md b/book/src/examples.md index c029463..3fce283 100644 --- a/book/src/examples.md +++ b/book/src/examples.md @@ -13,7 +13,7 @@ and expectations. - `compose_runner.rs` — Docker Compose (requires image built) - `k8s_runner.rs` — Kubernetes (requires cluster access and image loaded) -**Recommended:** Use `scripts/run/run-examples.sh -t -v -e ` where mode is `host`, `compose`, or `k8s`. +**Recommended:** Use `scripts/run/run-examples.sh -t -v ` where mode is `host`, `compose`, or `k8s`. **Alternative:** Direct cargo run: `POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin ` @@ -34,7 +34,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn simple_consensus() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(0)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(30)) .build(); @@ -62,7 +62,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn transaction_workload() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(0)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .wallets(20) .transactions_with(|txs| txs.rate(5).users(10)) .expect_consensus_liveness() @@ -92,7 +92,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn da_and_transactions() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(30) .transactions_with(|txs| txs.rate(5).users(15)) .da_with(|da| da.channel_rate(2).blob_rate(2)) @@ -123,7 +123,7 @@ use testing_framework_runner_compose::ComposeDeployer; use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; pub async fn chaos_resilience() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4)) .enable_node_control() .wallets(20) .transactions_with(|txs| txs.rate(3).users(10)) diff --git a/book/src/extending.md b/book/src/extending.md index 087fb14..0014fe9 100644 --- a/book/src/extending.md +++ b/book/src/extending.md @@ -201,7 +201,7 @@ impl Deployer<()> for MyDeployer { async fn deploy(&self, scenario: &Scenario<()>) -> Result { // 1. Launch nodes using scenario.topology() // 2. Wait for readiness (e.g., consensus info endpoint responds) - // 3. Build NodeClients for validators/executors + // 3. Build NodeClients for validators // 4. Spawn a block feed for expectations (optional but recommended) // 5. Create NodeControlHandle if you support restarts (optional) // 6. Return a Runner wrapping RunContext + CleanupGuard @@ -345,7 +345,7 @@ impl MyWorkloadDsl for ScenarioBuilder { Users can then call: ```rust,ignore -ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(1)) +ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .my_workload_with(|w| { w.target_rate(10) .some_option(true) diff --git a/book/src/glossary.md b/book/src/glossary.md index 39152d4..de2076c 100644 --- a/book/src/glossary.md +++ b/book/src/glossary.md @@ -2,11 +2,6 @@ - **Validator**: node role responsible for participating in consensus and block production. -- **Executor**: a validator node with the DA dispersal service enabled. Executors - can submit transactions and disperse blob data to the DA network, in addition - to performing all validator functions. -- **DA (Data Availability)**: subsystem ensuring blobs or channel data are - published and retrievable for validation. - **Deployer**: component that provisions infrastructure (spawns processes, creates containers, or launches pods), waits for readiness, and returns a Runner. Examples: LocalDeployer, ComposeDeployer, K8sDeployer. diff --git a/book/src/internal-crate-reference.md b/book/src/internal-crate-reference.md index 51a12bf..8063488 100644 --- a/book/src/internal-crate-reference.md +++ b/book/src/internal-crate-reference.md @@ -93,7 +93,7 @@ impl YourWorkloadDslExt for testing_framework_core::scenario::Builder YourExpectationDslExt for testing_framework_core::scenario::Builder all-validators.log -kubectl logs -l nomos/logical-role=executor --tail=1000 > all-executors.log # Specific pods kubectl logs nomos-validator-0 > validator-0.log -kubectl logs nomos-executor-1 > executor-1.log ``` **K8s debugging variables:** diff --git a/book/src/node-control.md b/book/src/node-control.md index 19ec5ba..c54d822 100644 --- a/book/src/node-control.md +++ b/book/src/node-control.md @@ -325,7 +325,6 @@ resilience testing: **Supported:** - Restart validators (`restart_validator`) -- Restart executors (`restart_executor`) - Random restart workload via `.chaos().restart()` **Not Yet Supported:** @@ -377,7 +376,6 @@ use testing_framework_core::scenario::DynError; #[async_trait] pub trait NodeControlHandle: Send + Sync { async fn restart_validator(&self, index: usize) -> Result<(), DynError>; - async fn restart_executor(&self, index: usize) -> Result<(), DynError>; } ``` diff --git a/book/src/operations-overview.md b/book/src/operations-overview.md index ddcacb4..70b301a 100644 --- a/book/src/operations-overview.md +++ b/book/src/operations-overview.md @@ -13,7 +13,7 @@ Operational readiness focuses on prerequisites, environment fit, and clear signa **Prerequisites:** - `versions.env` file at repository root (required by helper scripts) -- Node binaries (`nomos-node`, `nomos-executor`) available or built on demand +- Node binaries (`nomos-node`) available or built on demand - Platform requirements met (Docker for compose, cluster access for k8s) - Circuit assets for DA workloads diff --git a/book/src/prerequisites.md b/book/src/prerequisites.md index 29f7140..3049c35 100644 --- a/book/src/prerequisites.md +++ b/book/src/prerequisites.md @@ -38,7 +38,7 @@ This file is required and should define: ## Node Binaries -Scenarios need compiled `nomos-node` and `nomos-executor` binaries. +Scenarios need compiled `nomos-node` binaries. ### Option 1: Use Helper Scripts (Recommended) @@ -49,7 +49,7 @@ scripts/run/run-examples.sh -t 60 -v 3 -e 1 host This automatically: - Clones/updates nomos-node checkout - Builds required binaries -- Sets `NOMOS_NODE_BIN` / `NOMOS_EXECUTOR_BIN` +- Sets `NOMOS_NODE_BIN` ### Option 2: Manual Build @@ -57,11 +57,10 @@ If you have a sibling `nomos-node` checkout: ```bash cd ../nomos-node -cargo build --release --bin nomos-node --bin nomos-executor +cargo build --release --bin nomos-node # Set environment variables export NOMOS_NODE_BIN=$PWD/target/release/nomos-node -export NOMOS_EXECUTOR_BIN=$PWD/target/release/nomos-executor # Return to testing framework cd ../nomos-testing @@ -82,7 +81,6 @@ CI workflows use prebuilt artifacts: run: | tar -xzf .tmp/nomos-binaries-linux-*.tar.gz -C .tmp/ export NOMOS_NODE_BIN=$PWD/.tmp/nomos-node - export NOMOS_EXECUTOR_BIN=$PWD/.tmp/nomos-executor ``` ## Circuit Assets (KZG Parameters) @@ -253,7 +251,6 @@ docker images | grep logos-blockchain-testing # 6. For host runner: verify node binaries (if not using scripts) $NOMOS_NODE_BIN --version -$NOMOS_EXECUTOR_BIN --version ``` ## Recommended: Use Helper Scripts diff --git a/book/src/project-context-primer.md b/book/src/project-context-primer.md index ef5b3f3..9f91aec 100644 --- a/book/src/project-context-primer.md +++ b/book/src/project-context-primer.md @@ -13,7 +13,7 @@ The Logos Testing Framework enables you to test consensus, data availability, an **Everything in this framework is a Scenario.** A Scenario is a controlled experiment over time, composed of: -- **Topology** — The cluster shape (validators, executors, network layout) +- **Topology** — The cluster shape (validators, network layout) - **Workloads** — Traffic and conditions that exercise the system (transactions, DA, chaos) - **Expectations** — Success criteria verified after execution (liveness, inclusion, recovery) - **Duration** — The time window for the experiment @@ -37,7 +37,7 @@ flowchart LR ``` 1. **Define Scenario** — Describe your test: topology, workloads, and success criteria -2. **Deploy Topology** — Launch validators and executors using host, compose, or k8s runners +2. **Deploy Topology** — Launch validators using host, compose, or k8s runners 3. **Run Workloads** — Drive transactions, DA traffic, and chaos operations 4. **Check Expectations** — Verify consensus liveness, inclusion, and system health @@ -82,7 +82,6 @@ async fn main() -> anyhow::Result<()> { let mut scenario = ScenarioBuilder::topology_with(|t| { t.network_star() .validators(3) - .executors(1) }) .transactions_with(|tx| tx.rate(10).users(5)) .expect_consensus_liveness() @@ -123,11 +122,9 @@ Check the **[Developer Reference](part-iii.md)** to implement custom workloads, ## Project Context -**Logos** is a modular blockchain protocol composed of validators, executors, and a data-availability (DA) subsystem: +**Logos** is a modular blockchain protocol composed of validators, and a data-availability (DA) subsystem: - **Validators** participate in consensus and produce blocks -- **Executors** are validators with the DA dispersal service enabled. They perform all validator functions plus submit blob data to the DA network -- **Data Availability (DA)** ensures that blob data submitted via channel operations in transactions is published and retrievable by the network These roles interact tightly, which is why meaningful testing must be performed in multi-node environments that include real networking, timing, and DA interaction. diff --git a/book/src/quickstart.md b/book/src/quickstart.md index be75ab0..163327b 100644 --- a/book/src/quickstart.md +++ b/book/src/quickstart.md @@ -50,14 +50,12 @@ The framework ships with runnable example binaries in `examples/src/bin/`. scripts/run/run-examples.sh -t 60 -v 1 -e 1 host ``` -This handles circuit setup, binary building, and runs a complete scenario: 1 validator + 1 executor, mixed transaction + DA workload (5 tx/block + 1 channel + 1 blob), 60s duration. - -**Note:** The DA workload attaches `DaWorkloadExpectation`, and channel/blob publishing is slower than tx submission. If you see `DaWorkloadExpectation` failures, rerun with a longer duration (e.g., `-t 120`), especially on CI or slower machines. +This handles circuit setup, binary building, and runs a complete scenario: 1 validator, mixed transaction + DA workload (5 tx/block + 1 channel + 1 blob), 60s duration. **Alternative:** Direct cargo run (requires manual setup): ```bash -# Requires circuits in place and NOMOS_NODE_BIN/NOMOS_EXECUTOR_BIN set +# Requires circuits in place and NOMOS_NODE_BIN set POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner ``` @@ -72,8 +70,8 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn run_local_demo() -> Result<()> { - // Define the scenario (1 validator + 1 executor, tx + DA workload) - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(1)) + // Define the scenario (1 validator, tx + DA workload) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .wallets(1_000) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block @@ -121,7 +119,6 @@ pub fn step_1_topology() -> testing_framework_core::scenario::Builder<()> { ScenarioBuilder::topology_with(|t| { t.network_star() // Star topology: all nodes connect to seed .validators(1) // 1 validator node - .executors(1) // 1 executor node (validator + DA dispersal) }) } ``` @@ -216,7 +213,7 @@ pub async fn step_6_deploy_and_execute() -> Result<()> { **With run-examples.sh** (recommended): ```bash -# Scale up to 3 validators + 2 executors, run for 2 minutes +# Scale up to 3 validators, run for 2 minutes scripts/run/run-examples.sh -t 120 -v 3 -e 2 host ``` @@ -225,7 +222,6 @@ scripts/run/run-examples.sh -t 120 -v 3 -e 2 host ```bash # Uses NOMOS_DEMO_* env vars (or legacy *_DEMO_* vars) NOMOS_DEMO_VALIDATORS=3 \ -NOMOS_DEMO_EXECUTORS=2 \ NOMOS_DEMO_RUN_SECS=120 \ POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner diff --git a/book/src/running-examples.md b/book/src/running-examples.md index 5e7d979..0f6cdb6 100644 --- a/book/src/running-examples.md +++ b/book/src/running-examples.md @@ -8,19 +8,18 @@ Use `scripts/run/run-examples.sh` for all modes—it handles all setup automatic ```bash # Host mode (local processes) -scripts/run/run-examples.sh -t 60 -v 3 -e 1 host +scripts/run/run-examples.sh -t 60 -v 3 host # Compose mode (Docker Compose) -scripts/run/run-examples.sh -t 60 -v 3 -e 1 compose +scripts/run/run-examples.sh -t 60 -v 3 compose # K8s mode (Kubernetes) -scripts/run/run-examples.sh -t 60 -v 3 -e 1 k8s +scripts/run/run-examples.sh -t 60 -v 3 k8s ``` **Parameters:** - `-t 60` — Run duration in seconds - `-v 3` — Number of validators -- `-e 1` — Number of executors - `host|compose|k8s` — Deployment mode This script handles: @@ -102,7 +101,6 @@ For manual control, run the `local_runner` binary directly: ```bash POL_PROOF_DEV_MODE=true \ NOMOS_NODE_BIN=/path/to/nomos-node \ -NOMOS_EXECUTOR_BIN=/path/to/nomos-executor \ cargo run -p runner-examples --bin local_runner ``` @@ -111,10 +109,8 @@ cargo run -p runner-examples --bin local_runner | Variable | Default | Effect | |----------|---------|--------| | `NOMOS_DEMO_VALIDATORS` | 1 | Number of validators (legacy: `LOCAL_DEMO_VALIDATORS`) | -| `NOMOS_DEMO_EXECUTORS` | 1 | Number of executors (legacy: `LOCAL_DEMO_EXECUTORS`) | | `NOMOS_DEMO_RUN_SECS` | 60 | Run duration in seconds (legacy: `LOCAL_DEMO_RUN_SECS`) | | `NOMOS_NODE_BIN` | — | Path to nomos-node binary (required) | -| `NOMOS_EXECUTOR_BIN` | — | Path to nomos-executor binary (required) | | `NOMOS_LOG_DIR` | None | Directory for per-node log files | | `NOMOS_TESTS_KEEP_LOGS` | 0 | Keep per-run temporary directories (useful for debugging/CI) | | `NOMOS_TESTS_TRACING` | false | Enable debug tracing preset | @@ -176,9 +172,8 @@ cargo run -p runner-examples --bin compose_runner | `NOMOS_TESTNET_IMAGE` | — | Image tag (required, must match built image) | | `POL_PROOF_DEV_MODE` | — | **REQUIRED**: Set to `true` for all runners | | `NOMOS_DEMO_VALIDATORS` | 1 | Number of validators | -| `NOMOS_DEMO_EXECUTORS` | 1 | Number of executors | | `NOMOS_DEMO_RUN_SECS` | 60 | Run duration in seconds | -| `COMPOSE_NODE_PAIRS` | — | Alternative topology format: "validators×executors" (e.g., `3x2`) | +| `COMPOSE_NODE_PAIRS` | — | Alternative topology format: "validators" (e.g., `3`) | | `NOMOS_METRICS_QUERY_URL` | None | Prometheus-compatible base URL for runner to query | | `NOMOS_METRICS_OTLP_INGEST_URL` | None | Full OTLP HTTP ingest URL for node metrics export | | `NOMOS_GRAFANA_URL` | None | Grafana base URL for printing/logging | @@ -249,7 +244,6 @@ cargo run -p runner-examples --bin k8s_runner | `NOMOS_TESTNET_IMAGE` | — | Image tag (required) | | `POL_PROOF_DEV_MODE` | — | **REQUIRED**: Set to `true` for all runners | | `NOMOS_DEMO_VALIDATORS` | 1 | Number of validators | -| `NOMOS_DEMO_EXECUTORS` | 1 | Number of executors | | `NOMOS_DEMO_RUN_SECS` | 60 | Run duration in seconds | | `NOMOS_METRICS_QUERY_URL` | None | Prometheus-compatible base URL for runner to query (PromQL) | | `NOMOS_METRICS_OTLP_INGEST_URL` | None | Full OTLP HTTP ingest URL for node metrics export | diff --git a/book/src/running-scenarios.md b/book/src/running-scenarios.md index 87f948e..b6a6625 100644 --- a/book/src/running-scenarios.md +++ b/book/src/running-scenarios.md @@ -37,7 +37,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; async fn run_once() -> anyhow::Result<()> { - let mut scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(1)) + let mut scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(20) .transactions_with(|tx| tx.rate(1).users(5)) .expect_consensus_liveness() diff --git a/book/src/scenario-lifecycle.md b/book/src/scenario-lifecycle.md index 7550ad7..5cb202e 100644 --- a/book/src/scenario-lifecycle.md +++ b/book/src/scenario-lifecycle.md @@ -61,7 +61,7 @@ flowchart TB Declare a topology, attach workloads and expectations, and set the run window. The plan is the single source of truth for what will happen. **Key actions:** -- Define cluster shape (validators, executors, network topology) +- Define cluster shape (validators, network topology) - Configure workloads (transaction rate, DA traffic, chaos patterns) - Attach expectations (liveness, inclusion, custom checks) - Set timing parameters (run duration, cooldown period) @@ -74,7 +74,7 @@ Hand the plan to a deployer. It provisions the environment on the chosen backend **Key actions:** - Provision infrastructure (processes, containers, or pods) -- Launch validator and executor nodes +- Launch validator nodes - Wait for readiness probes (HTTP endpoints respond) - Establish node connectivity and metrics endpoints - Spawn BlockFeed for real-time block observation diff --git a/book/src/testing-philosophy.md b/book/src/testing-philosophy.md index ea9d590..e87e2b8 100644 --- a/book/src/testing-philosophy.md +++ b/book/src/testing-philosophy.md @@ -14,7 +14,7 @@ use testing_framework_workflows::ScenarioBuilderExt; pub fn declarative_over_imperative() { // Good: declarative - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(1)) + let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block }) @@ -22,7 +22,7 @@ pub fn declarative_over_imperative() { .build(); // Bad: imperative (framework doesn't work this way) - // spawn_validator(); spawn_executor(); + // spawn_validator(); // loop { submit_tx(); check_block(); } } ``` @@ -47,7 +47,7 @@ use testing_framework_workflows::ScenarioBuilderExt; pub fn protocol_time_not_wall_time() { // Good: protocol-oriented thinking - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(1)) + let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block }) @@ -84,7 +84,7 @@ use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; pub fn determinism_first() { // Separate: functional test (deterministic) - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(1)) + let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block }) @@ -93,7 +93,7 @@ pub fn determinism_first() { // Separate: chaos test (introduces randomness) let _chaos_plan = - ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .enable_node_control() .chaos_with(|c| { c.restart() diff --git a/book/src/topology-chaos.md b/book/src/topology-chaos.md index f7d05ca..504d603 100644 --- a/book/src/topology-chaos.md +++ b/book/src/topology-chaos.md @@ -30,7 +30,7 @@ See also: [RunContext: BlockFeed & Node Control](node-control.md) for the curren ## Guidance - Keep chaos realistic: avoid flapping or patterns you wouldn't operate in prod. -- Scope chaos: choose validators vs executors intentionally; don't restart all +- Scope chaos: choose validators intentionally; don't restart all nodes at once unless you're testing full outages. - Combine chaos with observability: capture block feed/metrics and API health so failures are diagnosable. diff --git a/book/src/troubleshooting.md b/book/src/troubleshooting.md index db396cd..13929c9 100644 --- a/book/src/troubleshooting.md +++ b/book/src/troubleshooting.md @@ -138,9 +138,9 @@ ls -lh testing-framework/assets/stack/kzgrs_test_params/kzgrs_test_params ### 4. Node Binaries Not Found **Symptoms:** -- Error about missing `nomos-node` or `nomos-executor` binary +- Error about missing `nomos-node` binary - "file not found" or "no such file or directory" -- Environment variables `NOMOS_NODE_BIN` / `NOMOS_EXECUTOR_BIN` not set +- Environment variables `NOMOS_NODE_BIN` not set **What you'll see:** @@ -151,7 +151,7 @@ Error: Os { code: 2, kind: NotFound, message: "No such file or directory" } thread 'main' panicked at 'failed to spawn nomos-node process' ``` -**Root Cause:** The local runner needs compiled `nomos-node` and `nomos-executor` binaries, but doesn't know where they are. +**Root Cause:** The local runner needs compiled `nomos-node` binaries, but doesn't know where they are. **Fix (recommended):** @@ -165,11 +165,10 @@ scripts/run/run-examples.sh -t 60 -v 1 -e 1 host ```bash # Build binaries first cd ../nomos-node # or wherever your nomos-node checkout is -cargo build --release --bin nomos-node --bin nomos-executor +cargo build --release --bin nomos-node # Set environment variables export NOMOS_NODE_BIN=$PWD/target/release/nomos-node -export NOMOS_EXECUTOR_BIN=$PWD/target/release/nomos-executor # Return to testing framework cd ../nomos-testing @@ -289,7 +288,6 @@ netstat -ano | findstr :18080 # Windows # Kill orphaned nomos processes pkill nomos-node -pkill nomos-executor # For compose: ensure containers are stopped docker compose down @@ -337,7 +335,7 @@ thread 'main' panicked at 'workload init failed: insufficient wallets' use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; -let scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(1)) +let scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(20) // ← Increase wallet count .transactions_with(|tx| { tx.users(10) // ← Must be ≤ wallets(20) @@ -459,7 +457,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; // Increase run duration to allow more blocks. -let scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(1)) +let scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(120)) // ← Give more time .build(); @@ -484,7 +482,7 @@ When a test fails, check these in order: 1. **`POL_PROOF_DEV_MODE=true` is set** (REQUIRED for all runners) 2. **`versions.env` exists at repo root** 3. **KZG circuit assets present** (for DA workloads): `testing-framework/assets/stack/kzgrs_test_params/kzgrs_test_params` -4. **Node binaries available** (`NOMOS_NODE_BIN` / `NOMOS_EXECUTOR_BIN` set, or using `run-examples.sh`) +4. **Node binaries available** (`NOMOS_NODE_BIN` set, or using `run-examples.sh`) 5. **Docker daemon running** (for compose/k8s) 6. **Docker image built** (`logos-blockchain-testing:local` exists for compose/k8s) 7. **No port conflicts** (`lsof -i :18080`, kill orphaned processes) @@ -508,7 +506,7 @@ When a test fails, check these in order: **Important Notes:** - **Host runner** (local processes): Per-run temporary directories are created under the current working directory and removed after the run unless `NOMOS_TESTS_KEEP_LOGS=1`. To write per-node log files to a stable location, set `NOMOS_LOG_DIR=/path/to/logs`. - **Compose/K8s**: Node log destination is controlled by `testing-framework/assets/stack/cfgsync.yaml` (`tracing_settings.logger`). By default, rely on `docker logs` or `kubectl logs`. -- **File naming**: Log files use prefix `nomos-node-{index}*` or `nomos-executor-{index}*` with timestamps, e.g., `nomos-node-0.2024-12-01T10-30-45.log` (NOT just `.log` suffix). +- **File naming**: Log files use prefix `nomos-node-{index}*` with timestamps, e.g., `nomos-node-0.2024-12-01T10-30-45.log` (NOT just `.log` suffix). - **Container names**: Compose containers include project UUID, e.g., `nomos-compose--validator-0-1` where `` is randomly generated per run ### Accessing Node Logs by Runner @@ -566,7 +564,7 @@ docker exec -it /bin/sh docker logs > debug.log ``` -**Note:** Container names follow the pattern `nomos-compose-{uuid}-validator-{index}-1` or `nomos-compose-{uuid}-executor-{index}-1`, where `{uuid}` is randomly generated per run. +**Note:** Container names follow the pattern `nomos-compose-{uuid}-validator-{index}-1`, where `{uuid}` is randomly generated per run. #### K8s Runner @@ -581,9 +579,6 @@ kubectl config view --minify | grep namespace # All validator pods (add -n if not using default) kubectl logs -l nomos/logical-role=validator -f -# All executor pods -kubectl logs -l nomos/logical-role=executor -f - # Specific pod by name (find exact name first) kubectl get pods -l nomos/logical-role=validator # Find the exact pod name kubectl logs -f # Then use it @@ -616,7 +611,6 @@ done > all-logs.txt # Or use label selectors (recommended) kubectl logs -l nomos/logical-role=validator --tail=500 > validators.log -kubectl logs -l nomos/logical-role=executor --tail=500 > executors.log # With explicit namespace kubectl logs -n my-namespace -l nomos/logical-role=validator --tail=500 > validators.log @@ -651,7 +645,6 @@ docker ps -a --filter "name=nomos-compose-" # K8s: check pod status (use label selectors, add -n if needed) kubectl get pods -l nomos/logical-role=validator -kubectl get pods -l nomos/logical-role=executor kubectl describe pod # Get name from above first ``` diff --git a/book/src/what-you-will-learn.md b/book/src/what-you-will-learn.md index 23a5f63..a3d2a33 100644 --- a/book/src/what-you-will-learn.md +++ b/book/src/what-you-will-learn.md @@ -14,7 +14,7 @@ without changing the plan. - Understand when to use each runner (Host, Compose, Kubernetes) **Author and Run Scenarios** -- Define multi-node topologies with validators and executors +- Define multi-node topologies with validators - Configure transaction and DA workloads with appropriate rates - Add consensus liveness and inclusion expectations - Run scenarios across all three deployment modes diff --git a/book/src/workloads.md b/book/src/workloads.md index ddcd0f2..8cda5ff 100644 --- a/book/src/workloads.md +++ b/book/src/workloads.md @@ -45,7 +45,7 @@ use testing_framework_workflows::workloads::transaction::Workload; ```rust,ignore use testing_framework_workflows::ScenarioBuilderExt; -ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(1)) +ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(20) // Seed 20 wallet accounts .transactions_with(|tx| { tx.rate(10) // 10 transactions per block @@ -63,7 +63,7 @@ use testing_framework_workflows::workloads::transaction; let tx_workload = transaction::Workload::with_rate(10) .expect("transaction rate must be non-zero"); -ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(1)) +ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(20) .with_workload(tx_workload) .with_run_duration(Duration::from_secs(60)) @@ -117,7 +117,7 @@ Error: Expectation failed: TxInclusionExpectation **How to debug:** 1. Check logs for proof generation timing: ```bash - grep "proof generation" $NOMOS_LOG_DIR/executor-0/*.log + grep "proof generation" $NOMOS_LOG_DIR/*/*.log ``` 2. Verify `POL_PROOF_DEV_MODE=true` was set 3. Increase duration: `.with_run_duration(Duration::from_secs(120))` @@ -147,7 +147,7 @@ use testing_framework_workflows::workloads::da::Workload; ```rust,ignore use testing_framework_workflows::ScenarioBuilderExt; -ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) +ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .da_with(|da| { da.channel_rate(2) // 2 channels per block .blob_rate(4) // 4 blobs per block @@ -168,7 +168,7 @@ let da_workload = da::Workload::with_rate( 20, // headroom_percent ); -ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) +ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .with_workload(da_workload) .with_run_duration(Duration::from_secs(120)) .build(); @@ -176,16 +176,10 @@ ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) #### Prerequisites -1. **Executors must be present:** - ```rust,ignore - .executors(N) // At least 1 executor - ``` - DA workload requires executor nodes to handle blob publishing. - -2. **Sufficient duration:** +1. **Sufficient duration:** Channel creation and blob publishing are slower than transaction submission. Allow 120+ seconds. -3. **Circuit artifacts:** +2. **Circuit artifacts:** Same as transaction workload (POL_PROOF_DEV_MODE, circuits staged). #### Attached Expectation @@ -195,12 +189,12 @@ ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) **What it checks:** - At least `N` channels were created (where N = channel_rate × expected blocks) - At least `M` blobs were published (where M = blob_rate × expected blocks × headroom) -- Uses BlockFeed and executor API to verify +- Uses BlockFeed API to verify **Failure modes:** - "Expected >= X channels, observed Y" (Y < X) - "Expected >= X blobs, observed Y" (Y < X) -- Common causes: executor crashes, insufficient duration, DA saturation +- Common causes: insufficient duration, DA saturation #### What Failure Looks Like @@ -210,23 +204,14 @@ Error: Expectation failed: DaWorkloadExpectation Observed: 23 channels Possible causes: - - Executors crashed or restarted (check executor logs) - Duration too short (channels still being created) - - Blob publishing failed (check executor API errors) - - Network issues (check validator/executor connectivity) + - Blob publishing failed (check API errors) + - Network issues (check validator connectivity) ``` **How to debug:** -1. Check executor logs: - ```bash - grep "channel\|blob" $NOMOS_LOG_DIR/executor-0/*.log - ``` -2. Verify executors stayed running: - ```bash - grep "panic\|killed" $NOMOS_LOG_DIR/executor-*/*.log - ``` -3. Increase duration: `.with_run_duration(Duration::from_secs(180))` -4. Reduce rates: `.channel_rate(1).blob_rate(2)` +1. Increase duration: `.with_run_duration(Duration::from_secs(180))` +2. Reduce rates: `.channel_rate(1).blob_rate(2)` --- @@ -247,7 +232,6 @@ use testing_framework_workflows::workloads::chaos::RandomRestartWorkload; | `max_delay` | `Duration` | **Required** | Maximum time between restart attempts | | `target_cooldown` | `Duration` | **Required** | Minimum time before restarting same node again | | `include_validators` | `bool` | **Required** | Whether to restart validators | -| `include_executors` | `bool` | **Required** | Whether to restart executors | #### Usage @@ -258,7 +242,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::{ScenarioBuilderExt, workloads::chaos::RandomRestartWorkload}; let scenario = ScenarioBuilder::topology_with(|t| { - t.network_star().validators(3).executors(2) + t.network_star().validators(3) }) .enable_node_control() // REQUIRED for chaos .with_workload(RandomRestartWorkload::new( @@ -266,7 +250,6 @@ let scenario = ScenarioBuilder::topology_with(|t| { Duration::from_secs(75), // max_delay Duration::from_secs(120), // target_cooldown true, // include_validators - true, // include_executors )) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(180)) @@ -288,7 +271,6 @@ let scenario = ScenarioBuilder::topology_with(|t| { 3. **Sufficient topology:** - For validators: Need >1 validator (workload skips if only 1) - - For executors: Can restart all executors 4. **Realistic timing:** - Total duration should be 2-3× the max_delay + cooldown @@ -338,8 +320,7 @@ Error: Expectation failed: ConsensusLiveness grep "NodeControlHandle" $NOMOS_LOG_DIR/*/*.log ``` 3. Increase cooldown: `Duration::from_secs(180)` -4. Reduce restart scope: `include_validators = false` (test executors only) -5. Increase duration: `.with_run_duration(Duration::from_secs(300))` +4. Increase duration: `.with_run_duration(Duration::from_secs(300))` --- @@ -357,7 +338,7 @@ use testing_framework_workflows::ScenarioBuilderExt; #### DSL Usage ```rust,ignore -ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(1)) +ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(60)) .build(); @@ -452,7 +433,6 @@ These expectations are added automatically when using the DSL (`.transactions_wi Duration::from_secs(75), // max Duration::from_secs(120), // cooldown true, // validators - true, // executors )) ``` @@ -463,7 +443,7 @@ These expectations are added automatically when using the DSL (`.transactions_wi ### Pattern 1: Multiple Workloads ```rust,ignore -ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) +ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(20) .transactions_with(|tx| tx.rate(5).users(10)) .da_with(|da| da.channel_rate(2).blob_rate(2)) @@ -493,7 +473,7 @@ impl Expectation for MyCustomExpectation { } } -ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(1)) +ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .with_expectation(MyCustomExpectation) .with_run_duration(Duration::from_secs(60)) .build(); @@ -507,7 +487,7 @@ When a workload or expectation fails: 1. Check logs: `$NOMOS_LOG_DIR/*/` or `docker compose logs` or `kubectl logs` 2. Verify environment variables: `POL_PROOF_DEV_MODE`, `NOMOS_NODE_BIN`, etc. -3. Check prerequisites: wallets, executors, node control, circuits +3. Check prerequisites: wallets, node control, circuits 4. Increase duration: Double the run duration and retry 5. Reduce rates: Half the traffic rates and retry 6. Check metrics: Prometheus queries for block height, tx count, DA stats diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 4dee650..44bbca2 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -16,9 +16,9 @@ testing-framework-runner-compose = { workspace = true } testing-framework-runner-k8s = { workspace = true } testing-framework-runner-local = { workspace = true } testing-framework-workflows = { workspace = true } -tokio = { workspace = true, features = ["macros", "net", "rt-multi-thread", "time"] } +tokio = { features = ["macros", "net", "rt-multi-thread", "time"], workspace = true } tracing = { workspace = true } -tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] } +tracing-subscriber = { features = ["env-filter", "fmt"], version = "0.3" } [dev-dependencies] async-trait = { workspace = true } diff --git a/examples/doc-snippets/src/architecture_overview_builder_api.rs b/examples/doc-snippets/src/architecture_overview_builder_api.rs index 7bf0c4b..85fa3b5 100644 --- a/examples/doc-snippets/src/architecture_overview_builder_api.rs +++ b/examples/doc-snippets/src/architecture_overview_builder_api.rs @@ -6,7 +6,7 @@ use testing_framework_workflows::ScenarioBuilderExt; use crate::SnippetResult; pub fn scenario_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(50) .transactions_with(|txs| txs.rate(5).users(20)) .expect_consensus_liveness() diff --git a/examples/doc-snippets/src/chaos_workloads_random_restart.rs b/examples/doc-snippets/src/chaos_workloads_random_restart.rs index 13204e4..aaae08c 100644 --- a/examples/doc-snippets/src/chaos_workloads_random_restart.rs +++ b/examples/doc-snippets/src/chaos_workloads_random_restart.rs @@ -6,14 +6,13 @@ use testing_framework_workflows::{ScenarioBuilderExt, workloads::chaos::RandomRe use crate::SnippetResult; pub fn random_restart_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(1)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .enable_node_control() .with_workload(RandomRestartWorkload::new( Duration::from_secs(45), // min delay Duration::from_secs(75), // max delay Duration::from_secs(120), // target cooldown true, // include validators - true, // include executors )) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(150)) diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_build.rs b/examples/doc-snippets/src/dsl_cheat_sheet_build.rs index f6c3762..6c7a0ed 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_build.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_build.rs @@ -4,5 +4,5 @@ use testing_framework_workflows::ScenarioBuilderExt; use crate::SnippetResult; pub fn build_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)).build() // Construct the final Scenario + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)).build() // Construct the final Scenario } diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_build_complete_example.rs b/examples/doc-snippets/src/dsl_cheat_sheet_build_complete_example.rs index cc4457b..a8ac266 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_build_complete_example.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_build_complete_example.rs @@ -6,7 +6,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn run_test() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(50) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_expectations.rs b/examples/doc-snippets/src/dsl_cheat_sheet_expectations.rs index ecf2437..72f9bfc 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_expectations.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_expectations.rs @@ -4,7 +4,7 @@ use testing_framework_workflows::ScenarioBuilderExt; use crate::SnippetResult; pub fn expectations_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .expect_consensus_liveness() // Assert blocks are produced continuously .build() } diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_run_duration.rs b/examples/doc-snippets/src/dsl_cheat_sheet_run_duration.rs index 925a735..57bce11 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_run_duration.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_run_duration.rs @@ -6,7 +6,7 @@ use testing_framework_workflows::ScenarioBuilderExt; use crate::SnippetResult; pub fn run_duration_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .with_run_duration(Duration::from_secs(120)) // Run for 120 seconds .build() } diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_topology.rs b/examples/doc-snippets/src/dsl_cheat_sheet_topology.rs index 9ed2208..ed1b805 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_topology.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_topology.rs @@ -4,6 +4,5 @@ pub fn topology() -> Builder<()> { ScenarioBuilder::topology_with(|t| { t.network_star() // Star topology (all connect to seed node) .validators(3) // Number of validator nodes - .executors(2) // Number of executor nodes }) } diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_transactions_workload.rs b/examples/doc-snippets/src/dsl_cheat_sheet_transactions_workload.rs index c4f6fda..30daa35 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_transactions_workload.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_transactions_workload.rs @@ -4,7 +4,7 @@ use testing_framework_workflows::ScenarioBuilderExt; use crate::SnippetResult; pub fn transactions_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .wallets(50) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_wallets.rs b/examples/doc-snippets/src/dsl_cheat_sheet_wallets.rs index f7d45f0..650f888 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_wallets.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_wallets.rs @@ -4,7 +4,7 @@ use testing_framework_workflows::ScenarioBuilderExt; use crate::SnippetResult; pub fn wallets_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .wallets(50) // Seed 50 funded wallet accounts .build() } diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_workload_chaos.rs b/examples/doc-snippets/src/dsl_cheat_sheet_workload_chaos.rs index 935f5a7..5a4b1d8 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_workload_chaos.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_workload_chaos.rs @@ -7,7 +7,7 @@ use crate::SnippetResult; pub fn chaos_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .enable_node_control() // Enable node control capability .chaos_with(|c| { c.restart() // Random restart chaos diff --git a/examples/doc-snippets/src/dsl_cheat_sheet_workload_execution.rs b/examples/doc-snippets/src/dsl_cheat_sheet_workload_execution.rs index 926d9d4..75e146c 100644 --- a/examples/doc-snippets/src/dsl_cheat_sheet_workload_execution.rs +++ b/examples/doc-snippets/src/dsl_cheat_sheet_workload_execution.rs @@ -4,7 +4,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn execution() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(0)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(1)) .expect_consensus_liveness() .build()?; diff --git a/examples/doc-snippets/src/examples_advanced_aggressive_chaos_test.rs b/examples/doc-snippets/src/examples_advanced_aggressive_chaos_test.rs index 5ab5c88..6df7c3f 100644 --- a/examples/doc-snippets/src/examples_advanced_aggressive_chaos_test.rs +++ b/examples/doc-snippets/src/examples_advanced_aggressive_chaos_test.rs @@ -6,7 +6,7 @@ use testing_framework_runner_compose::ComposeDeployer; use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; pub async fn aggressive_chaos_test() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4)) .enable_node_control() .wallets(50) .transactions_with(|txs| txs.rate(10).users(20)) diff --git a/examples/doc-snippets/src/examples_advanced_load_progression_test.rs b/examples/doc-snippets/src/examples_advanced_load_progression_test.rs index 489c993..5213007 100644 --- a/examples/doc-snippets/src/examples_advanced_load_progression_test.rs +++ b/examples/doc-snippets/src/examples_advanced_load_progression_test.rs @@ -9,13 +9,12 @@ pub async fn load_progression_test() -> Result<()> { for rate in [5, 10, 20, 30] { println!("Testing with rate: {}", rate); - let mut plan = - ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) - .wallets(50) - .transactions_with(|txs| txs.rate(rate).users(20)) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(60)) - .build()?; + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) + .wallets(50) + .transactions_with(|txs| txs.rate(rate).users(20)) + .expect_consensus_liveness() + .with_run_duration(Duration::from_secs(60)) + .build()?; let deployer = ComposeDeployer::default(); let runner = deployer.deploy(&plan).await?; diff --git a/examples/doc-snippets/src/examples_advanced_sustained_load_test.rs b/examples/doc-snippets/src/examples_advanced_sustained_load_test.rs index e5be3f8..f354679 100644 --- a/examples/doc-snippets/src/examples_advanced_sustained_load_test.rs +++ b/examples/doc-snippets/src/examples_advanced_sustained_load_test.rs @@ -6,7 +6,7 @@ use testing_framework_runner_compose::ComposeDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn sustained_load_test() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4)) .wallets(100) .transactions_with(|txs| txs.rate(15).users(50)) .expect_consensus_liveness() diff --git a/examples/doc-snippets/src/examples_chaos_resilience.rs b/examples/doc-snippets/src/examples_chaos_resilience.rs index 09403c7..17f5d7e 100644 --- a/examples/doc-snippets/src/examples_chaos_resilience.rs +++ b/examples/doc-snippets/src/examples_chaos_resilience.rs @@ -6,7 +6,7 @@ use testing_framework_runner_compose::ComposeDeployer; use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; pub async fn chaos_resilience() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(4)) .enable_node_control() .wallets(20) .transactions_with(|txs| txs.rate(3).users(10)) diff --git a/examples/doc-snippets/src/examples_da_and_transactions.rs b/examples/doc-snippets/src/examples_da_and_transactions.rs index dd076c9..c7a1a8c 100644 --- a/examples/doc-snippets/src/examples_da_and_transactions.rs +++ b/examples/doc-snippets/src/examples_da_and_transactions.rs @@ -6,7 +6,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn transactions_multi_node() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .wallets(30) .transactions_with(|txs| txs.rate(5).users(15)) .expect_consensus_liveness() diff --git a/examples/doc-snippets/src/examples_simple_consensus.rs b/examples/doc-snippets/src/examples_simple_consensus.rs index 4e93766..e9071b3 100644 --- a/examples/doc-snippets/src/examples_simple_consensus.rs +++ b/examples/doc-snippets/src/examples_simple_consensus.rs @@ -6,7 +6,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn simple_consensus() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(0)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .expect_consensus_liveness() .with_run_duration(Duration::from_secs(30)) .build()?; diff --git a/examples/doc-snippets/src/examples_transaction_workload.rs b/examples/doc-snippets/src/examples_transaction_workload.rs index e2a8670..9a078df 100644 --- a/examples/doc-snippets/src/examples_transaction_workload.rs +++ b/examples/doc-snippets/src/examples_transaction_workload.rs @@ -6,7 +6,7 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn transaction_workload() -> Result<()> { - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(0)) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .wallets(20) .transactions_with(|txs| txs.rate(5).users(10)) .expect_consensus_liveness() diff --git a/examples/doc-snippets/src/internal_crate_reference_add_expectation_builder_ext.rs b/examples/doc-snippets/src/internal_crate_reference_add_expectation_builder_ext.rs index 6085eaf..f619dce 100644 --- a/examples/doc-snippets/src/internal_crate_reference_add_expectation_builder_ext.rs +++ b/examples/doc-snippets/src/internal_crate_reference_add_expectation_builder_ext.rs @@ -13,7 +13,7 @@ impl YourExpectationDslExt for testing_framework_core::scenario::Builder SnippetResult<()> { - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(0)) + let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .expect_your_condition() .build()?; Ok(()) diff --git a/examples/doc-snippets/src/internal_crate_reference_add_workload_use_in_examples.rs b/examples/doc-snippets/src/internal_crate_reference_add_workload_use_in_examples.rs index 76c41df..4c415b2 100644 --- a/examples/doc-snippets/src/internal_crate_reference_add_workload_use_in_examples.rs +++ b/examples/doc-snippets/src/internal_crate_reference_add_workload_use_in_examples.rs @@ -27,7 +27,7 @@ impl YourWorkloadDslExt for testing_framework_core::scenario::Builder SnippetResult<()> { - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(0)) + let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) .your_workload_with(|w| w.some_config()) .build()?; Ok(()) diff --git a/examples/doc-snippets/src/node_control_trait.rs b/examples/doc-snippets/src/node_control_trait.rs index 1a438f9..025e85e 100644 --- a/examples/doc-snippets/src/node_control_trait.rs +++ b/examples/doc-snippets/src/node_control_trait.rs @@ -4,5 +4,4 @@ use testing_framework_core::scenario::DynError; #[async_trait] pub trait NodeControlHandle: Send + Sync { async fn restart_validator(&self, index: usize) -> Result<(), DynError>; - async fn restart_executor(&self, index: usize) -> Result<(), DynError>; } diff --git a/examples/doc-snippets/src/quickstart_adjust_topology.rs b/examples/doc-snippets/src/quickstart_adjust_topology.rs index 793b20a..05e6974 100644 --- a/examples/doc-snippets/src/quickstart_adjust_topology.rs +++ b/examples/doc-snippets/src/quickstart_adjust_topology.rs @@ -4,7 +4,7 @@ use testing_framework_runner_local::LocalDeployer; pub async fn run_with_env_overrides() -> Result<()> { // Uses NOMOS_DEMO_* env vars (or legacy *_DEMO_* vars) - let mut plan = ScenarioBuilder::with_node_counts(3, 2) + let mut plan = ScenarioBuilder::with_node_counts(3) .with_run_duration(std::time::Duration::from_secs(120)) .build()?; diff --git a/examples/doc-snippets/src/quickstart_core_api_pattern.rs b/examples/doc-snippets/src/quickstart_core_api_pattern.rs index e42e8fc..428668e 100644 --- a/examples/doc-snippets/src/quickstart_core_api_pattern.rs +++ b/examples/doc-snippets/src/quickstart_core_api_pattern.rs @@ -6,8 +6,8 @@ use testing_framework_runner_local::LocalDeployer; use testing_framework_workflows::ScenarioBuilderExt; pub async fn run_local_demo() -> Result<()> { - // Define the scenario (1 validator + 1 executor, tx workload) - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(1).executors(1)) + // Define the scenario (2 validator, tx workload) + let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .wallets(1_000) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block diff --git a/examples/doc-snippets/src/quickstart_step_1_topology.rs b/examples/doc-snippets/src/quickstart_step_1_topology.rs index 55a81fb..1979edc 100644 --- a/examples/doc-snippets/src/quickstart_step_1_topology.rs +++ b/examples/doc-snippets/src/quickstart_step_1_topology.rs @@ -3,7 +3,6 @@ use testing_framework_core::scenario::ScenarioBuilder; pub fn step_1_topology() -> testing_framework_core::scenario::Builder<()> { ScenarioBuilder::topology_with(|t| { t.network_star() // Star topology: all nodes connect to seed - .validators(1) // 1 validator node - .executors(1) // 1 executor node + .validators(2) // 2 validator nodes }) } diff --git a/examples/doc-snippets/src/quickstart_step_2_wallets.rs b/examples/doc-snippets/src/quickstart_step_2_wallets.rs index 19aad8c..31db8b6 100644 --- a/examples/doc-snippets/src/quickstart_step_2_wallets.rs +++ b/examples/doc-snippets/src/quickstart_step_2_wallets.rs @@ -2,5 +2,5 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn step_2_wallets() -> testing_framework_core::scenario::Builder<()> { - ScenarioBuilder::with_node_counts(1, 1).wallets(1_000) // Seed 1,000 funded wallet accounts + ScenarioBuilder::with_node_counts(1).wallets(1_000) // Seed 1,000 funded wallet accounts } diff --git a/examples/doc-snippets/src/quickstart_step_3_workloads.rs b/examples/doc-snippets/src/quickstart_step_3_workloads.rs index e145058..70deda3 100644 --- a/examples/doc-snippets/src/quickstart_step_3_workloads.rs +++ b/examples/doc-snippets/src/quickstart_step_3_workloads.rs @@ -2,7 +2,7 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn step_3_workloads() -> testing_framework_core::scenario::Builder<()> { - ScenarioBuilder::with_node_counts(1, 1) + ScenarioBuilder::with_node_counts(1) .wallets(1_000) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block diff --git a/examples/doc-snippets/src/quickstart_step_4_expectation.rs b/examples/doc-snippets/src/quickstart_step_4_expectation.rs index 9a24312..6186c5f 100644 --- a/examples/doc-snippets/src/quickstart_step_4_expectation.rs +++ b/examples/doc-snippets/src/quickstart_step_4_expectation.rs @@ -2,5 +2,5 @@ use testing_framework_core::scenario::ScenarioBuilder; use testing_framework_workflows::ScenarioBuilderExt; pub fn step_4_expectation() -> testing_framework_core::scenario::Builder<()> { - ScenarioBuilder::with_node_counts(1, 1).expect_consensus_liveness() // This says what success means: blocks must be produced continuously. + ScenarioBuilder::with_node_counts(1).expect_consensus_liveness() // This says what success means: blocks must be produced continuously. } diff --git a/examples/doc-snippets/src/quickstart_step_5_run_duration.rs b/examples/doc-snippets/src/quickstart_step_5_run_duration.rs index 4043973..d1b7907 100644 --- a/examples/doc-snippets/src/quickstart_step_5_run_duration.rs +++ b/examples/doc-snippets/src/quickstart_step_5_run_duration.rs @@ -3,5 +3,5 @@ use std::time::Duration; use testing_framework_core::scenario::ScenarioBuilder; pub fn step_5_run_duration() -> testing_framework_core::scenario::Builder<()> { - ScenarioBuilder::with_node_counts(1, 1).with_run_duration(Duration::from_secs(60)) + ScenarioBuilder::with_node_counts(1).with_run_duration(Duration::from_secs(60)) } diff --git a/examples/doc-snippets/src/quickstart_step_6_deploy_and_execute.rs b/examples/doc-snippets/src/quickstart_step_6_deploy_and_execute.rs index 8b82e50..226e942 100644 --- a/examples/doc-snippets/src/quickstart_step_6_deploy_and_execute.rs +++ b/examples/doc-snippets/src/quickstart_step_6_deploy_and_execute.rs @@ -3,7 +3,7 @@ use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; use testing_framework_runner_local::LocalDeployer; pub async fn step_6_deploy_and_execute() -> Result<()> { - let mut plan = ScenarioBuilder::with_node_counts(1, 1).build()?; + let mut plan = ScenarioBuilder::with_node_counts(1).build()?; let deployer = LocalDeployer::default(); // Use local process deployer let runner = deployer.deploy(&plan).await?; // Provision infrastructure diff --git a/examples/doc-snippets/src/quickstart_swap_deployer_compose.rs b/examples/doc-snippets/src/quickstart_swap_deployer_compose.rs index 5df9522..a1bf4e6 100644 --- a/examples/doc-snippets/src/quickstart_swap_deployer_compose.rs +++ b/examples/doc-snippets/src/quickstart_swap_deployer_compose.rs @@ -4,7 +4,7 @@ use testing_framework_runner_compose::ComposeDeployer; pub async fn run_with_compose_deployer() -> Result<()> { // ... same scenario definition ... - let mut plan = ScenarioBuilder::with_node_counts(1, 1).build()?; + let mut plan = ScenarioBuilder::with_node_counts(1).build()?; let deployer = ComposeDeployer::default(); // Use Docker Compose let runner = deployer.deploy(&plan).await?; diff --git a/examples/doc-snippets/src/testing_philosophy_declarative_over_imperative.rs b/examples/doc-snippets/src/testing_philosophy_declarative_over_imperative.rs index 0540082..c4f2521 100644 --- a/examples/doc-snippets/src/testing_philosophy_declarative_over_imperative.rs +++ b/examples/doc-snippets/src/testing_philosophy_declarative_over_imperative.rs @@ -5,7 +5,7 @@ use crate::SnippetResult; pub fn declarative_over_imperative() -> SnippetResult<()> { // Good: declarative - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(1)) + let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block }) @@ -13,7 +13,7 @@ pub fn declarative_over_imperative() -> SnippetResult<()> { .build()?; // Bad: imperative (framework doesn't work this way) - // spawn_validator(); spawn_executor(); + // spawn_validator(); // loop { submit_tx(); check_block(); } Ok(()) diff --git a/examples/doc-snippets/src/testing_philosophy_determinism_first.rs b/examples/doc-snippets/src/testing_philosophy_determinism_first.rs index 6e3f646..8ed1a86 100644 --- a/examples/doc-snippets/src/testing_philosophy_determinism_first.rs +++ b/examples/doc-snippets/src/testing_philosophy_determinism_first.rs @@ -7,7 +7,7 @@ use crate::SnippetResult; pub fn determinism_first() -> SnippetResult<()> { // Separate: functional test (deterministic) - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(1)) + let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block }) @@ -15,20 +15,19 @@ pub fn determinism_first() -> SnippetResult<()> { .build()?; // Separate: chaos test (introduces randomness) - let _chaos_plan = - ScenarioBuilder::topology_with(|t| t.network_star().validators(3).executors(2)) - .enable_node_control() - .chaos_with(|c| { - c.restart() - .min_delay(Duration::from_secs(30)) - .max_delay(Duration::from_secs(60)) - .target_cooldown(Duration::from_secs(45)) - .apply() - }) - .transactions_with(|txs| { - txs.rate(5) // 5 transactions per block - }) - .expect_consensus_liveness() - .build()?; + let _chaos_plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(3)) + .enable_node_control() + .chaos_with(|c| { + c.restart() + .min_delay(Duration::from_secs(30)) + .max_delay(Duration::from_secs(60)) + .target_cooldown(Duration::from_secs(45)) + .apply() + }) + .transactions_with(|txs| { + txs.rate(5) // 5 transactions per block + }) + .expect_consensus_liveness() + .build()?; Ok(()) } diff --git a/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs b/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs index b9c30f0..4c1cf09 100644 --- a/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs +++ b/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs @@ -7,14 +7,14 @@ use crate::SnippetResult; pub fn minimum_run_windows() -> SnippetResult<()> { // Bad: too short (~2 blocks with default 2s slots, 0.9 coeff) - let _too_short = ScenarioBuilder::with_node_counts(1, 0) + let _too_short = ScenarioBuilder::with_node_counts(1) .with_run_duration(Duration::from_secs(5)) .expect_consensus_liveness() .build()?; // Good: enough blocks for assertions (~27 blocks with default 2s slots, 0.9 // coeff) - let _good = ScenarioBuilder::with_node_counts(1, 0) + let _good = ScenarioBuilder::with_node_counts(1) .with_run_duration(Duration::from_secs(60)) .expect_consensus_liveness() .build()?; diff --git a/examples/doc-snippets/src/testing_philosophy_protocol_time_not_wall_time.rs b/examples/doc-snippets/src/testing_philosophy_protocol_time_not_wall_time.rs index b993857..66440e5 100644 --- a/examples/doc-snippets/src/testing_philosophy_protocol_time_not_wall_time.rs +++ b/examples/doc-snippets/src/testing_philosophy_protocol_time_not_wall_time.rs @@ -7,7 +7,7 @@ use crate::SnippetResult; pub fn protocol_time_not_wall_time() -> SnippetResult<()> { // Good: protocol-oriented thinking - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(1)) + let _plan = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) .transactions_with(|txs| { txs.rate(5) // 5 transactions per block }) diff --git a/examples/src/bin/compose_runner.rs b/examples/src/bin/compose_runner.rs index 6af825a..e9467cf 100644 --- a/examples/src/bin/compose_runner.rs +++ b/examples/src/bin/compose_runner.rs @@ -26,37 +26,25 @@ async fn main() { let validators = read_env_any(&["NOMOS_DEMO_VALIDATORS"], demo::DEFAULT_VALIDATORS); - let executors = read_env_any(&["NOMOS_DEMO_EXECUTORS"], demo::DEFAULT_EXECUTORS); - let run_secs = read_env_any(&["NOMOS_DEMO_RUN_SECS"], demo::DEFAULT_RUN_SECS); - info!( - validators, - executors, run_secs, "starting compose runner demo" - ); + info!(validators, run_secs, "starting compose runner demo"); - if let Err(err) = run_compose_case(validators, executors, Duration::from_secs(run_secs)).await { + if let Err(err) = run_compose_case(validators, Duration::from_secs(run_secs)).await { warn!("compose runner demo failed: {err:#}"); process::exit(1); } } -async fn run_compose_case( - validators: usize, - executors: usize, - run_duration: Duration, -) -> Result<()> { +async fn run_compose_case(validators: usize, run_duration: Duration) -> Result<()> { info!( validators, - executors, duration_secs = run_duration.as_secs(), "building scenario plan" ); - let scenario = ScenarioBuilder::topology_with(|t| { - t.network_star().validators(validators).executors(executors) - }) - .enable_node_control(); + let scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(validators)) + .enable_node_control(); let scenario = if let Some((chaos_min_delay, chaos_max_delay, chaos_target_cooldown)) = chaos_timings(run_duration) diff --git a/examples/src/bin/k8s_runner.rs b/examples/src/bin/k8s_runner.rs index 2738468..22df4e6 100644 --- a/examples/src/bin/k8s_runner.rs +++ b/examples/src/bin/k8s_runner.rs @@ -18,32 +18,28 @@ async fn main() { tracing_subscriber::fmt::init(); let validators = read_env_any(&["NOMOS_DEMO_VALIDATORS"], demo::DEFAULT_VALIDATORS); - let executors = read_env_any(&["NOMOS_DEMO_EXECUTORS"], demo::DEFAULT_EXECUTORS); let run_secs = read_env_any(&["NOMOS_DEMO_RUN_SECS"], demo::DEFAULT_RUN_SECS); - info!(validators, executors, run_secs, "starting k8s runner demo"); + info!(validators, run_secs, "starting k8s runner demo"); - if let Err(err) = run_k8s_case(validators, executors, Duration::from_secs(run_secs)).await { + if let Err(err) = run_k8s_case(validators, Duration::from_secs(run_secs)).await { warn!("k8s runner demo failed: {err:#}"); process::exit(1); } } -async fn run_k8s_case(validators: usize, executors: usize, run_duration: Duration) -> Result<()> { +async fn run_k8s_case(validators: usize, run_duration: Duration) -> Result<()> { info!( validators, - executors, duration_secs = run_duration.as_secs(), "building scenario plan" ); - let mut scenario = ScenarioBuilder::topology_with(|t| { - t.network_star().validators(validators).executors(executors) - }) - .with_capabilities(ObservabilityCapability::default()) - .wallets(TOTAL_WALLETS) - .transactions_with(|txs| txs.rate(MIXED_TXS_PER_BLOCK).users(TRANSACTION_WALLETS)) - .with_run_duration(run_duration) - .expect_consensus_liveness(); + let mut scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(validators)) + .with_capabilities(ObservabilityCapability::default()) + .wallets(TOTAL_WALLETS) + .transactions_with(|txs| txs.rate(MIXED_TXS_PER_BLOCK).users(TRANSACTION_WALLETS)) + .with_run_duration(run_duration) + .expect_consensus_liveness(); if let Ok(url) = env::var("NOMOS_METRICS_QUERY_URL") { if !url.trim().is_empty() { diff --git a/examples/src/bin/local_runner.rs b/examples/src/bin/local_runner.rs index 8acf0b9..34eef24 100644 --- a/examples/src/bin/local_runner.rs +++ b/examples/src/bin/local_runner.rs @@ -23,33 +23,26 @@ async fn main() { } let validators = read_env_any(&["NOMOS_DEMO_VALIDATORS"], demo::DEFAULT_VALIDATORS); - let executors = read_env_any(&["NOMOS_DEMO_EXECUTORS"], demo::DEFAULT_EXECUTORS); let run_secs = read_env_any(&["NOMOS_DEMO_RUN_SECS"], demo::DEFAULT_RUN_SECS); - info!( - validators, - executors, run_secs, "starting local runner demo" - ); + info!(validators, run_secs, "starting local runner demo"); - if let Err(err) = run_local_case(validators, executors, Duration::from_secs(run_secs)).await { + if let Err(err) = run_local_case(validators, Duration::from_secs(run_secs)).await { warn!("local runner demo failed: {err:#}"); process::exit(1); } } -async fn run_local_case(validators: usize, executors: usize, run_duration: Duration) -> Result<()> { +async fn run_local_case(validators: usize, run_duration: Duration) -> Result<()> { info!( validators, - executors, duration_secs = run_duration.as_secs(), "building scenario plan" ); - let scenario = ScenarioBuilder::topology_with(|t| { - t.network_star().validators(validators).executors(executors) - }) - .wallets(TOTAL_WALLETS) - .with_run_duration(run_duration); + let scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(validators)) + .wallets(TOTAL_WALLETS) + .with_run_duration(run_duration); let scenario = if run_duration.as_secs() <= SMOKE_RUN_SECS_MAX { scenario diff --git a/examples/src/demo.rs b/examples/src/demo.rs index 75f8265..3efad6f 100644 --- a/examples/src/demo.rs +++ b/examples/src/demo.rs @@ -1,3 +1,2 @@ pub const DEFAULT_VALIDATORS: usize = 2; -pub const DEFAULT_EXECUTORS: usize = 0; pub const DEFAULT_RUN_SECS: u64 = 60; diff --git a/examples/tests/dynamic_join.rs b/examples/tests/dynamic_join.rs index 7522a62..77f4e8a 100644 --- a/examples/tests/dynamic_join.rs +++ b/examples/tests/dynamic_join.rs @@ -110,13 +110,12 @@ impl Workload for JoinNodeWithPeersWorkload { async fn dynamic_join_reaches_consensus_liveness() -> Result<()> { let _ = try_init(); - let mut scenario = - ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(0)) - .enable_node_control() - .with_workload(JoinNodeWorkload::new("joiner")) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(60)) - .build()?; + let mut scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) + .enable_node_control() + .with_workload(JoinNodeWorkload::new("joiner")) + .expect_consensus_liveness() + .with_run_duration(Duration::from_secs(60)) + .build()?; let deployer = LocalDeployer::default(); let runner = deployer.deploy(&scenario).await?; @@ -128,16 +127,15 @@ async fn dynamic_join_reaches_consensus_liveness() -> Result<()> { #[tokio::test] #[ignore = "run manually with `cargo test -p runner-examples -- --ignored`"] async fn dynamic_join_with_peers_reaches_consensus_liveness() -> Result<()> { - let mut scenario = - ScenarioBuilder::topology_with(|t| t.network_star().validators(2).executors(0)) - .enable_node_control() - .with_workload(JoinNodeWithPeersWorkload::new( - "joiner", - vec!["validator-0".to_string()], - )) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(60)) - .build()?; + let mut scenario = ScenarioBuilder::topology_with(|t| t.network_star().validators(2)) + .enable_node_control() + .with_workload(JoinNodeWithPeersWorkload::new( + "joiner", + vec!["validator-0".to_string()], + )) + .expect_consensus_liveness() + .with_run_duration(Duration::from_secs(60)) + .build()?; let deployer = LocalDeployer::default(); let runner = deployer.deploy(&scenario).await?; diff --git a/examples/tests/manual_cluster.rs b/examples/tests/manual_cluster.rs index 7d50c0c..ef0d385 100644 --- a/examples/tests/manual_cluster.rs +++ b/examples/tests/manual_cluster.rs @@ -18,7 +18,7 @@ async fn manual_cluster_two_clusters_merge() -> Result<()> { // Required env vars (set on the command line when running this test): // - `POL_PROOF_DEV_MODE=true` // - `RUST_LOG=info` (optional) - let config = TopologyConfig::with_node_numbers(2, 0); + let config = TopologyConfig::with_node_numbers(2); let deployer = LocalDeployer::new(); let cluster = deployer.manual_cluster(config)?; // Nodes are stopped automatically when the cluster is dropped. diff --git a/scripts/build/build-bundle.sh b/scripts/build/build-bundle.sh index b3169a2..16622f0 100755 --- a/scripts/build/build-bundle.sh +++ b/scripts/build/build-bundle.sh @@ -322,7 +322,6 @@ build_bundle::prepare_circuits() { fi NODE_BIN="${NODE_TARGET}/debug/logos-blockchain-node" - EXEC_BIN="${NODE_TARGET}/debug/logos-blockchain-executor" CLI_BIN="${NODE_TARGET}/debug/logos-blockchain-cli" } @@ -360,13 +359,13 @@ build_bundle::build_binaries() { LOGOS_BLOCKCHAIN_CIRCUITS="${CIRCUITS_DIR}" \ RUSTUP_TOOLCHAIN="${BUNDLE_RUSTUP_TOOLCHAIN}" \ cargo build --all-features \ - -p logos-blockchain-node -p logos-blockchain-executor -p logos-blockchain-cli \ + -p logos-blockchain-node -p logos-blockchain-cli \ --target-dir "${NODE_TARGET}" else RUSTFLAGS='--cfg feature="pol-dev-mode"' NOMOS_CIRCUITS="${CIRCUITS_DIR}" \ LOGOS_BLOCKCHAIN_CIRCUITS="${CIRCUITS_DIR}" \ cargo build --all-features \ - -p logos-blockchain-node -p logos-blockchain-executor -p logos-blockchain-cli \ + -p logos-blockchain-node -p logos-blockchain-cli \ --target-dir "${NODE_TARGET}" fi ) @@ -380,7 +379,6 @@ build_bundle::package_bundle() { cp -a "${CIRCUITS_DIR}/." "${bundle_dir}/artifacts/circuits/" mkdir -p "${bundle_dir}/artifacts" cp "${NODE_BIN}" "${bundle_dir}/artifacts/logos-blockchain-node" - cp "${EXEC_BIN}" "${bundle_dir}/artifacts/logos-blockchain-executor" cp "${CLI_BIN}" "${bundle_dir}/artifacts/logos-blockchain-cli" { echo "nomos_node_path=${NOMOS_NODE_PATH:-}" diff --git a/scripts/build/build-linux-binaries.sh b/scripts/build/build-linux-binaries.sh index 568815d..298613f 100755 --- a/scripts/build/build-linux-binaries.sh +++ b/scripts/build/build-linux-binaries.sh @@ -134,7 +134,6 @@ build_linux_binaries::stage_from_bundle() { local artifacts="${extract_dir}/artifacts" [ -f "${artifacts}/logos-blockchain-node" ] || common::die "Missing logos-blockchain-node in bundle: ${tar_path}" - [ -f "${artifacts}/logos-blockchain-executor" ] || common::die "Missing logos-blockchain-executor in bundle: ${tar_path}" [ -f "${artifacts}/logos-blockchain-cli" ] || common::die "Missing logos-blockchain-cli in bundle: ${tar_path}" [ -d "${artifacts}/circuits" ] || common::die "Missing circuits/ in bundle: ${tar_path}" @@ -144,7 +143,7 @@ build_linux_binaries::stage_from_bundle() { echo "==> Staging binaries to ${bin_out}" mkdir -p "${bin_out}" - cp "${artifacts}/logos-blockchain-node" "${artifacts}/logos-blockchain-executor" "${artifacts}/logos-blockchain-cli" "${bin_out}/" + cp "${artifacts}/logos-blockchain-node" "${artifacts}/logos-blockchain-cli" "${bin_out}/" echo "==> Staging circuits to ${circuits_out}" rm -rf "${circuits_out}" diff --git a/scripts/build/build_test_image.sh b/scripts/build/build_test_image.sh index e1edaab..7ed017f 100755 --- a/scripts/build/build_test_image.sh +++ b/scripts/build/build_test_image.sh @@ -137,9 +137,9 @@ build_test_image::print_config() { } build_test_image::have_host_binaries() { - # Preserve existing behavior: only require node+executor on the host. + # Preserve existing behavior: only require node on the host. # If logos-blockchain-cli is missing, the Dockerfile can still build it from source. - [ -x "${BIN_DST}/logos-blockchain-node" ] && [ -x "${BIN_DST}/logos-blockchain-executor" ] + [ -x "${BIN_DST}/logos-blockchain-node" ] } build_test_image::restore_from_bundle() { @@ -153,13 +153,13 @@ build_test_image::restore_from_bundle() { tar -xzf "${TAR_PATH}" -C "${tmp_extract}" local artifacts="${tmp_extract}/artifacts" - for bin in logos-blockchain-node logos-blockchain-executor logos-blockchain-cli; do + for bin in logos-blockchain-node logos-blockchain-cli; do [ -f "${artifacts}/${bin}" ] || build_test_image::fail "Bundle ${TAR_PATH} missing artifacts/${bin}" done mkdir -p "${BIN_DST}" - cp "${artifacts}/logos-blockchain-node" "${artifacts}/logos-blockchain-executor" "${artifacts}/logos-blockchain-cli" "${BIN_DST}/" - chmod +x "${BIN_DST}/logos-blockchain-node" "${BIN_DST}/logos-blockchain-executor" "${BIN_DST}/logos-blockchain-cli" || true + cp "${artifacts}/logos-blockchain-node" "${artifacts}/logos-blockchain-cli" "${BIN_DST}/" + chmod +x "${BIN_DST}/logos-blockchain-node" "${BIN_DST}/logos-blockchain-cli" || true if [ -d "${artifacts}/circuits" ]; then mkdir -p "${CIRCUITS_DIR_HOST}" diff --git a/scripts/ops/update-nomos-rev.sh b/scripts/ops/update-nomos-rev.sh index 48ca772..7139403 100755 --- a/scripts/ops/update-nomos-rev.sh +++ b/scripts/ops/update-nomos-rev.sh @@ -156,13 +156,6 @@ targets = [ "logos-blockchain-common-http-client", "logos-blockchain-cryptarchia-engine", "logos-blockchain-cryptarchia-sync", - "logos-blockchain-da-dispersal-service", - "logos-blockchain-da-network-core", - "logos-blockchain-da-network-service", - "logos-blockchain-da-sampling-service", - "logos-blockchain-da-verifier-service", - "logos-blockchain-executor", - "logos-blockchain-executor-http-client", "logos-blockchain-groth16", "logos-blockchain-http-api-common", "logos-blockchain-key-management-system-service", @@ -175,7 +168,6 @@ targets = [ "logos-blockchain-poc", "logos-blockchain-pol", "logos-blockchain-sdp-service", - "logos-blockchain-subnetworks-assignations", "logos-blockchain-tests", "logos-blockchain-time-service", "logos-blockchain-tracing", diff --git a/scripts/run/run-examples.sh b/scripts/run/run-examples.sh index 5823dc5..a74ded3 100755 --- a/scripts/run/run-examples.sh +++ b/scripts/run/run-examples.sh @@ -45,7 +45,6 @@ Modes: Options: -t, --run-seconds N Duration to run the demo (required) -v, --validators N Number of validators (required) - -e, --executors N Number of executors (required) --bundle PATH Convenience alias for setting NOMOS_BINARIES_TAR=PATH --metrics-query-url URL PromQL base URL the runner process can query (optional) --metrics-otlp-ingest-url URL Full OTLP HTTP ingest URL for node metrics export (optional) @@ -117,7 +116,6 @@ run_examples::parse_args() { MODE="compose" RUN_SECS_RAW="" DEMO_VALIDATORS="" - DEMO_EXECUTORS="" IMAGE_SELECTION_MODE="auto" METRICS_QUERY_URL="" METRICS_OTLP_INGEST_URL="" @@ -148,14 +146,6 @@ run_examples::parse_args() { DEMO_VALIDATORS="${1#*=}" shift ;; - -e|--executors) - DEMO_EXECUTORS="${2:-}" - shift 2 - ;; - --executors=*) - DEMO_EXECUTORS="${1#*=}" - shift - ;; --bundle) NOMOS_BINARIES_TAR="${2:-}" export NOMOS_BINARIES_TAR @@ -232,16 +222,12 @@ run_examples::parse_args() { fi RUN_SECS="${RUN_SECS_RAW}" - if [ -z "${DEMO_VALIDATORS}" ] || [ -z "${DEMO_EXECUTORS}" ]; then - run_examples::fail_with_usage "validators and executors must be provided via -v/--validators and -e/--executors" + if [ -z "${DEMO_VALIDATORS}" ] ]; then + run_examples::fail_with_usage "validators must be provided via -v/--validators" fi if ! common::is_uint "${DEMO_VALIDATORS}" ; then run_examples::fail_with_usage "validators must be a non-negative integer (pass -v/--validators)" fi - if ! common::is_uint "${DEMO_EXECUTORS}" ; then - run_examples::fail_with_usage "executors must be a non-negative integer (pass -e/--executors)" - fi - } run_examples::select_image() { @@ -388,7 +374,7 @@ run_examples::restore_binaries_from_tar() { RESTORED_BIN_DIR="${src}" export RESTORED_BIN_DIR - if [ ! -f "${src}/logos-blockchain-node" ] || [ ! -f "${src}/logos-blockchain-executor" ] || [ ! -f "${src}/logos-blockchain-cli" ]; then + if [ ! -f "${src}/logos-blockchain-node" ] || [ ! -f "${src}/logos-blockchain-cli" ]; then echo "Binaries missing in ${tar_path}; provide a prebuilt binaries tarball." >&2 return 1 fi @@ -397,11 +383,11 @@ run_examples::restore_binaries_from_tar() { if [ "${MODE}" != "host" ] && ! run_examples::host_bin_matches_arch "${src}/logos-blockchain-node"; then echo "Bundled binaries do not match host arch; skipping copy so containers rebuild from source." copy_bins=0 - rm -f "${bin_dst}/logos-blockchain-node" "${bin_dst}/logos-blockchain-executor" "${bin_dst}/logos-blockchain-cli" + rm -f "${bin_dst}/logos-blockchain-node" "${bin_dst}/logos-blockchain-cli" fi if [ "${copy_bins}" -eq 1 ]; then mkdir -p "${bin_dst}" - cp "${src}/logos-blockchain-node" "${src}/logos-blockchain-executor" "${src}/logos-blockchain-cli" "${bin_dst}/" + cp "${src}/logos-blockchain-node" "${src}/logos-blockchain-cli" "${bin_dst}/" fi if [ -d "${circuits_src}" ] && [ -f "${circuits_src}/${KZG_FILE}" ]; then @@ -436,8 +422,8 @@ run_examples::prepare_bundles() { HOST_TAR="${ROOT_DIR}/.tmp/nomos-binaries-host-${VERSION}.tar.gz" LINUX_TAR="${ROOT_DIR}/.tmp/nomos-binaries-linux-${VERSION}.tar.gz" - if [ -n "${LOGOS_BLOCKCHAIN_NODE_BIN:-}" ] && [ -x "${LOGOS_BLOCKCHAIN_NODE_BIN}" ] && [ -n "${LOGOS_BLOCKCHAIN_EXECUTOR_BIN:-}" ] && [ -x "${LOGOS_BLOCKCHAIN_EXECUTOR_BIN}" ]; then - echo "==> Using pre-specified host binaries (LOGOS_BLOCKCHAIN_NODE_BIN/LOGOS_BLOCKCHAIN_EXECUTOR_BIN); skipping tarball restore" + if [ -n "${LOGOS_BLOCKCHAIN_NODE_BIN:-}" ] && [ -x "${LOGOS_BLOCKCHAIN_NODE_BIN}" ]; then + echo "==> Using pre-specified host binaries (LOGOS_BLOCKCHAIN_NODE_BIN); skipping tarball restore" return 0 fi @@ -508,20 +494,18 @@ run_examples::validate_restored_bundle() { common::die "KZG params missing at ${KZG_HOST_PATH}; ensure the tarball contains circuits." fi - if [ "${MODE}" = "host" ] && ! { [ -n "${LOGOS_BLOCKCHAIN_NODE_BIN:-}" ] && [ -x "${LOGOS_BLOCKCHAIN_NODE_BIN:-}" ] && [ -n "${LOGOS_BLOCKCHAIN_EXECUTOR_BIN:-}" ] && [ -x "${LOGOS_BLOCKCHAIN_EXECUTOR_BIN:-}" ]; }; then + if [ "${MODE}" = "host" ] && ! { [ -n "${LOGOS_BLOCKCHAIN_NODE_BIN:-}" ] && [ -x "${LOGOS_BLOCKCHAIN_NODE_BIN:-}" ]; }; then local tar_node tar_exec tar_node="${RESTORED_BIN_DIR:-${ROOT_DIR}/testing-framework/assets/stack/bin}/logos-blockchain-node" - tar_exec="${RESTORED_BIN_DIR:-${ROOT_DIR}/testing-framework/assets/stack/bin}/logos-blockchain-executor" [ -x "${tar_node}" ] && [ -x "${tar_exec}" ] || common::die \ "Restored tarball missing host executables; provide a host-compatible binaries tarball." - run_examples::host_bin_matches_arch "${tar_node}" && run_examples::host_bin_matches_arch "${tar_exec}" || common::die \ + run_examples::host_bin_matches_arch "${tar_node}" || common::die \ "Restored executables do not match host architecture; provide a host-compatible binaries tarball." echo "==> Using restored host binaries from tarball" LOGOS_BLOCKCHAIN_NODE_BIN="${tar_node}" - LOGOS_BLOCKCHAIN_EXECUTOR_BIN="${tar_exec}" - export LOGOS_BLOCKCHAIN_NODE_BIN LOGOS_BLOCKCHAIN_EXECUTOR_BIN + export LOGOS_BLOCKCHAIN_NODE_BIN fi } @@ -572,7 +556,6 @@ run_examples::run() { export NOMOS_DEMO_RUN_SECS="${RUN_SECS}" export NOMOS_DEMO_VALIDATORS="${DEMO_VALIDATORS}" - export NOMOS_DEMO_EXECUTORS="${DEMO_EXECUTORS}" if [ -n "${METRICS_QUERY_URL}" ]; then export NOMOS_METRICS_QUERY_URL="${METRICS_QUERY_URL}" @@ -591,7 +574,6 @@ run_examples::run() { LOGOS_BLOCKCHAIN_CIRCUITS="${HOST_BUNDLE_PATH}" \ LOGOS_BLOCKCHAIN_KZGRS_PARAMS_PATH="${kzg_path}" \ LOGOS_BLOCKCHAIN_NODE_BIN="${LOGOS_BLOCKCHAIN_NODE_BIN:-}" \ - LOGOS_BLOCKCHAIN_EXECUTOR_BIN="${LOGOS_BLOCKCHAIN_EXECUTOR_BIN:-}" \ COMPOSE_CIRCUITS_PLATFORM="${COMPOSE_CIRCUITS_PLATFORM:-}" \ cargo run -p runner-examples --bin "${BIN}" } diff --git a/scripts/run/run-test-matrix.sh b/scripts/run/run-test-matrix.sh index 2170757..eea3e43 100755 --- a/scripts/run/run-test-matrix.sh +++ b/scripts/run/run-test-matrix.sh @@ -18,7 +18,6 @@ image rebuilds (where it makes sense), after cleaning and rebuilding bundles. Options: -t, --run-seconds N Demo duration for each run (default: 120) -v, --validators N Validators (default: 1) - -e, --executors N Executors (default: 1) --modes LIST Comma-separated: host,compose,k8s (default: host,compose,k8s) --no-clean Skip scripts/ops/clean.sh step --no-bundles Skip scripts/build/build-bundle.sh (uses existing .tmp tarballs) @@ -46,7 +45,6 @@ matrix::have() { command -v "$1" >/dev/null 2>&1; } matrix::parse_args() { RUN_SECS=120 VALIDATORS=1 - EXECUTORS=1 MODES_RAW="host,compose,k8s" DO_CLEAN=1 DO_BUNDLES=1 @@ -63,8 +61,6 @@ matrix::parse_args() { --run-seconds=*) RUN_SECS="${1#*=}"; shift ;; -v|--validators) VALIDATORS="${2:-}"; shift 2 ;; --validators=*) VALIDATORS="${1#*=}"; shift ;; - -e|--executors) EXECUTORS="${2:-}"; shift 2 ;; - --executors=*) EXECUTORS="${1#*=}"; shift ;; --modes) MODES_RAW="${2:-}"; shift 2 ;; --modes=*) MODES_RAW="${1#*=}"; shift ;; --no-clean) DO_CLEAN=0; shift ;; @@ -83,7 +79,6 @@ matrix::parse_args() { common::is_uint "${RUN_SECS}" || matrix::die "--run-seconds must be an integer" [ "${RUN_SECS}" -gt 0 ] || matrix::die "--run-seconds must be > 0" common::is_uint "${VALIDATORS}" || matrix::die "--validators must be an integer" - common::is_uint "${EXECUTORS}" || matrix::die "--executors must be an integer" } matrix::split_modes() { @@ -220,7 +215,7 @@ matrix::main() { host) matrix::run_case "host" \ "${ROOT_DIR}/scripts/run/run-examples.sh" \ - -t "${RUN_SECS}" -v "${VALIDATORS}" -e "${EXECUTORS}" \ + -t "${RUN_SECS}" -v "${VALIDATORS}" \ "${forward[@]}" \ host ;; @@ -228,7 +223,7 @@ matrix::main() { if [ "${SKIP_IMAGE_BUILD_VARIANTS}" -eq 0 ]; then matrix::run_case "compose.image_build" \ "${ROOT_DIR}/scripts/run/run-examples.sh" \ - -t "${RUN_SECS}" -v "${VALIDATORS}" -e "${EXECUTORS}" \ + -t "${RUN_SECS}" -v "${VALIDATORS}" \ "${forward[@]}" \ compose else @@ -238,7 +233,7 @@ matrix::main() { matrix::run_case "compose.skip_image_build" \ "${ROOT_DIR}/scripts/run/run-examples.sh" \ --no-image-build \ - -t "${RUN_SECS}" -v "${VALIDATORS}" -e "${EXECUTORS}" \ + -t "${RUN_SECS}" -v "${VALIDATORS}" \ "${forward[@]}" \ compose ;; @@ -259,7 +254,7 @@ matrix::main() { fi matrix::run_case "k8s.image_build" \ "${ROOT_DIR}/scripts/run/run-examples.sh" \ - -t "${RUN_SECS}" -v "${VALIDATORS}" -e "${EXECUTORS}" \ + -t "${RUN_SECS}" -v "${VALIDATORS}" \ "${forward[@]}" \ k8s unset NOMOS_FORCE_IMAGE_BUILD || true @@ -273,7 +268,7 @@ matrix::main() { matrix::run_case "k8s.skip_image_build" \ "${ROOT_DIR}/scripts/run/run-examples.sh" \ --no-image-build \ - -t "${RUN_SECS}" -v "${VALIDATORS}" -e "${EXECUTORS}" \ + -t "${RUN_SECS}" -v "${VALIDATORS}" \ "${forward[@]}" \ k8s ;; diff --git a/testing-framework/assets/stack/Dockerfile.base b/testing-framework/assets/stack/Dockerfile.base index 24e5e04..399eeb0 100644 --- a/testing-framework/assets/stack/Dockerfile.base +++ b/testing-framework/assets/stack/Dockerfile.base @@ -82,7 +82,6 @@ COPY --from=builder /opt/circuits /opt/circuits COPY --from=builder /workspace/testing-framework/assets/stack/kzgrs_test_params/kzgrs_test_params /opt/nomos/kzg-params/kzgrs_test_params COPY --from=builder /workspace/artifacts/logos-blockchain-node /usr/bin/logos-blockchain-node -COPY --from=builder /workspace/artifacts/logos-blockchain-executor /usr/bin/logos-blockchain-executor COPY --from=builder /workspace/artifacts/logos-blockchain-cli /usr/bin/logos-blockchain-cli COPY --from=builder /workspace/artifacts/cfgsync-server /usr/bin/cfgsync-server COPY --from=builder /workspace/artifacts/cfgsync-client /usr/bin/cfgsync-client diff --git a/testing-framework/assets/stack/scripts/docker/prepare_binaries.sh b/testing-framework/assets/stack/scripts/docker/prepare_binaries.sh index 50d03d6..524b0e2 100755 --- a/testing-framework/assets/stack/scripts/docker/prepare_binaries.sh +++ b/testing-framework/assets/stack/scripts/docker/prepare_binaries.sh @@ -9,7 +9,6 @@ TARGET_ARCH="$(uname -m)" have_prebuilt() { [ -f testing-framework/assets/stack/bin/logos-blockchain-node ] && \ - [ -f testing-framework/assets/stack/bin/logos-blockchain-executor ] && \ [ -f testing-framework/assets/stack/bin/logos-blockchain-cli ] } @@ -34,7 +33,6 @@ bin_matches_arch() { if have_prebuilt && bin_matches_arch; then echo "Using prebuilt logos-blockchain binaries from testing-framework/assets/stack/bin" cp testing-framework/assets/stack/bin/logos-blockchain-node /workspace/artifacts/logos-blockchain-node - cp testing-framework/assets/stack/bin/logos-blockchain-executor /workspace/artifacts/logos-blockchain-executor cp testing-framework/assets/stack/bin/logos-blockchain-cli /workspace/artifacts/logos-blockchain-cli exit 0 fi @@ -67,10 +65,9 @@ fi RUSTFLAGS='--cfg feature="pol-dev-mode"' NOMOS_CIRCUITS=/opt/circuits \ LOGOS_BLOCKCHAIN_CIRCUITS=/opt/circuits \ cargo build --features "testing" \ - -p logos-blockchain-node -p logos-blockchain-executor -p logos-blockchain-cli + -p logos-blockchain-node -p logos-blockchain-cli cp /tmp/nomos-node/target/debug/logos-blockchain-node /workspace/artifacts/logos-blockchain-node -cp /tmp/nomos-node/target/debug/logos-blockchain-executor /workspace/artifacts/logos-blockchain-executor cp /tmp/nomos-node/target/debug/logos-blockchain-cli /workspace/artifacts/logos-blockchain-cli rm -rf /tmp/nomos-node/target/debug/incremental diff --git a/testing-framework/assets/stack/scripts/run_nomos.sh b/testing-framework/assets/stack/scripts/run_nomos.sh index ea83f53..2e6f0e6 100755 --- a/testing-framework/assets/stack/scripts/run_nomos.sh +++ b/testing-framework/assets/stack/scripts/run_nomos.sh @@ -7,7 +7,6 @@ role="${1:-validator}" bin_for_role() { case "$1" in validator) echo "/usr/bin/logos-blockchain-node" ;; - executor) echo "/usr/bin/logos-blockchain-executor" ;; *) echo "Unknown role: $1" >&2; exit 2 ;; esac } diff --git a/testing-framework/assets/stack/scripts/run_nomos_executor.sh b/testing-framework/assets/stack/scripts/run_nomos_executor.sh deleted file mode 100755 index 3bda55b..0000000 --- a/testing-framework/assets/stack/scripts/run_nomos_executor.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /etc/nomos/scripts/run_nomos.sh executor diff --git a/testing-framework/configs/Cargo.toml b/testing-framework/configs/Cargo.toml index 9c47da9..1a0713c 100644 --- a/testing-framework/configs/Cargo.toml +++ b/testing-framework/configs/Cargo.toml @@ -14,36 +14,29 @@ blst = "0.3.11" chain-leader = { workspace = true } chain-network = { workspace = true } chain-service = { workspace = true } -cryptarchia-engine = { workspace = true, features = ["serde"] } +cryptarchia-engine = { features = ["serde"], workspace = true } cryptarchia-sync = { workspace = true } groth16 = { workspace = true } -hex = { version = "0.4.3", default-features = false } +hex = { default-features = false, version = "0.4.3" } key-management-system-service = { workspace = true } -logos-blockchain-executor = { workspace = true, default-features = false, features = ["testing", "tracing"] } nomos-api = { workspace = true } -nomos-blend-service = { workspace = true, features = ["libp2p"] } +nomos-blend-service = { features = ["libp2p"], workspace = true } nomos-core = { workspace = true } -nomos-da-dispersal = { workspace = true } -nomos-da-network-core = { workspace = true } -nomos-da-network-service = { workspace = true } -nomos-da-sampling = { workspace = true } -nomos-da-verifier = { workspace = true } -nomos-ledger = { workspace = true, features = ["serde"] } +nomos-ledger = { features = ["serde"], workspace = true } nomos-libp2p = { workspace = true } -nomos-node = { workspace = true, default-features = false, features = ["testing"] } +nomos-node = { default-features = false, features = ["testing"], workspace = true } nomos-sdp = { workspace = true } nomos-time = { workspace = true } nomos-tracing = { workspace = true } nomos-tracing-service = { workspace = true } nomos-utils = { workspace = true } nomos-wallet = { workspace = true } -num-bigint = { version = "0.4", default-features = false } +num-bigint = { default-features = false, version = "0.4" } rand = { workspace = true } -serde = { workspace = true, features = ["derive"] } -subnetworks-assignations = { workspace = true } +serde = { features = ["derive"], workspace = true } testing-framework-env = { workspace = true } thiserror = { workspace = true } -time = { version = "0.3", default-features = true } +time = { default-features = true, version = "0.3" } tracing = { workspace = true } [lints] diff --git a/testing-framework/configs/src/nodes/common.rs b/testing-framework/configs/src/nodes/common.rs index 4f5a90a..20e921d 100644 --- a/testing-framework/configs/src/nodes/common.rs +++ b/testing-framework/configs/src/nodes/common.rs @@ -4,15 +4,6 @@ use chain_leader::LeaderConfig as ChainLeaderConfig; use chain_network::{BootstrapConfig as ChainBootstrapConfig, OrphanConfig, SyncConfig}; use chain_service::StartingState; use nomos_api::ApiServiceSettings; -use nomos_da_sampling::{ - DaSamplingServiceSettings, backend::kzgrs::KzgrsSamplingBackendSettings, - verifier::kzgrs::KzgrsDaVerifierSettings as SamplingVerifierSettings, -}; -use nomos_da_verifier::{ - DaVerifierServiceSettings, - backend::{kzgrs::KzgrsDaVerifierSettings, trigger::MempoolPublishTriggerConfig}, - storage::adapters::rocksdb::RocksAdapterSettings as VerifierStorageAdapterSettings, -}; use nomos_node::{ api::backend::AxumBackendSettings as NodeAxumBackendSettings, config::{ @@ -29,10 +20,9 @@ use nomos_node::{ time::{deployment::Settings as TimeDeploymentSettings, serde::Config as TimeConfig}, }, }; -use nomos_utils::math::NonNegativeF64; use nomos_wallet::WalletServiceSettings; -use crate::{constants::KZG_PARAMS_FILENAME, timeouts, topology::configs::GeneralConfig}; +use crate::{timeouts, topology::configs::GeneralConfig}; // Configuration constants const CRYPTARCHIA_GOSSIPSUB_PROTOCOL: &str = "/cryptarchia/proto"; @@ -40,11 +30,9 @@ const MEMPOOL_PUBSUB_TOPIC: &str = "mantle"; const STATE_RECORDING_INTERVAL_SECS: u64 = 60; const IBD_DOWNLOAD_DELAY_SECS: u64 = 10; const MAX_ORPHAN_CACHE_SIZE: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(5) }; -const DA_PUBLISH_THRESHOLD: f64 = 0.8; const API_RATE_LIMIT_PER_SECOND: u64 = 10000; const API_RATE_LIMIT_BURST: u32 = 10000; const API_MAX_CONCURRENT_REQUESTS: usize = 1000; -const BLOB_STORAGE_DIR: &str = "./"; pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings { CryptarchiaDeploymentSettings { @@ -113,64 +101,6 @@ pub(crate) fn cryptarchia_config(config: &GeneralConfig) -> CryptarchiaConfig { } } -fn kzg_params_path(raw: &str) -> String { - let path = PathBuf::from(raw); - - if path.is_dir() { - return path.join(KZG_PARAMS_FILENAME).to_string_lossy().to_string(); - } - - path.to_string_lossy().to_string() -} - -pub(crate) fn da_verifier_config( - config: &GeneralConfig, -) -> DaVerifierServiceSettings { - let publish_threshold = match NonNegativeF64::try_from(DA_PUBLISH_THRESHOLD) { - Ok(value) => value, - Err(_) => unsafe { - // Safety: `DA_PUBLISH_THRESHOLD` is a finite non-negative constant. - std::hint::unreachable_unchecked() - }, - }; - DaVerifierServiceSettings { - share_verifier_settings: KzgrsDaVerifierSettings { - global_params_path: kzg_params_path(&config.da_config.global_params_path), - domain_size: config.da_config.num_subnets as usize, - }, - tx_verifier_settings: (), - network_adapter_settings: (), - storage_adapter_settings: VerifierStorageAdapterSettings { - blob_storage_directory: BLOB_STORAGE_DIR.into(), - }, - mempool_trigger_settings: MempoolPublishTriggerConfig { - publish_threshold, - share_duration: timeouts::share_duration(), - prune_duration: timeouts::prune_duration(), - prune_interval: timeouts::prune_interval(), - }, - } -} - -pub(crate) fn da_sampling_config( - config: &GeneralConfig, -) -> DaSamplingServiceSettings { - DaSamplingServiceSettings { - sampling_settings: KzgrsSamplingBackendSettings { - num_samples: config.da_config.num_samples, - num_subnets: config.da_config.num_subnets, - old_blobs_check_interval: config.da_config.old_blobs_check_interval, - blobs_validity_duration: config.da_config.blobs_validity_duration, - }, - share_verifier_settings: SamplingVerifierSettings { - global_params_path: kzg_params_path(&config.da_config.global_params_path), - domain_size: config.da_config.num_subnets as usize, - }, - commitments_wait_duration: timeouts::commitments_wait(), - sdp_blob_trigger_sampling_delay: crate::adjust_timeout(timeouts::sdp_trigger_delay()), - } -} - pub(crate) fn time_config(config: &GeneralConfig) -> TimeConfig { TimeConfig { backend: nomos_time::backends::NtpTimeBackendSettings { @@ -226,10 +156,6 @@ pub(crate) fn wallet_settings(config: &GeneralConfig) -> WalletServiceSettings { wallet_settings_with_leader(config, true) } -pub(crate) fn wallet_settings_for_executor(config: &GeneralConfig) -> WalletServiceSettings { - wallet_settings_with_leader(config, false) -} - fn wallet_settings_with_leader( config: &GeneralConfig, include_leader: bool, diff --git a/testing-framework/configs/src/nodes/executor.rs b/testing-framework/configs/src/nodes/executor.rs deleted file mode 100644 index df08562..0000000 --- a/testing-framework/configs/src/nodes/executor.rs +++ /dev/null @@ -1,127 +0,0 @@ -use logos_blockchain_executor::config::Config as ExecutorConfig; -use nomos_da_dispersal::{ - DispersalServiceSettings, - backend::kzgrs::{DispersalKZGRSBackendSettings, EncoderSettings}, -}; -use nomos_da_network_core::protocols::sampling::SubnetsConfig; -use nomos_da_network_service::{ - NetworkConfig as DaNetworkConfig, - api::http::ApiAdapterSettings, - backends::libp2p::{ - common::DaNetworkBackendSettings, executor::DaNetworkExecutorBackendSettings, - }, -}; -use nomos_node::{RocksBackendSettings, config::deployment::DeploymentSettings}; -use nomos_sdp::SdpSettings; - -use crate::{ - nodes::{ - blend::build_blend_service_config, - common::{ - cryptarchia_config, cryptarchia_deployment, da_sampling_config, da_verifier_config, - http_config, mempool_config, mempool_deployment, testing_http_config, time_config, - time_deployment, tracing_settings, wallet_settings_for_executor, - }, - }, - timeouts, - topology::configs::GeneralConfig, -}; - -#[must_use] -pub fn create_executor_config(config: GeneralConfig) -> ExecutorConfig { - let network_config = config.network_config.clone(); - let (blend_user_config, blend_deployment, network_deployment) = - build_blend_service_config(&config.blend_config); - - let deployment_settings = - build_executor_deployment_settings(&config, blend_deployment, network_deployment); - - ExecutorConfig { - network: network_config, - blend: blend_user_config, - deployment: deployment_settings, - cryptarchia: cryptarchia_config(&config), - da_network: DaNetworkConfig { - backend: build_executor_da_network_backend_settings(&config), - membership: config.da_config.membership.clone(), - api_adapter_settings: ApiAdapterSettings { - api_port: config.api_config.address.port(), - is_secure: false, - }, - subnet_refresh_interval: config.da_config.subnets_refresh_interval, - subnet_threshold: config.da_config.num_samples as usize, - min_session_members: config.da_config.num_samples as usize, - }, - da_verifier: da_verifier_config(&config), - tracing: tracing_settings(&config), - http: http_config(&config), - da_sampling: da_sampling_config(&config), - storage: rocks_storage_settings(), - da_dispersal: DispersalServiceSettings { - backend: build_dispersal_backend_settings(&config), - }, - time: time_config(&config), - mempool: mempool_config(), - sdp: SdpSettings { declaration: None }, - wallet: wallet_settings_for_executor(&config), - key_management: config.kms_config.clone(), - testing_http: testing_http_config(&config), - } -} - -fn build_executor_deployment_settings( - config: &GeneralConfig, - blend_deployment: nomos_node::config::blend::deployment::Settings, - network_deployment: nomos_node::config::network::deployment::Settings, -) -> DeploymentSettings { - DeploymentSettings::new_custom( - blend_deployment, - network_deployment, - cryptarchia_deployment(config), - time_deployment(config), - mempool_deployment(), - ) -} - -fn build_executor_da_network_backend_settings( - config: &GeneralConfig, -) -> DaNetworkExecutorBackendSettings { - DaNetworkExecutorBackendSettings { - validator_settings: DaNetworkBackendSettings { - node_key: config.da_config.node_key.clone(), - listening_address: config.da_config.listening_address.clone(), - policy_settings: config.da_config.policy_settings.clone(), - monitor_settings: config.da_config.monitor_settings.clone(), - balancer_interval: config.da_config.balancer_interval, - redial_cooldown: config.da_config.redial_cooldown, - replication_settings: config.da_config.replication_settings, - subnets_settings: SubnetsConfig { - num_of_subnets: config.da_config.num_samples as usize, - shares_retry_limit: config.da_config.retry_shares_limit, - commitments_retry_limit: config.da_config.retry_commitments_limit, - }, - }, - num_subnets: config.da_config.num_subnets, - } -} - -fn rocks_storage_settings() -> RocksBackendSettings { - RocksBackendSettings { - db_path: "./db".into(), - read_only: false, - column_family: Some("blocks".into()), - } -} - -fn build_dispersal_backend_settings(config: &GeneralConfig) -> DispersalKZGRSBackendSettings { - DispersalKZGRSBackendSettings { - encoder_settings: EncoderSettings { - num_columns: config.da_config.num_subnets as usize, - with_cache: false, - global_params_path: config.da_config.global_params_path.clone(), - }, - dispersal_timeout: timeouts::dispersal_timeout(), - retry_cooldown: timeouts::retry_cooldown(), - retry_limit: 2, - } -} diff --git a/testing-framework/configs/src/nodes/mod.rs b/testing-framework/configs/src/nodes/mod.rs index e5d3ca3..2071991 100644 --- a/testing-framework/configs/src/nodes/mod.rs +++ b/testing-framework/configs/src/nodes/mod.rs @@ -1,5 +1,4 @@ pub(crate) mod blend; pub(crate) mod common; -pub mod executor; pub mod kms; pub mod validator; diff --git a/testing-framework/configs/src/nodes/validator.rs b/testing-framework/configs/src/nodes/validator.rs index d6e59c8..91f47ad 100644 --- a/testing-framework/configs/src/nodes/validator.rs +++ b/testing-framework/configs/src/nodes/validator.rs @@ -1,10 +1,3 @@ -use nomos_da_network_core::{ - protocols::sampling::SubnetsConfig, swarm::DAConnectionPolicySettings, -}; -use nomos_da_network_service::{ - NetworkConfig as DaNetworkConfig, api::http::ApiAdapterSettings, - backends::libp2p::common::DaNetworkBackendSettings, -}; use nomos_node::{ Config as ValidatorConfig, RocksBackendSettings, config::deployment::DeploymentSettings, }; @@ -14,9 +7,9 @@ use crate::{ nodes::{ blend::build_blend_service_config, common::{ - cryptarchia_config, cryptarchia_deployment, da_sampling_config, da_verifier_config, - http_config, mempool_config, mempool_deployment, testing_http_config, time_config, - time_deployment, tracing_settings, wallet_settings, + cryptarchia_config, cryptarchia_deployment, http_config, mempool_config, + mempool_deployment, testing_http_config, time_config, time_deployment, + tracing_settings, wallet_settings, }, }, topology::configs::GeneralConfig, @@ -36,21 +29,8 @@ pub fn create_validator_config(config: GeneralConfig) -> ValidatorConfig { blend: blend_user_config, deployment: deployment_settings, cryptarchia: cryptarchia_config(&config), - da_network: DaNetworkConfig { - backend: build_validator_da_network_backend_settings(&config), - membership: config.da_config.membership.clone(), - api_adapter_settings: ApiAdapterSettings { - api_port: config.api_config.address.port(), - is_secure: false, - }, - subnet_refresh_interval: config.da_config.subnets_refresh_interval, - subnet_threshold: config.da_config.num_samples as usize, - min_session_members: config.da_config.num_samples as usize, - }, - da_verifier: da_verifier_config(&config), tracing: tracing_settings(&config), http: http_config(&config), - da_sampling: da_sampling_config(&config), storage: rocks_storage_settings(), time: time_config(&config), mempool: mempool_config(), @@ -75,32 +55,6 @@ fn build_validator_deployment_settings( ) } -fn build_validator_da_network_backend_settings(config: &GeneralConfig) -> DaNetworkBackendSettings { - let da_policy_settings = config.da_config.policy_settings.clone(); - - DaNetworkBackendSettings { - node_key: config.da_config.node_key.clone(), - listening_address: config.da_config.listening_address.clone(), - policy_settings: DAConnectionPolicySettings { - min_dispersal_peers: 0, - min_replication_peers: da_policy_settings.min_replication_peers, - max_dispersal_failures: da_policy_settings.max_dispersal_failures, - max_sampling_failures: da_policy_settings.max_sampling_failures, - max_replication_failures: da_policy_settings.max_replication_failures, - malicious_threshold: da_policy_settings.malicious_threshold, - }, - monitor_settings: config.da_config.monitor_settings.clone(), - balancer_interval: config.da_config.balancer_interval, - redial_cooldown: config.da_config.redial_cooldown, - replication_settings: config.da_config.replication_settings, - subnets_settings: SubnetsConfig { - num_of_subnets: config.da_config.num_samples as usize, - shares_retry_limit: config.da_config.retry_shares_limit, - commitments_retry_limit: config.da_config.retry_commitments_limit, - }, - } -} - fn rocks_storage_settings() -> RocksBackendSettings { RocksBackendSettings { db_path: "./db".into(), diff --git a/testing-framework/configs/src/topology/configs/base.rs b/testing-framework/configs/src/topology/configs/base.rs index cff3da4..959efc3 100644 --- a/testing-framework/configs/src/topology/configs/base.rs +++ b/testing-framework/configs/src/topology/configs/base.rs @@ -2,8 +2,7 @@ use thiserror::Error; use super::{ blend, bootstrap, bootstrap::SHORT_PROLONGED_BOOTSTRAP_PERIOD, consensus, - consensus::ConsensusParams, da, da::DaParams, network, network::NetworkParams, - wallet::WalletConfig, + consensus::ConsensusParams, network, network::NetworkParams, wallet::WalletConfig, }; #[derive(Debug, Error)] @@ -11,15 +10,12 @@ pub enum BaseConfigError { #[error(transparent)] Consensus(#[from] consensus::ConsensusConfigError), #[error(transparent)] - Da(#[from] da::DaConfigError), - #[error(transparent)] Network(#[from] network::NetworkConfigError), } pub struct BaseConfigs { pub consensus_configs: Vec, pub bootstrap_configs: Vec, - pub da_configs: Vec, pub network_configs: Vec, pub blend_configs: Vec, } @@ -27,10 +23,8 @@ pub struct BaseConfigs { pub fn build_base_configs( ids: &[[u8; 32]], consensus_params: &ConsensusParams, - da_params: &DaParams, network_params: &NetworkParams, wallet_config: &WalletConfig, - da_ports: &[u16], blend_ports: &[u16], ) -> Result { Ok(BaseConfigs { @@ -43,7 +37,6 @@ pub fn build_base_configs( ids, SHORT_PROLONGED_BOOTSTRAP_PERIOD, ), - da_configs: da::try_create_da_configs(ids, da_params, da_ports)?, network_configs: network::create_network_configs(ids, network_params)?, blend_configs: blend::create_blend_configs(ids, blend_ports), }) diff --git a/testing-framework/configs/src/topology/configs/consensus.rs b/testing-framework/configs/src/topology/configs/consensus.rs index 8b2ae6c..0a61005 100644 --- a/testing-framework/configs/src/topology/configs/consensus.rs +++ b/testing-framework/configs/src/topology/configs/consensus.rs @@ -103,7 +103,6 @@ pub struct GeneralConsensusConfig { pub genesis_tx: GenesisTx, pub utxos: Vec, pub blend_notes: Vec, - pub da_notes: Vec, pub wallet_accounts: Vec, } @@ -166,28 +165,16 @@ fn build_ledger_config( }, sdp_config: nomos_ledger::mantle::sdp::Config { service_params: Arc::new( - [ - ( - ServiceType::BlendNetwork, - ServiceParameters { - lock_period: 10, - inactivity_period: 20, - retention_period: 100, - timestamp: 0, - session_duration: 1000, - }, - ), - ( - ServiceType::DataAvailability, - ServiceParameters { - lock_period: 10, - inactivity_period: 20, - retention_period: 100, - timestamp: 0, - session_duration: 1000, - }, - ), - ] + [( + ServiceType::BlendNetwork, + ServiceParameters { + lock_period: 10, + inactivity_period: 20, + retention_period: 100, + timestamp: 0, + session_duration: 1000, + }, + )] .into(), ), min_stake: nomos_core::sdp::MinStake { @@ -218,14 +205,8 @@ pub fn create_consensus_configs( ) -> Result, ConsensusConfigError> { let mut leader_keys = Vec::new(); let mut blend_notes = Vec::new(); - let mut da_notes = Vec::new(); - let utxos = create_utxos_for_leader_and_services( - ids, - &mut leader_keys, - &mut blend_notes, - &mut da_notes, - ); + let utxos = create_utxos_for_leader_and_services(ids, &mut leader_keys, &mut blend_notes); let utxos = append_wallet_utxos(utxos, wallet); let genesis_tx = create_genesis_tx(&utxos)?; let ledger_config = build_ledger_config(consensus_params)?; @@ -237,7 +218,6 @@ pub fn create_consensus_configs( ledger_config: ledger_config.clone(), genesis_tx: genesis_tx.clone(), utxos: utxos.clone(), - da_notes: da_notes.clone(), blend_notes: blend_notes.clone(), wallet_accounts: wallet.accounts.clone(), }) @@ -248,7 +228,6 @@ fn create_utxos_for_leader_and_services( ids: &[[u8; 32]], leader_keys: &mut Vec<(ZkPublicKey, UnsecuredZkKey)>, blend_notes: &mut Vec, - da_notes: &mut Vec, ) -> Vec { let mut utxos = Vec::new(); @@ -258,7 +237,6 @@ fn create_utxos_for_leader_and_services( // Create notes for leader, Blend and DA declarations. for &id in ids { output_index = push_leader_utxo(id, leader_keys, &mut utxos, output_index); - output_index = push_service_note(b"da", id, da_notes, &mut utxos, output_index); output_index = push_service_note(b"bn", id, blend_notes, &mut utxos, output_index); } diff --git a/testing-framework/configs/src/topology/configs/da.rs b/testing-framework/configs/src/topology/configs/da.rs deleted file mode 100644 index b06a6e7..0000000 --- a/testing-framework/configs/src/topology/configs/da.rs +++ /dev/null @@ -1,353 +0,0 @@ -use std::{ - collections::{HashMap, HashSet}, - env, io, - path::{Path, PathBuf}, - process, - str::FromStr as _, - sync::LazyLock, - time::Duration, -}; - -use key_management_system_service::keys::{Ed25519Key, ZkKey}; -use nomos_core::sdp::SessionNumber; -use nomos_da_network_core::swarm::{ - DAConnectionMonitorSettings, DAConnectionPolicySettings, ReplicationConfig, -}; -use nomos_libp2p::{Multiaddr, PeerId, ed25519}; -use nomos_node::LogosBlockchainDaMembership; -use num_bigint::BigUint; -use rand::random; -use subnetworks_assignations::{MembershipCreator as _, MembershipHandler as _}; -use testing_framework_env as tf_env; -use thiserror::Error; -use tracing::warn; - -use crate::{constants::DEFAULT_KZG_HOST_DIR, secret_key_to_peer_id}; - -pub static GLOBAL_PARAMS_PATH: LazyLock = LazyLock::new(resolve_global_params_path); - -const DEFAULT_OLD_BLOBS_CHECK_INTERVAL: Duration = Duration::from_secs(5); -const DEFAULT_BLOBS_VALIDITY_DURATION: Duration = Duration::from_secs(60); -const DEFAULT_FAILURE_TIME_WINDOW: Duration = Duration::from_secs(5); -const DEFAULT_BALANCER_INTERVAL: Duration = Duration::from_secs(1); -const DEFAULT_SEEN_MESSAGE_TTL: Duration = Duration::from_secs(3600); -const DEFAULT_SUBNETS_REFRESH_INTERVAL: Duration = Duration::from_secs(30); - -fn canonicalize_params_path(mut path: PathBuf) -> PathBuf { - if path.is_dir() { - let candidates = [ - path.join("kzgrs_test_params"), - path.join("pol/proving_key.zkey"), - path.join("proving_key.zkey"), - ]; - if let Some(file) = candidates.iter().find(|p| p.is_file()) { - return file.clone(); - } - } - if let Ok(resolved) = path.canonicalize() { - path = resolved; - } - path -} - -fn resolve_global_params_path() -> String { - if let Some(path) = tf_env::nomos_kzgrs_params_path() { - return canonicalize_params_path(PathBuf::from(path)) - .to_string_lossy() - .to_string(); - } - - let workspace_root = env::var("CARGO_WORKSPACE_DIR") - .map(PathBuf::from) - .ok() - .or_else(|| { - PathBuf::from(env!("CARGO_MANIFEST_DIR")) - .parent() - .and_then(Path::parent) - .map(Path::to_path_buf) - }) - .unwrap_or_else(|| PathBuf::from(env!("CARGO_MANIFEST_DIR"))); - - let params_path = canonicalize_params_path( - workspace_root.join( - testing_framework_env::nomos_kzg_dir_rel() - .unwrap_or_else(|| DEFAULT_KZG_HOST_DIR.to_string()), - ), - ); - match params_path.canonicalize() { - Ok(path) => path.to_string_lossy().to_string(), - Err(err) => { - warn!( - ?err, - path = %params_path.display(), - "falling back to non-canonical KZG params path; set LOGOS_BLOCKCHAIN_KZGRS_PARAMS_PATH to override" - ); - params_path.to_string_lossy().to_string() - } - } -} - -#[derive(Clone)] -pub struct DaParams { - pub subnetwork_size: usize, - pub dispersal_factor: usize, - pub num_samples: u16, - pub num_subnets: u16, - pub old_blobs_check_interval: Duration, - pub blobs_validity_duration: Duration, - pub global_params_path: String, - pub policy_settings: DAConnectionPolicySettings, - pub monitor_settings: DAConnectionMonitorSettings, - pub balancer_interval: Duration, - pub redial_cooldown: Duration, - pub replication_settings: ReplicationConfig, - pub subnets_refresh_interval: Duration, - pub retry_shares_limit: usize, - pub retry_commitments_limit: usize, -} - -impl Default for DaParams { - fn default() -> Self { - Self { - subnetwork_size: 2, - dispersal_factor: 1, - num_samples: 1, - num_subnets: 2, - old_blobs_check_interval: DEFAULT_OLD_BLOBS_CHECK_INTERVAL, - blobs_validity_duration: DEFAULT_BLOBS_VALIDITY_DURATION, - global_params_path: GLOBAL_PARAMS_PATH.to_string(), - policy_settings: DAConnectionPolicySettings { - min_dispersal_peers: 1, - min_replication_peers: 1, - max_dispersal_failures: 0, - max_sampling_failures: 0, - max_replication_failures: 0, - malicious_threshold: 0, - }, - monitor_settings: DAConnectionMonitorSettings { - failure_time_window: DEFAULT_FAILURE_TIME_WINDOW, - ..Default::default() - }, - balancer_interval: DEFAULT_BALANCER_INTERVAL, - redial_cooldown: Duration::ZERO, - replication_settings: ReplicationConfig { - seen_message_cache_size: 1000, - seen_message_ttl: DEFAULT_SEEN_MESSAGE_TTL, - }, - subnets_refresh_interval: DEFAULT_SUBNETS_REFRESH_INTERVAL, - retry_shares_limit: 1, - retry_commitments_limit: 1, - } - } -} - -#[derive(Debug, Clone)] -pub struct GeneralDaConfig { - pub node_key: ed25519::SecretKey, - pub signer: Ed25519Key, - pub peer_id: PeerId, - pub membership: LogosBlockchainDaMembership, - pub listening_address: Multiaddr, - pub blob_storage_directory: PathBuf, - pub global_params_path: String, - pub verifier_sk: String, - pub verifier_index: HashSet, - pub num_samples: u16, - pub num_subnets: u16, - pub old_blobs_check_interval: Duration, - pub blobs_validity_duration: Duration, - pub policy_settings: DAConnectionPolicySettings, - pub monitor_settings: DAConnectionMonitorSettings, - pub balancer_interval: Duration, - pub redial_cooldown: Duration, - pub replication_settings: ReplicationConfig, - pub subnets_refresh_interval: Duration, - pub retry_shares_limit: usize, - pub retry_commitments_limit: usize, - pub secret_zk_key: ZkKey, -} - -#[derive(Debug, Error)] -pub enum DaConfigError { - #[error("DA ports length mismatch (ids={ids}, ports={ports})")] - PortsLenMismatch { ids: usize, ports: usize }, - #[error( - "DA subnetwork size too large for u16 subnetwork ids (effective_subnetwork_size={effective_subnetwork_size}, max={max})" - )] - SubnetworkTooLarge { - effective_subnetwork_size: usize, - max: usize, - }, - #[error("failed to derive node key from bytes: {message}")] - NodeKeyFromBytes { message: String }, - #[error("failed to create DA listening address for port {port}: {message}")] - ListeningAddress { port: u16, message: String }, - #[error("failed to create blob storage directory at {path}: {source}")] - BlobStorageCreate { - path: PathBuf, - #[source] - source: io::Error, - }, - #[error("failed to generate verifier secret key: {message}")] - VerifierKeyGen { message: String }, -} - -pub fn try_create_da_configs( - ids: &[[u8; 32]], - da_params: &DaParams, - ports: &[u16], -) -> Result, DaConfigError> { - // Let the subnetwork size track the participant count so tiny local topologies - // can form a membership. - let effective_subnetwork_size = da_params.subnetwork_size.max(ids.len().max(1)); - let max_subnetworks = u16::MAX as usize + 1; - if effective_subnetwork_size > max_subnetworks { - return Err(DaConfigError::SubnetworkTooLarge { - effective_subnetwork_size, - max: max_subnetworks, - }); - } - if ports.len() < ids.len() { - return Err(DaConfigError::PortsLenMismatch { - ids: ids.len(), - ports: ports.len(), - }); - } - let mut node_keys = Vec::with_capacity(ids.len()); - let mut peer_ids = Vec::with_capacity(ids.len()); - let mut listening_addresses = Vec::with_capacity(ids.len()); - - for (index, id) in ids.iter().enumerate() { - let mut node_key_bytes = *id; - let node_key = ed25519::SecretKey::try_from_bytes(&mut node_key_bytes).map_err(|err| { - DaConfigError::NodeKeyFromBytes { - message: err.to_string(), - } - })?; - node_keys.push(node_key.clone()); - - let peer_id = secret_key_to_peer_id(node_key); - peer_ids.push(peer_id); - - let port = ports[index]; - let listening_address = Multiaddr::from_str(&format!("/ip4/127.0.0.1/udp/{port}/quic-v1",)) - .map_err(|err| DaConfigError::ListeningAddress { - port, - message: err.to_string(), - })?; - listening_addresses.push(listening_address); - } - - let membership = { - let template = LogosBlockchainDaMembership::new( - SessionNumber::default(), - effective_subnetwork_size, - da_params.dispersal_factor, - ); - let mut assignations: HashMap> = HashMap::new(); - if peer_ids.is_empty() { - for id in 0..effective_subnetwork_size { - assignations.insert(id as u16, HashSet::new()); - } - } else { - let mut sorted_peers = peer_ids.clone(); - sorted_peers.sort_unstable(); - let dispersal = da_params.dispersal_factor.max(1); - let mut peer_cycle = sorted_peers.iter().cycle(); - for id in 0..effective_subnetwork_size { - let mut members = HashSet::new(); - for _ in 0..dispersal { - // cycle() only yields None when the iterator is empty, which we guard against. - if let Some(peer) = peer_cycle.next() { - members.insert(*peer); - } - } - assignations.insert(id as u16, members); - } - } - - template.init(SessionNumber::default(), assignations) - }; - - let mut configs = Vec::with_capacity(ids.len()); - - for ((index, id), node_key) in ids.iter().enumerate().zip(node_keys.into_iter()) { - let blob_storage_directory = env::temp_dir().join(format!( - "nomos-da-blob-{}-{index}-{}", - process::id(), - random::() - )); - std::fs::create_dir_all(&blob_storage_directory).map_err(|source| { - DaConfigError::BlobStorageCreate { - path: blob_storage_directory.clone(), - source, - } - })?; - - let verifier_sk = blst::min_sig::SecretKey::key_gen(id, &[]).map_err(|err| { - DaConfigError::VerifierKeyGen { - message: format!("{err:?}"), - } - })?; - let verifier_sk_bytes = verifier_sk.to_bytes(); - - let peer_id = peer_ids[index]; - let signer = Ed25519Key::from_bytes(id); - let subnetwork_ids = membership.membership(&peer_id); - - let secret_zk_key = ZkKey::from(BigUint::from_bytes_le(signer.public_key().as_bytes())); - - configs.push(GeneralDaConfig { - node_key, - signer, - peer_id, - secret_zk_key, - membership: membership.clone(), - listening_address: listening_addresses[index].clone(), - blob_storage_directory, - global_params_path: da_params.global_params_path.clone(), - verifier_sk: hex::encode(verifier_sk_bytes), - verifier_index: subnetwork_ids, - num_samples: da_params.num_samples, - num_subnets: da_params.num_subnets, - old_blobs_check_interval: da_params.old_blobs_check_interval, - blobs_validity_duration: da_params.blobs_validity_duration, - policy_settings: da_params.policy_settings.clone(), - monitor_settings: da_params.monitor_settings.clone(), - balancer_interval: da_params.balancer_interval, - redial_cooldown: da_params.redial_cooldown, - replication_settings: da_params.replication_settings, - subnets_refresh_interval: da_params.subnets_refresh_interval, - retry_shares_limit: da_params.retry_shares_limit, - retry_commitments_limit: da_params.retry_commitments_limit, - }); - } - - Ok(configs) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn try_create_da_configs_rejects_subnetwork_overflow() { - let ids = vec![[1u8; 32]]; - let ports = vec![12345u16]; - let mut params = DaParams::default(); - params.subnetwork_size = u16::MAX as usize + 2; - - let err = try_create_da_configs(&ids, ¶ms, &ports).unwrap_err(); - assert!(matches!(err, DaConfigError::SubnetworkTooLarge { .. })); - } - - #[test] - fn try_create_da_configs_rejects_port_mismatch() { - let ids = vec![[1u8; 32], [2u8; 32]]; - let ports = vec![12345u16]; - let params = DaParams::default(); - - let err = try_create_da_configs(&ids, ¶ms, &ports).unwrap_err(); - assert!(matches!(err, DaConfigError::PortsLenMismatch { .. })); - } -} diff --git a/testing-framework/configs/src/topology/configs/mod.rs b/testing-framework/configs/src/topology/configs/mod.rs index b328316..6073bbe 100644 --- a/testing-framework/configs/src/topology/configs/mod.rs +++ b/testing-framework/configs/src/topology/configs/mod.rs @@ -3,7 +3,6 @@ pub mod base; pub mod blend; pub mod bootstrap; pub mod consensus; -pub mod da; pub mod network; pub mod runtime; pub mod time; @@ -16,7 +15,6 @@ use blend::GeneralBlendConfig; use consensus::{ ConsensusConfigError, GeneralConsensusConfig, ProviderInfo, create_genesis_tx_with_declarations, }; -use da::GeneralDaConfig; use key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; use network::GeneralNetworkConfig; use nomos_core::{ @@ -35,7 +33,6 @@ use crate::{ api::GeneralApiConfig, bootstrap::{GeneralBootstrapConfig, SHORT_PROLONGED_BOOTSTRAP_PERIOD}, consensus::ConsensusParams, - da::DaParams, network::NetworkParams, time::GeneralTimeConfig, }, @@ -61,8 +58,6 @@ pub enum GeneralConfigError { #[error(transparent)] Network(#[from] network::NetworkConfigError), #[error(transparent)] - Da(#[from] da::DaConfigError), - #[error(transparent)] Api(#[from] api::ApiConfigError), } @@ -71,7 +66,6 @@ pub struct GeneralConfig { pub api_config: GeneralApiConfig, pub consensus_config: GeneralConsensusConfig, pub bootstrapping_config: GeneralBootstrapConfig, - pub da_config: GeneralDaConfig, pub network_config: GeneralNetworkConfig, pub blend_config: GeneralBlendConfig, pub tracing_config: GeneralTracingConfig, @@ -99,9 +93,9 @@ pub fn create_general_configs_with_blend_core_subset( ) -> Result, GeneralConfigError> { validate_node_counts(n_nodes, n_blend_core_nodes)?; - let (ids, da_ports, blend_ports) = generate_ids_and_ports(n_nodes)?; + let (ids, blend_ports) = generate_ids_and_ports(n_nodes)?; - validate_generated_vectors(n_nodes, &ids, &da_ports, &blend_ports)?; + validate_generated_vectors(n_nodes, &ids, &blend_ports)?; let consensus_params = ConsensusParams::default_for_participants(n_nodes); let mut consensus_configs = @@ -109,7 +103,6 @@ pub fn create_general_configs_with_blend_core_subset( let bootstrap_config = bootstrap::create_bootstrap_configs(&ids, SHORT_PROLONGED_BOOTSTRAP_PERIOD); let network_configs = network::create_network_configs(&ids, network_params)?; - let da_configs = da::try_create_da_configs(&ids, &DaParams::default(), &da_ports)?; let api_configs = api::create_api_configs(&ids)?; let blend_configs = blend::create_blend_configs(&ids, &blend_ports); let tracing_configs = tracing::create_tracing_configs(&ids); @@ -133,7 +126,6 @@ pub fn create_general_configs_with_blend_core_subset( &api_configs, &consensus_configs, &bootstrap_config, - &da_configs, &network_configs, &blend_configs, &tracing_configs, @@ -160,29 +152,22 @@ fn validate_node_counts( Ok(()) } -fn generate_ids_and_ports( - n_nodes: usize, -) -> Result<(Vec<[u8; 32]>, Vec, Vec), GeneralConfigError> { +fn generate_ids_and_ports(n_nodes: usize) -> Result<(Vec<[u8; 32]>, Vec), GeneralConfigError> { // Blend relies on each node declaring a different ZK public key, so we need // different IDs to generate different keys. let mut ids: Vec<_> = (0..n_nodes).map(|i| [i as u8; 32]).collect(); - let mut da_ports = Vec::with_capacity(n_nodes); let mut blend_ports = Vec::with_capacity(n_nodes); for id in &mut ids { thread_rng().fill(id); - da_ports.push( - get_available_udp_port() - .ok_or(GeneralConfigError::PortAllocationFailed { label: "DA" })?, - ); blend_ports.push( get_available_udp_port() .ok_or(GeneralConfigError::PortAllocationFailed { label: "Blend" })?, ); } - Ok((ids, da_ports, blend_ports)) + Ok((ids, blend_ports)) } fn collect_blend_core_providers( @@ -250,7 +235,6 @@ fn build_general_configs( api_configs: &[GeneralApiConfig], consensus_configs: &[GeneralConsensusConfig], bootstrap_config: &[GeneralBootstrapConfig], - da_configs: &[GeneralDaConfig], network_configs: &[GeneralNetworkConfig], blend_configs: &[GeneralBlendConfig], tracing_configs: &[GeneralTracingConfig], @@ -263,7 +247,6 @@ fn build_general_configs( let api_config = get_cloned_or_empty(api_configs, i)?; let consensus_config = get_cloned_or_empty(consensus_configs, i)?; let bootstrapping_config = get_cloned_or_empty(bootstrap_config, i)?; - let da_config = get_cloned_or_empty(da_configs, i)?; let network_config = get_cloned_or_empty(network_configs, i)?; let blend_config = get_cloned_or_empty(blend_configs, i)?; let tracing_config = get_cloned_or_empty(tracing_configs, i)?; @@ -273,7 +256,6 @@ fn build_general_configs( api_config, consensus_config, bootstrapping_config, - da_config, network_config, blend_config, tracing_config, diff --git a/testing-framework/configs/src/topology/configs/runtime.rs b/testing-framework/configs/src/topology/configs/runtime.rs index cdd1fde..7468ac7 100644 --- a/testing-framework/configs/src/topology/configs/runtime.rs +++ b/testing-framework/configs/src/topology/configs/runtime.rs @@ -9,8 +9,6 @@ use crate::{ topology::configs::{ GeneralConfig, GeneralConfigError, api, blend, bootstrap, consensus, consensus::{ConsensusParams, GeneralConsensusConfig}, - da, - da::DaParams, network, network::{Libp2pNetworkLayout, NetworkParams}, time, tracing, @@ -22,10 +20,8 @@ pub fn build_general_config_for_node( id: [u8; 32], network_port: u16, initial_peers: Vec, - da_port: u16, blend_port: u16, consensus_params: &ConsensusParams, - da_params: &DaParams, wallet_config: &WalletConfig, base_consensus: &GeneralConsensusConfig, time_config: &time::GeneralTimeConfig, @@ -39,11 +35,6 @@ pub fn build_general_config_for_node( .next() .ok_or(GeneralConfigError::EmptyParticipants)?; - let da_config = da::try_create_da_configs(&[id], da_params, &[da_port])? - .into_iter() - .next() - .ok_or(GeneralConfigError::EmptyParticipants)?; - let blend_config = blend::create_blend_configs(&[id], &[blend_port]) .into_iter() .next() @@ -61,12 +52,11 @@ pub fn build_general_config_for_node( .next() .ok_or(GeneralConfigError::EmptyParticipants)?; - let kms_config = build_kms_config_for_node(&blend_config, &da_config, wallet_config); + let kms_config = build_kms_config_for_node(&blend_config, wallet_config); Ok(GeneralConfig { consensus_config, bootstrapping_config: bootstrap_config, - da_config, network_config, blend_config, api_config, @@ -89,7 +79,6 @@ pub fn build_consensus_config_for_node( config.genesis_tx = base.genesis_tx.clone(); config.utxos = base.utxos.clone(); - config.da_notes = base.da_notes.clone(); config.blend_notes = base.blend_notes.clone(); config.wallet_accounts = base.wallet_accounts.clone(); @@ -115,7 +104,6 @@ pub fn build_initial_peers(network_params: &NetworkParams, peer_ports: &[u16]) - fn build_kms_config_for_node( blend_config: &blend::GeneralBlendConfig, - da_config: &da::GeneralDaConfig, wallet_config: &WalletConfig, ) -> PreloadKMSBackendSettings { let mut keys = HashMap::from([ @@ -127,14 +115,6 @@ fn build_kms_config_for_node( key_id_for_preload_backend(&Key::Zk(blend_config.secret_zk_key.clone())), Key::Zk(blend_config.secret_zk_key.clone()), ), - ( - key_id_for_preload_backend(&Key::Ed25519(da_config.signer.clone())), - Key::Ed25519(da_config.signer.clone()), - ), - ( - key_id_for_preload_backend(&Key::Zk(da_config.secret_zk_key.clone())), - Key::Zk(da_config.secret_zk_key.clone()), - ), ]); for account in &wallet_config.accounts { diff --git a/testing-framework/configs/src/topology/invariants.rs b/testing-framework/configs/src/topology/invariants.rs index abbe028..7b02618 100644 --- a/testing-framework/configs/src/topology/invariants.rs +++ b/testing-framework/configs/src/topology/invariants.rs @@ -19,7 +19,6 @@ pub enum TopologyInvariantError { pub fn validate_node_vectors( participants: usize, ids: Option<&Vec<[u8; 32]>>, - da_ports: Option<&Vec>, blend_ports: Option<&Vec>, ) -> Result<(), TopologyInvariantError> { if participants == 0 { @@ -35,15 +34,6 @@ pub fn validate_node_vectors( } } - if let Some(ports) = da_ports { - if ports.len() != participants { - return Err(TopologyInvariantError::DaPortCountMismatch { - actual: ports.len(), - expected: participants, - }); - } - } - if let Some(ports) = blend_ports { if ports.len() != participants { return Err(TopologyInvariantError::BlendPortCountMismatch { @@ -59,7 +49,6 @@ pub fn validate_node_vectors( pub fn validate_generated_vectors( participants: usize, ids: &[[u8; 32]], - da_ports: &[u16], blend_ports: &[u16], ) -> Result<(), TopologyInvariantError> { if participants == 0 { @@ -73,13 +62,6 @@ pub fn validate_generated_vectors( }); } - if da_ports.len() != participants { - return Err(TopologyInvariantError::DaPortCountMismatch { - actual: da_ports.len(), - expected: participants, - }); - } - if blend_ports.len() != participants { return Err(TopologyInvariantError::BlendPortCountMismatch { actual: blend_ports.len(), diff --git a/testing-framework/core/Cargo.toml b/testing-framework/core/Cargo.toml index d255da3..ee2bb8b 100644 --- a/testing-framework/core/Cargo.toml +++ b/testing-framework/core/Cargo.toml @@ -22,22 +22,19 @@ chain-service = { workspace = true } common-http-client = { workspace = true } futures = { default-features = false, version = "0.3" } groth16 = { workspace = true } -hex = { version = "0.4.3", default-features = false } +hex = { default-features = false, version = "0.4.3" } key-management-system-service = { workspace = true } -logos-blockchain-executor = { workspace = true, default-features = false, features = ["testing", "tracing"] } nomos-core = { workspace = true } -nomos-da-network-core = { workspace = true } -nomos-da-network-service = { workspace = true } nomos-http-api-common = { workspace = true } nomos-libp2p = { workspace = true } -nomos-network = { workspace = true, features = ["libp2p"] } -nomos-node = { workspace = true, default-features = false, features = ["testing"] } +nomos-network = { features = ["libp2p"], workspace = true } +nomos-node = { default-features = false, features = ["testing"], workspace = true } nomos-tracing = { workspace = true } nomos-tracing-service = { workspace = true } nomos-utils = { workspace = true } prometheus-http-query = "0.8" rand = { workspace = true } -reqwest = { workspace = true, features = ["json"] } +reqwest = { features = ["json"], workspace = true } serde = { workspace = true } serde_json = { workspace = true } serde_with = { workspace = true } @@ -46,5 +43,5 @@ tempfile = { workspace = true } testing-framework-config = { workspace = true } testing-framework-env = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true, features = ["macros", "process", "rt-multi-thread", "time"] } +tokio = { features = ["macros", "process", "rt-multi-thread", "time"], workspace = true } tracing = { workspace = true } diff --git a/testing-framework/core/src/lib.rs b/testing-framework/core/src/lib.rs index a83c6c9..c5a6175 100644 --- a/testing-framework/core/src/lib.rs +++ b/testing-framework/core/src/lib.rs @@ -8,7 +8,6 @@ use std::{env, ops::Mul as _, sync::LazyLock, time::Duration}; pub use testing_framework_config::{ IS_DEBUG_TRACING, node_address_from_port, secret_key_to_peer_id, secret_key_to_provider_id, - topology::configs::da::GLOBAL_PARAMS_PATH, }; static IS_SLOW_TEST_ENV: LazyLock = diff --git a/testing-framework/core/src/manual.rs b/testing-framework/core/src/manual.rs index 96ff684..f609e7d 100644 --- a/testing-framework/core/src/manual.rs +++ b/testing-framework/core/src/manual.rs @@ -11,11 +11,5 @@ pub trait ManualClusterHandle: Send + Sync { options: StartNodeOptions, ) -> Result; - async fn start_executor_with( - &self, - name: &str, - options: StartNodeOptions, - ) -> Result; - async fn wait_network_ready(&self) -> Result<(), DynError>; } diff --git a/testing-framework/core/src/nodes/api_client.rs b/testing-framework/core/src/nodes/api_client.rs index d03cbe6..1fdedab 100644 --- a/testing-framework/core/src/nodes/api_client.rs +++ b/testing-framework/core/src/nodes/api_client.rs @@ -3,16 +3,12 @@ use std::net::SocketAddr; use chain_service::CryptarchiaInfo; use common_http_client::CommonHttpClient; use hex; -use nomos_core::{block::Block, da::BlobId, mantle::SignedMantleTx, sdp::SessionNumber}; -use nomos_da_network_core::swarm::{BalancerStats, MonitorStats}; -use nomos_da_network_service::MembershipResponse; +use nomos_core::{block::Block, mantle::SignedMantleTx}; use nomos_http_api_common::paths::{ - CRYPTARCHIA_HEADERS, CRYPTARCHIA_INFO, DA_BALANCER_STATS, DA_BLACKLISTED_PEERS, DA_BLOCK_PEER, - DA_GET_MEMBERSHIP, DA_HISTORIC_SAMPLING, DA_MONITOR_STATS, DA_UNBLOCK_PEER, MEMPOOL_ADD_TX, - NETWORK_INFO, STORAGE_BLOCK, + CRYPTARCHIA_HEADERS, CRYPTARCHIA_INFO, MEMPOOL_ADD_TX, NETWORK_INFO, STORAGE_BLOCK, }; use nomos_network::backends::libp2p::Libp2pInfo; -use nomos_node::{HeaderId, api::testing::handlers::HistoricSamplingRequest}; +use nomos_node::HeaderId; use reqwest::{Client, RequestBuilder, Response, Url}; use serde::{Serialize, de::DeserializeOwned}; use serde_json::Value; @@ -232,31 +228,6 @@ impl ApiClient { self.get_testing_response_checked(path).await } - /// Block a peer via the DA testing API. - pub async fn block_peer(&self, peer_id: &str) -> reqwest::Result { - self.post_json_decode(DA_BLOCK_PEER, &peer_id).await - } - - /// Unblock a peer via the DA testing API. - pub async fn unblock_peer(&self, peer_id: &str) -> reqwest::Result { - self.post_json_decode(DA_UNBLOCK_PEER, &peer_id).await - } - - /// Fetch the list of blacklisted peers. - pub async fn blacklisted_peers(&self) -> reqwest::Result> { - self.get_json(DA_BLACKLISTED_PEERS).await - } - - /// Fetch balancer stats from DA API. - pub async fn balancer_stats(&self) -> reqwest::Result { - self.get_json(DA_BALANCER_STATS).await - } - - /// Fetch monitor stats from DA API. - pub async fn monitor_stats(&self) -> reqwest::Result { - self.get_json(DA_MONITOR_STATS).await - } - /// Fetch consensus info from the base API. pub async fn consensus_info(&self) -> reqwest::Result { self.get_json(CRYPTARCHIA_INFO).await @@ -304,37 +275,6 @@ impl ApiClient { .await } - /// Query DA membership via testing API. - pub async fn da_get_membership_checked( - &self, - session_id: &SessionNumber, - ) -> Result { - self.post_testing_json_response_checked(DA_GET_MEMBERSHIP, session_id) - .await? - .error_for_status() - .map_err(ApiClientError::Request)? - .json() - .await - .map_err(ApiClientError::Request) - } - - pub async fn da_get_membership( - &self, - session_id: &SessionNumber, - ) -> Result { - self.post_testing_json_decode(DA_GET_MEMBERSHIP, session_id) - .await - } - - /// Query historic sampling via testing API. - pub async fn da_historic_sampling( - &self, - request: &HistoricSamplingRequest, - ) -> Result { - self.post_testing_json_decode(DA_HISTORIC_SAMPLING, request) - .await - } - /// Submit a mantle transaction through the base API. pub async fn submit_transaction(&self, tx: &SignedMantleTx) -> reqwest::Result<()> { let res = self.post_json_response(MEMPOOL_ADD_TX, tx).await?; diff --git a/testing-framework/core/src/nodes/executor.rs b/testing-framework/core/src/nodes/executor.rs deleted file mode 100644 index cb589ae..0000000 --- a/testing-framework/core/src/nodes/executor.rs +++ /dev/null @@ -1,111 +0,0 @@ -use std::{ - ops::Deref, - path::{Path, PathBuf}, - time::Duration, -}; - -use logos_blockchain_executor::config::Config; -use nomos_tracing_service::LoggerLayer; -pub use testing_framework_config::nodes::executor::create_executor_config; -use tracing::{debug, info}; - -use super::{persist_tempdir, should_persist_tempdir}; -use crate::{ - IS_DEBUG_TRACING, - nodes::{ - LOGS_PREFIX, - common::{ - binary::{BinaryConfig, BinaryResolver}, - lifecycle::{kill::kill_child, monitor::is_running}, - node::{NodeAddresses, NodeConfigCommon, NodeHandle, SpawnNodeError, spawn_node}, - }, - }, -}; - -const BIN_PATH: &str = "target/debug/logos-blockchain-executor"; - -fn binary_path() -> PathBuf { - let cfg = BinaryConfig { - env_var: "LOGOS_BLOCKCHAIN_EXECUTOR_BIN", - binary_name: "logos-blockchain-executor", - fallback_path: BIN_PATH, - shared_bin_subpath: "../assets/stack/bin/logos-blockchain-executor", - }; - BinaryResolver::resolve_path(&cfg) -} - -pub struct Executor { - handle: NodeHandle, -} - -impl Deref for Executor { - type Target = NodeHandle; - - fn deref(&self) -> &Self::Target { - &self.handle - } -} - -impl Drop for Executor { - fn drop(&mut self) { - if should_persist_tempdir() - && let Err(e) = persist_tempdir(&mut self.handle.tempdir, "logos-blockchain-executor") - { - debug!(error = ?e, "failed to persist executor tempdir"); - } - - debug!("stopping executor process"); - kill_child(&mut self.handle.child); - } -} - -impl Executor { - pub async fn spawn(config: Config, label: &str) -> Result { - let log_prefix = format!("{LOGS_PREFIX}-{label}"); - let handle = spawn_node( - config, - &log_prefix, - "executor.yaml", - binary_path(), - !*IS_DEBUG_TRACING, - ) - .await?; - - info!("executor spawned and ready"); - - Ok(Self { handle }) - } - - /// Check if the executor process is still running - pub fn is_running(&mut self) -> bool { - is_running(&mut self.handle.child) - } - - /// Wait for the executor process to exit, with a timeout. - pub async fn wait_for_exit(&mut self, timeout: Duration) -> bool { - self.handle.wait_for_exit(timeout).await - } -} - -impl NodeConfigCommon for Config { - fn set_logger(&mut self, logger: LoggerLayer) { - self.tracing.logger = logger; - } - - fn set_paths(&mut self, base: &Path) { - self.storage.db_path = base.join("db"); - base.clone_into( - &mut self - .da_verifier - .storage_adapter_settings - .blob_storage_directory, - ); - } - - fn addresses(&self) -> NodeAddresses { - ( - self.http.backend_settings.address, - Some(self.testing_http.backend_settings.address), - ) - } -} diff --git a/testing-framework/core/src/nodes/mod.rs b/testing-framework/core/src/nodes/mod.rs index 9793647..781202e 100644 --- a/testing-framework/core/src/nodes/mod.rs +++ b/testing-framework/core/src/nodes/mod.rs @@ -1,6 +1,5 @@ mod api_client; pub mod common; -pub mod executor; pub mod validator; use std::sync::LazyLock; diff --git a/testing-framework/core/src/nodes/validator.rs b/testing-framework/core/src/nodes/validator.rs index c183e0b..03ac59b 100644 --- a/testing-framework/core/src/nodes/validator.rs +++ b/testing-framework/core/src/nodes/validator.rs @@ -96,12 +96,6 @@ impl NodeConfigCommon for Config { fn set_paths(&mut self, base: &std::path::Path) { self.storage.db_path = base.join("db"); - base.clone_into( - &mut self - .da_verifier - .storage_adapter_settings - .blob_storage_directory, - ); } fn addresses(&self) -> NodeAddresses { diff --git a/testing-framework/core/src/scenario/capabilities.rs b/testing-framework/core/src/scenario/capabilities.rs index d6784bc..b0c52b2 100644 --- a/testing-framework/core/src/scenario/capabilities.rs +++ b/testing-framework/core/src/scenario/capabilities.rs @@ -71,16 +71,10 @@ impl RequiresNodeControl for ObservabilityCapability { pub trait NodeControlHandle: Send + Sync { async fn restart_validator(&self, index: usize) -> Result<(), DynError>; - async fn restart_executor(&self, index: usize) -> Result<(), DynError>; - async fn start_validator(&self, _name: &str) -> Result { Err("start_validator not supported by this deployer".into()) } - async fn start_executor(&self, _name: &str) -> Result { - Err("start_executor not supported by this deployer".into()) - } - async fn start_validator_with( &self, _name: &str, @@ -89,14 +83,6 @@ pub trait NodeControlHandle: Send + Sync { Err("start_validator_with not supported by this deployer".into()) } - async fn start_executor_with( - &self, - _name: &str, - _options: StartNodeOptions, - ) -> Result { - Err("start_executor_with not supported by this deployer".into()) - } - fn node_client(&self, _name: &str) -> Option { None } diff --git a/testing-framework/core/src/scenario/cfgsync.rs b/testing-framework/core/src/scenario/cfgsync.rs index 43dc888..6ebe989 100644 --- a/testing-framework/core/src/scenario/cfgsync.rs +++ b/testing-framework/core/src/scenario/cfgsync.rs @@ -1,7 +1,6 @@ use std::{fs::File, num::NonZero, path::Path, time::Duration}; use anyhow::{Context as _, Result}; -use nomos_da_network_core::swarm::ReplicationConfig; use nomos_tracing_service::TracingSettings; use nomos_utils::bounded_duration::{MinimalBoundedDuration, SECOND}; use serde::{Deserialize, Serialize}; @@ -24,8 +23,6 @@ pub struct CfgSyncConfig { #[serde(default)] pub ids: Option>, #[serde(default)] - pub da_ports: Option>, - #[serde(default)] pub blend_ports: Option>, pub subnetwork_size: usize, pub dispersal_factor: usize, @@ -42,7 +39,6 @@ pub struct CfgSyncConfig { pub monitor_failure_time_window: Duration, #[serde_as(as = "MinimalBoundedDuration<0, SECOND>")] pub balancer_interval: Duration, - pub replication_settings: ReplicationConfig, pub retry_shares_limit: usize, pub retry_commitments_limit: usize, pub tracing_settings: TracingSettings, @@ -76,11 +72,9 @@ pub fn apply_topology_overrides( ) { debug!( validators = topology.validators().len(), - executors = topology.executors().len(), - use_kzg_mount, - "applying topology overrides to cfgsync config" + use_kzg_mount, "applying topology overrides to cfgsync config" ); - let hosts = topology.validators().len() + topology.executors().len(); + let hosts = topology.validators().len(); cfg.n_hosts = hosts; let consensus = &topology.config().consensus_params; @@ -90,30 +84,13 @@ pub fn apply_topology_overrides( let config = topology.config(); cfg.wallet = config.wallet_config.clone(); cfg.ids = Some(topology.nodes().map(|node| node.id).collect()); - cfg.da_ports = Some(topology.nodes().map(|node| node.da_port).collect()); cfg.blend_ports = Some(topology.nodes().map(|node| node.blend_port).collect()); - let da = &config.da_params; - cfg.subnetwork_size = da.subnetwork_size; - cfg.dispersal_factor = da.dispersal_factor; - cfg.num_samples = da.num_samples; - cfg.num_subnets = da.num_subnets; - cfg.old_blobs_check_interval = da.old_blobs_check_interval; - cfg.blobs_validity_duration = da.blobs_validity_duration; - cfg.global_params_path = if use_kzg_mount { + if use_kzg_mount { // Compose mounts the bundle at /kzgrs_test_params; the proving key lives under // pol/. - kzg_container_path() - } else { - da.global_params_path.clone() + cfg.global_params_path = kzg_container_path() }; - cfg.min_dispersal_peers = da.policy_settings.min_dispersal_peers; - cfg.min_replication_peers = da.policy_settings.min_replication_peers; - cfg.monitor_failure_time_window = da.monitor_settings.failure_time_window; - cfg.balancer_interval = da.balancer_interval; - cfg.replication_settings = da.replication_settings; - cfg.retry_shares_limit = da.retry_shares_limit; - cfg.retry_commitments_limit = da.retry_commitments_limit; } #[serde_as] @@ -128,8 +105,6 @@ struct SerializableCfgSyncConfig { #[serde(skip_serializing_if = "Option::is_none")] ids: Option>, #[serde(skip_serializing_if = "Option::is_none")] - da_ports: Option>, - #[serde(skip_serializing_if = "Option::is_none")] blend_ports: Option>, subnetwork_size: usize, dispersal_factor: usize, @@ -146,7 +121,6 @@ struct SerializableCfgSyncConfig { monitor_failure_time_window: Duration, #[serde_as(as = "MinimalBoundedDuration<0, SECOND>")] balancer_interval: Duration, - replication_settings: ReplicationConfig, retry_shares_limit: usize, retry_commitments_limit: usize, tracing_settings: TracingSettings, @@ -162,7 +136,6 @@ impl From<&CfgSyncConfig> for SerializableCfgSyncConfig { active_slot_coeff: cfg.active_slot_coeff, wallet: cfg.wallet.clone(), ids: cfg.ids.clone(), - da_ports: cfg.da_ports.clone(), blend_ports: cfg.blend_ports.clone(), subnetwork_size: cfg.subnetwork_size, dispersal_factor: cfg.dispersal_factor, @@ -175,7 +148,6 @@ impl From<&CfgSyncConfig> for SerializableCfgSyncConfig { min_replication_peers: cfg.min_replication_peers, monitor_failure_time_window: cfg.monitor_failure_time_window, balancer_interval: cfg.balancer_interval, - replication_settings: cfg.replication_settings, retry_shares_limit: cfg.retry_shares_limit, retry_commitments_limit: cfg.retry_commitments_limit, tracing_settings: cfg.tracing_settings.clone(), diff --git a/testing-framework/core/src/scenario/definition.rs b/testing-framework/core/src/scenario/definition.rs index f2c4e32..cc13e5e 100644 --- a/testing-framework/core/src/scenario/definition.rs +++ b/testing-framework/core/src/scenario/definition.rs @@ -105,7 +105,6 @@ pub type ScenarioBuilder = Builder<()>; pub struct TopologyConfigurator { builder: Builder, validators: usize, - executors: usize, network_star: bool, } @@ -124,14 +123,14 @@ impl Builder { } #[must_use] - pub fn with_node_counts(validators: usize, executors: usize) -> Self { + pub fn with_node_counts(validators: usize) -> Self { Self::new(TopologyBuilder::new(TopologyConfig::with_node_numbers( - validators, executors, + validators, ))) } /// Convenience constructor that immediately enters topology configuration, - /// letting callers set counts via `validators`/`executors`. + /// letting callers set counts via `validators`. pub fn topology() -> TopologyConfigurator { TopologyConfigurator::new(Self::new(TopologyBuilder::new(TopologyConfig::empty()))) } @@ -264,7 +263,6 @@ impl Builder { info!( validators = generated.validators().len(), - executors = generated.executors().len(), duration_secs = duration.as_secs(), workloads = workloads.len(), expectations = expectations.len(), @@ -286,7 +284,6 @@ impl TopologyConfigurator { Self { builder, validators: 0, - executors: 0, network_star: false, } } @@ -298,13 +295,6 @@ impl TopologyConfigurator { self } - /// Set the number of executor nodes. - #[must_use] - pub fn executors(mut self, count: usize) -> Self { - self.executors = count; - self - } - /// Use a star libp2p network layout. #[must_use] pub fn network_star(mut self) -> Self { @@ -315,7 +305,7 @@ impl TopologyConfigurator { /// Finalize and return the underlying scenario builder. #[must_use] pub fn apply(self) -> Builder { - let mut config = TopologyConfig::with_node_numbers(self.validators, self.executors); + let mut config = TopologyConfig::with_node_numbers(self.validators); if self.network_star { config.network_params.libp2p_network_layout = Libp2pNetworkLayout::Star; } diff --git a/testing-framework/core/src/scenario/http_probe.rs b/testing-framework/core/src/scenario/http_probe.rs index be67bf3..4838397 100644 --- a/testing-framework/core/src/scenario/http_probe.rs +++ b/testing-framework/core/src/scenario/http_probe.rs @@ -11,7 +11,6 @@ use tracing::{debug, info}; #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum NodeRole { Validator, - Executor, } impl NodeRole { @@ -19,7 +18,6 @@ impl NodeRole { pub const fn label(self) -> &'static str { match self { Self::Validator => "validator", - Self::Executor => "executor", } } } diff --git a/testing-framework/core/src/scenario/runtime/node_clients.rs b/testing-framework/core/src/scenario/runtime/node_clients.rs index aae6724..f118061 100644 --- a/testing-framework/core/src/scenario/runtime/node_clients.rs +++ b/testing-framework/core/src/scenario/runtime/node_clients.rs @@ -11,7 +11,7 @@ use crate::{ topology::{deployment::Topology, generation::GeneratedTopology}, }; -/// Collection of API clients for the validator and executor set. +/// Collection of API clients for the validatorset. #[derive(Clone, Default)] pub struct NodeClients { inner: Arc>, @@ -20,18 +20,14 @@ pub struct NodeClients { #[derive(Default)] struct NodeClientsInner { validators: Vec, - executors: Vec, } impl NodeClients { #[must_use] /// Build clients from preconstructed vectors. - pub fn new(validators: Vec, executors: Vec) -> Self { + pub fn new(validators: Vec) -> Self { Self { - inner: Arc::new(RwLock::new(NodeClientsInner { - validators, - executors, - })), + inner: Arc::new(RwLock::new(NodeClientsInner { validators })), } } @@ -43,12 +39,7 @@ impl NodeClients { ApiClient::from_urls(node.url(), testing) }); - let executor_clients = topology.executors().iter().map(|node| { - let testing = node.testing_url(); - ApiClient::from_urls(node.url(), testing) - }); - - Self::new(validator_clients.collect(), executor_clients.collect()) + Self::new(validator_clients.collect()) } #[must_use] @@ -61,16 +52,6 @@ impl NodeClients { .clone() } - #[must_use] - /// Executor API clients. - pub fn executor_clients(&self) -> Vec { - self.inner - .read() - .unwrap_or_else(|poisoned| poisoned.into_inner()) - .executors - .clone() - } - #[must_use] /// Choose a random validator client if present. pub fn random_validator(&self) -> Option { @@ -83,18 +64,6 @@ impl NodeClients { validators.get(idx).cloned() } - #[must_use] - /// Choose a random executor client if present. - pub fn random_executor(&self) -> Option { - let executors = self.executor_clients(); - if executors.is_empty() { - return None; - } - let mut rng = thread_rng(); - let idx = rng.gen_range(0..executors.len()); - executors.get(idx).cloned() - } - /// Iterator over all clients. pub fn all_clients(&self) -> Vec { let guard = self @@ -102,16 +71,11 @@ impl NodeClients { .read() .unwrap_or_else(|poisoned| poisoned.into_inner()); - guard - .validators - .iter() - .chain(guard.executors.iter()) - .cloned() - .collect() + guard.validators.iter().cloned().collect() } #[must_use] - /// Choose any random client from validators+executors. + /// Choose any random client from validators. pub fn any_client(&self) -> Option { let guard = self .inner @@ -119,18 +83,13 @@ impl NodeClients { .unwrap_or_else(|poisoned| poisoned.into_inner()); let validator_count = guard.validators.len(); - let executor_count = guard.executors.len(); - let total = validator_count + executor_count; + let total = validator_count; if total == 0 { return None; } let mut rng = thread_rng(); let choice = rng.gen_range(0..total); - if choice < validator_count { - guard.validators.get(choice).cloned() - } else { - guard.executors.get(choice - validator_count).cloned() - } + guard.validators.get(choice).cloned() } #[must_use] @@ -148,15 +107,6 @@ impl NodeClients { guard.validators.push(client); } - pub fn add_executor(&self, client: ApiClient) { - let mut guard = self - .inner - .write() - .unwrap_or_else(|poisoned| poisoned.into_inner()); - - guard.executors.push(client); - } - pub fn clear(&self) { let mut guard = self .inner @@ -164,7 +114,6 @@ impl NodeClients { .unwrap_or_else(|poisoned| poisoned.into_inner()); guard.validators.clear(); - guard.executors.clear(); } } diff --git a/testing-framework/core/src/topology/config.rs b/testing-framework/core/src/topology/config.rs index ec21478..656e813 100644 --- a/testing-framework/core/src/topology/config.rs +++ b/testing-framework/core/src/topology/config.rs @@ -1,10 +1,7 @@ -use std::time::Duration; - use nomos_core::{ mantle::GenesisTx as _, sdp::{Locator, ServiceType}, }; -use nomos_da_network_core::swarm::DAConnectionPolicySettings; use testing_framework_config::topology::{ configs::{ api::{ApiConfigError, create_api_configs}, @@ -13,12 +10,11 @@ use testing_framework_config::topology::{ ConsensusConfigError, ConsensusParams, ProviderInfo, create_genesis_tx_with_declarations, }, - da::DaParams, network::{Libp2pNetworkLayout, NetworkParams}, tracing::create_tracing_configs, wallet::WalletConfig, }, - invariants::{TopologyInvariantError, validate_generated_vectors}, + invariants::TopologyInvariantError, }; use thiserror::Error; @@ -28,9 +24,6 @@ use crate::topology::{ utils::{TopologyResolveError, create_kms_configs, resolve_ids, resolve_ports}, }; -const DEFAULT_DA_BALANCER_INTERVAL: Duration = Duration::from_secs(1); -const VALIDATOR_EXECUTOR_DA_BALANCER_INTERVAL: Duration = Duration::from_secs(5); - #[derive(Debug, Error)] pub enum TopologyBuildError { #[error("topology must include at least one node")] @@ -59,9 +52,7 @@ pub enum TopologyBuildError { #[derive(Clone)] pub struct TopologyConfig { pub n_validators: usize, - pub n_executors: usize, pub consensus_params: ConsensusParams, - pub da_params: DaParams, pub network_params: NetworkParams, pub wallet_config: WalletConfig, } @@ -72,9 +63,7 @@ impl TopologyConfig { pub fn empty() -> Self { Self { n_validators: 0, - n_executors: 0, consensus_params: ConsensusParams::default_for_participants(1), - da_params: DaParams::default(), network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), } @@ -85,101 +74,20 @@ impl TopologyConfig { pub fn two_validators() -> Self { Self { n_validators: 2, - n_executors: 0, consensus_params: ConsensusParams::default_for_participants(2), - da_params: DaParams::default(), network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), } } #[must_use] - /// Single validator + single executor config for minimal dual-role setups. - pub fn validator_and_executor() -> Self { - Self { - n_validators: 1, - n_executors: 1, - consensus_params: ConsensusParams::default_for_participants(2), - da_params: DaParams { - dispersal_factor: 2, - subnetwork_size: 2, - num_subnets: 2, - policy_settings: DAConnectionPolicySettings { - min_dispersal_peers: 1, - min_replication_peers: 1, - max_dispersal_failures: 0, - max_sampling_failures: 0, - max_replication_failures: 0, - malicious_threshold: 0, - }, - balancer_interval: DEFAULT_DA_BALANCER_INTERVAL, - ..Default::default() - }, - network_params: NetworkParams::default(), - wallet_config: WalletConfig::default(), - } - } - - #[must_use] - /// Build a topology with explicit validator and executor counts. - pub fn with_node_numbers(validators: usize, executors: usize) -> Self { - let participants = validators + executors; - - let mut da_params = DaParams::default(); - let da_nodes = participants; - if da_nodes <= 1 { - da_params.subnetwork_size = 1; - da_params.num_subnets = 1; - da_params.dispersal_factor = 1; - da_params.policy_settings.min_dispersal_peers = 0; - da_params.policy_settings.min_replication_peers = 0; - } else { - let dispersal = da_nodes.min(da_params.dispersal_factor.max(2)); - da_params.dispersal_factor = dispersal; - da_params.subnetwork_size = da_params.subnetwork_size.max(dispersal); - da_params.num_subnets = da_params.subnetwork_size as u16; - let min_peers = dispersal.saturating_sub(1).max(1); - da_params.policy_settings.min_dispersal_peers = min_peers; - da_params.policy_settings.min_replication_peers = min_peers; - da_params.balancer_interval = DEFAULT_DA_BALANCER_INTERVAL; - } + /// Build a topology with explicit validator counts. + pub fn with_node_numbers(validators: usize) -> Self { + let participants = validators; Self { n_validators: validators, - n_executors: executors, consensus_params: ConsensusParams::default_for_participants(participants), - da_params, - network_params: NetworkParams::default(), - wallet_config: WalletConfig::default(), - } - } - - #[must_use] - /// Build a topology with one executor and a configurable validator set. - pub fn validators_and_executor( - num_validators: usize, - num_subnets: usize, - dispersal_factor: usize, - ) -> Self { - Self { - n_validators: num_validators, - n_executors: 1, - consensus_params: ConsensusParams::default_for_participants(num_validators + 1), - da_params: DaParams { - dispersal_factor, - subnetwork_size: num_subnets, - num_subnets: num_subnets as u16, - policy_settings: DAConnectionPolicySettings { - min_dispersal_peers: num_subnets, - min_replication_peers: dispersal_factor - 1, - max_dispersal_failures: 0, - max_sampling_failures: 0, - max_replication_failures: 0, - malicious_threshold: 0, - }, - balancer_interval: VALIDATOR_EXECUTOR_DA_BALANCER_INTERVAL, - ..Default::default() - }, network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), } @@ -196,7 +104,6 @@ impl TopologyConfig { pub struct TopologyBuilder { config: TopologyConfig, ids: Option>, - da_ports: Option>, blend_ports: Option>, } @@ -207,7 +114,6 @@ impl TopologyBuilder { Self { config, ids: None, - da_ports: None, blend_ports: None, } } @@ -219,13 +125,6 @@ impl TopologyBuilder { self } - #[must_use] - /// Override DA ports for nodes in order. - pub fn with_da_ports(mut self, ports: Vec) -> Self { - self.da_ports = Some(ports); - self - } - #[must_use] /// Override blend ports for nodes in order. pub fn with_blend_ports(mut self, ports: Vec) -> Self { @@ -240,17 +139,9 @@ impl TopologyBuilder { } #[must_use] - /// Set executor count. - pub const fn with_executor_count(mut self, executors: usize) -> Self { - self.config.n_executors = executors; - self - } - - #[must_use] - /// Set validator and executor counts together. - pub const fn with_node_counts(mut self, validators: usize, executors: usize) -> Self { + /// Set validator counts. + pub const fn with_node_counts(mut self, validators: usize) -> Self { self.config.n_validators = validators; - self.config.n_executors = executors; self } @@ -272,28 +163,23 @@ impl TopologyBuilder { let Self { config, ids, - da_ports, blend_ports, } = self; let n_participants = participant_count(&config)?; - let (ids, da_ports, blend_ports) = - resolve_and_validate_vectors(ids, da_ports, blend_ports, n_participants)?; + let (ids, blend_ports) = resolve_and_validate_vectors(ids, blend_ports, n_participants)?; let BaseConfigs { mut consensus_configs, bootstrap_configs: bootstrapping_config, - da_configs, network_configs, blend_configs, } = build_base_configs( &ids, &config.consensus_params, - &config.da_params, &config.network_params, &config.wallet_config, - &da_ports, &blend_ports, )?; @@ -304,23 +190,20 @@ impl TopologyBuilder { let first_consensus = consensus_configs .first() .ok_or(TopologyBuildError::MissingConsensusConfig)?; - let providers = collect_provider_infos(first_consensus, &da_configs, &blend_configs)?; + let providers = collect_provider_infos(first_consensus, &blend_configs)?; let genesis_tx = create_consensus_genesis_tx(first_consensus, providers)?; apply_consensus_genesis_tx(&mut consensus_configs, &genesis_tx); - let kms_configs = - create_kms_configs(&blend_configs, &da_configs, &config.wallet_config.accounts); + let kms_configs = create_kms_configs(&blend_configs, &config.wallet_config.accounts); - let (validators, executors) = build_node_descriptors( + let validators = build_node_descriptors( &config, n_participants, &ids, - &da_ports, &blend_ports, &consensus_configs, &bootstrapping_config, - &da_configs, &network_configs, &blend_configs, &api_configs, @@ -329,11 +212,7 @@ impl TopologyBuilder { &time_config, )?; - Ok(GeneratedTopology { - config, - validators, - executors, - }) + Ok(GeneratedTopology { config, validators }) } #[must_use] @@ -343,7 +222,7 @@ impl TopologyBuilder { } fn participant_count(config: &TopologyConfig) -> Result { - let n_participants = config.n_validators + config.n_executors; + let n_participants = config.n_validators; if n_participants == 0 { return Err(TopologyBuildError::EmptyParticipants); } @@ -353,36 +232,20 @@ fn participant_count(config: &TopologyConfig) -> Result>, - da_ports: Option>, blend_ports: Option>, n_participants: usize, -) -> Result<(Vec<[u8; 32]>, Vec, Vec), TopologyBuildError> { +) -> Result<(Vec<[u8; 32]>, Vec), TopologyBuildError> { let ids = resolve_ids(ids, n_participants)?; - let da_ports = resolve_ports(da_ports, n_participants, "DA")?; let blend_ports = resolve_ports(blend_ports, n_participants, "Blend")?; - validate_generated_vectors(n_participants, &ids, &da_ports, &blend_ports)?; - - Ok((ids, da_ports, blend_ports)) + Ok((ids, blend_ports)) } fn collect_provider_infos( first_consensus: &testing_framework_config::topology::configs::consensus::GeneralConsensusConfig, - da_configs: &[testing_framework_config::topology::configs::da::GeneralDaConfig], blend_configs: &[testing_framework_config::topology::configs::blend::GeneralBlendConfig], ) -> Result, TopologyBuildError> { - let mut providers = Vec::with_capacity(da_configs.len() + blend_configs.len()); - - for (i, da_conf) in da_configs.iter().enumerate() { - let note = get_cloned("da_notes", &first_consensus.da_notes, i, da_configs.len())?; - providers.push(ProviderInfo { - service_type: ServiceType::DataAvailability, - provider_sk: da_conf.signer.clone(), - zk_sk: da_conf.secret_zk_key.clone(), - locator: Locator(da_conf.listening_address.clone()), - note, - }); - } + let mut providers = Vec::with_capacity(blend_configs.len()); for (i, blend_conf) in blend_configs.iter().enumerate() { let note = get_cloned( @@ -425,27 +288,23 @@ fn build_node_descriptors( config: &TopologyConfig, n_participants: usize, ids: &[[u8; 32]], - da_ports: &[u16], blend_ports: &[u16], consensus_configs: &[testing_framework_config::topology::configs::consensus::GeneralConsensusConfig], bootstrapping_config: &[testing_framework_config::topology::configs::bootstrap::GeneralBootstrapConfig], - da_configs: &[testing_framework_config::topology::configs::da::GeneralDaConfig], network_configs: &[testing_framework_config::topology::configs::network::GeneralNetworkConfig], blend_configs: &[testing_framework_config::topology::configs::blend::GeneralBlendConfig], api_configs: &[testing_framework_config::topology::configs::api::GeneralApiConfig], tracing_configs: &[testing_framework_config::topology::configs::tracing::GeneralTracingConfig], kms_configs: &[key_management_system_service::backend::preload::PreloadKMSBackendSettings], time_config: &testing_framework_config::topology::configs::time::GeneralTimeConfig, -) -> Result<(Vec, Vec), TopologyBuildError> { +) -> Result, TopologyBuildError> { let mut validators = Vec::with_capacity(config.n_validators); - let mut executors = Vec::with_capacity(config.n_executors); for i in 0..n_participants { let consensus_config = get_cloned("consensus_configs", consensus_configs, i, n_participants)?; let bootstrapping_config = get_cloned("bootstrap_configs", bootstrapping_config, i, n_participants)?; - let da_config = get_cloned("da_configs", da_configs, i, n_participants)?; let network_config = get_cloned("network_configs", network_configs, i, n_participants)?; let blend_config = get_cloned("blend_configs", blend_configs, i, n_participants)?; let api_config = get_cloned("api_configs", api_configs, i, n_participants)?; @@ -453,13 +312,11 @@ fn build_node_descriptors( let kms_config = get_cloned("kms_configs", kms_configs, i, n_participants)?; let id = get_copied("ids", ids, i, n_participants)?; - let da_port = get_copied("da_ports", da_ports, i, n_participants)?; let blend_port = get_copied("blend_ports", blend_ports, i, n_participants)?; let general = GeneralConfig { consensus_config, bootstrapping_config, - da_config, network_config, blend_config, api_config, @@ -468,31 +325,21 @@ fn build_node_descriptors( kms_config, }; - let (role, index) = node_role_and_index(i, config.n_validators); + let (role, index) = (NodeRole::Validator, i); let descriptor = GeneratedNodeConfig { role, index, id, general, - da_port, blend_port, }; match role { NodeRole::Validator => validators.push(descriptor), - NodeRole::Executor => executors.push(descriptor), } } - Ok((validators, executors)) -} - -fn node_role_and_index(i: usize, n_validators: usize) -> (NodeRole, usize) { - if i < n_validators { - (NodeRole::Validator, i) - } else { - (NodeRole::Executor, i - n_validators) - } + Ok(validators) } fn get_cloned( diff --git a/testing-framework/core/src/topology/deployment.rs b/testing-framework/core/src/topology/deployment.rs index e8126d1..dd78ebf 100644 --- a/testing-framework/core/src/topology/deployment.rs +++ b/testing-framework/core/src/topology/deployment.rs @@ -1,22 +1,17 @@ use std::collections::HashSet; -use nomos_core::sdp::SessionNumber; use thiserror::Error; use crate::{ nodes::{ common::node::SpawnNodeError, - executor::{Executor, create_executor_config}, validator::{Validator, create_validator_config}, }, topology::{ config::{TopologyBuildError, TopologyBuilder, TopologyConfig}, configs::GeneralConfig, generation::find_expected_peer_counts, - readiness::{ - DaBalancerReadiness, MembershipReadiness, NetworkReadiness, ReadinessCheck, - ReadinessError, - }, + readiness::{NetworkReadiness, ReadinessCheck, ReadinessError}, utils::multiaddr_port, }, }; @@ -24,10 +19,9 @@ use crate::{ /// Runtime representation of a spawned topology with running nodes. pub struct Topology { pub(crate) validators: Vec, - pub(crate) executors: Vec, } -pub type DeployedNodes = (Vec, Vec); +pub type DeployedNodes = Vec; #[derive(Debug, Error)] pub enum SpawnTopologyError { @@ -41,30 +35,23 @@ impl Topology { pub async fn spawn(config: TopologyConfig) -> Result { let generated = TopologyBuilder::new(config.clone()).build()?; let n_validators = config.n_validators; - let n_executors = config.n_executors; let node_configs = generated .nodes() .map(|node| node.general.clone()) .collect::>(); - let (validators, executors) = - Self::spawn_validators_executors(node_configs, n_validators, n_executors).await?; + let validators = Self::spawn_validators(node_configs, n_validators).await?; - Ok(Self { - validators, - executors, - }) + Ok(Self { validators }) } pub async fn spawn_with_empty_membership( config: TopologyConfig, ids: &[[u8; 32]], - da_ports: &[u16], blend_ports: &[u16], ) -> Result { let generated = TopologyBuilder::new(config.clone()) .with_ids(ids.to_vec()) - .with_da_ports(da_ports.to_vec()) .with_blend_ports(blend_ports.to_vec()) .build()?; @@ -73,20 +60,14 @@ impl Topology { .map(|node| node.general.clone()) .collect::>(); - let (validators, executors) = - Self::spawn_validators_executors(node_configs, config.n_validators, config.n_executors) - .await?; + let validators = Self::spawn_validators(node_configs, config.n_validators).await?; - Ok(Self { - validators, - executors, - }) + Ok(Self { validators }) } - pub(crate) async fn spawn_validators_executors( + pub(crate) async fn spawn_validators( config: Vec, n_validators: usize, - n_executors: usize, ) -> Result { let mut validators = Vec::new(); for i in 0..n_validators { @@ -95,14 +76,7 @@ impl Topology { validators.push(Validator::spawn(config, &label).await?); } - let mut executors = Vec::new(); - for i in 0..n_executors { - let config = create_executor_config(config[n_validators + i].clone()); - let label = format!("executor-{i}"); - executors.push(Executor::spawn(config, &label).await?); - } - - Ok((validators, executors)) + Ok(validators) } #[must_use] @@ -110,11 +84,6 @@ impl Topology { &self.validators } - #[must_use] - pub fn executors(&self) -> &[Executor] { - &self.executors - } - pub async fn wait_network_ready(&self) -> Result<(), ReadinessError> { let listen_ports = self.node_listen_ports(); if listen_ports.len() <= 1 { @@ -135,72 +104,10 @@ impl Topology { Ok(()) } - pub async fn wait_da_balancer_ready(&self) -> Result<(), ReadinessError> { - if self.validators.is_empty() && self.executors.is_empty() { - return Ok(()); - } - - let labels = self.node_labels(); - let check = DaBalancerReadiness { - topology: self, - labels: &labels, - }; - - check.wait().await?; - Ok(()) - } - - pub async fn wait_membership_ready(&self) -> Result<(), ReadinessError> { - self.wait_membership_ready_for_session(SessionNumber::from(0u64)) - .await - } - - pub async fn wait_membership_ready_for_session( - &self, - session: SessionNumber, - ) -> Result<(), ReadinessError> { - self.wait_membership_assignations(session, true).await - } - - pub async fn wait_membership_empty_for_session( - &self, - session: SessionNumber, - ) -> Result<(), ReadinessError> { - self.wait_membership_assignations(session, false).await - } - - async fn wait_membership_assignations( - &self, - session: SessionNumber, - expect_non_empty: bool, - ) -> Result<(), ReadinessError> { - let total_nodes = self.validators.len() + self.executors.len(); - - if total_nodes == 0 { - return Ok(()); - } - - let labels = self.node_labels(); - let check = MembershipReadiness { - topology: self, - session, - labels: &labels, - expect_non_empty, - }; - - check.wait().await?; - Ok(()) - } - fn node_listen_ports(&self) -> Vec { self.validators .iter() .map(|node| node.config().network.backend.swarm.port) - .chain( - self.executors - .iter() - .map(|node| node.config().network.backend.swarm.port), - ) .collect() } @@ -216,15 +123,6 @@ impl Topology { .filter_map(multiaddr_port) .collect::>() }) - .chain(self.executors.iter().map(|node| { - node.config() - .network - .backend - .initial_peers - .iter() - .filter_map(multiaddr_port) - .collect::>() - })) .collect() } @@ -238,12 +136,6 @@ impl Topology { node.config().network.backend.swarm.port ) }) - .chain(self.executors.iter().enumerate().map(|(idx, node)| { - format!( - "executor#{idx}@{}", - node.config().network.backend.swarm.port - ) - })) .collect() } } diff --git a/testing-framework/core/src/topology/generation.rs b/testing-framework/core/src/topology/generation.rs index 574cad8..8352bdd 100644 --- a/testing-framework/core/src/topology/generation.rs +++ b/testing-framework/core/src/topology/generation.rs @@ -6,14 +6,13 @@ use crate::topology::{ config::TopologyConfig, configs::{GeneralConfig, wallet::WalletAccount}, deployment::{SpawnTopologyError, Topology}, - readiness::{HttpMembershipReadiness, HttpNetworkReadiness, ReadinessCheck, ReadinessError}, + readiness::{HttpNetworkReadiness, ReadinessCheck, ReadinessError}, }; /// Node role within the generated topology. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum NodeRole { Validator, - Executor, } /// Fully generated configuration for an individual node. @@ -23,7 +22,6 @@ pub struct GeneratedNodeConfig { pub index: usize, pub id: [u8; 32], pub general: GeneralConfig, - pub da_port: u16, pub blend_port: u16, } @@ -62,7 +60,6 @@ impl GeneratedNodeConfig { pub struct GeneratedTopology { pub(crate) config: TopologyConfig, pub(crate) validators: Vec, - pub(crate) executors: Vec, } impl GeneratedTopology { @@ -78,15 +75,9 @@ impl GeneratedTopology { &self.validators } - #[must_use] - /// All executor configs. - pub fn executors(&self) -> &[GeneratedNodeConfig] { - &self.executors - } - /// Iterator over all node configs in role order. pub fn nodes(&self) -> impl Iterator { - self.validators.iter().chain(self.executors.iter()) + self.validators.iter() } #[must_use] @@ -109,30 +100,17 @@ impl GeneratedTopology { .map(|node| node.general.clone()) .collect::>(); - let (validators, executors) = Topology::spawn_validators_executors( - configs, - self.config.n_validators, - self.config.n_executors, - ) - .await?; + let validators = Topology::spawn_validators(configs, self.config.n_validators).await?; - Ok(Topology { - validators, - executors, - }) + Ok(Topology { validators }) } pub async fn wait_remote_readiness( &self, // Node endpoints validator_endpoints: &[Url], - executor_endpoints: &[Url], - - // Membership endpoints - validator_membership_endpoints: Option<&[Url]>, - executor_membership_endpoints: Option<&[Url]>, ) -> Result<(), ReadinessError> { - let total_nodes = self.validators.len() + self.executors.len(); + let total_nodes = self.validators.len(); if total_nodes == 0 { return Ok(()); } @@ -140,42 +118,15 @@ impl GeneratedTopology { let labels = self.labels(); let client = Client::new(); - let endpoints = - collect_node_endpoints(self, validator_endpoints, executor_endpoints, total_nodes); + let endpoints = collect_node_endpoints(self, validator_endpoints, total_nodes); - wait_for_network_readiness(self, &client, &endpoints, &labels).await?; - - if validator_membership_endpoints.is_none() && executor_membership_endpoints.is_none() { - return Ok(()); - } - - let membership_endpoints = collect_membership_endpoints( - self, - total_nodes, - validator_membership_endpoints, - executor_membership_endpoints, - ); - - let membership_check = HttpMembershipReadiness { - client: &client, - endpoints: &membership_endpoints, - session: nomos_core::sdp::SessionNumber::from(0u64), - labels: &labels, - expect_non_empty: true, - }; - - membership_check.wait().await + wait_for_network_readiness(self, &client, &endpoints, &labels).await } fn listen_ports(&self) -> Vec { self.validators .iter() .map(|node| node.general.network_config.backend.swarm.port) - .chain( - self.executors - .iter() - .map(|node| node.general.network_config.backend.swarm.port), - ) .collect() } @@ -191,15 +142,6 @@ impl GeneratedTopology { .filter_map(crate::topology::utils::multiaddr_port) .collect::>() }) - .chain(self.executors.iter().map(|node| { - node.general - .network_config - .backend - .initial_peers - .iter() - .filter_map(crate::topology::utils::multiaddr_port) - .collect::>() - })) .collect() } @@ -213,12 +155,6 @@ impl GeneratedTopology { node.general.network_config.backend.swarm.port ) }) - .chain(self.executors.iter().enumerate().map(|(idx, node)| { - format!( - "executor#{idx}@{}", - node.general.network_config.backend.swarm.port - ) - })) .collect() } } @@ -226,7 +162,6 @@ impl GeneratedTopology { fn collect_node_endpoints( topology: &GeneratedTopology, validator_endpoints: &[Url], - executor_endpoints: &[Url], total_nodes: usize, ) -> Vec { assert_eq!( @@ -234,15 +169,9 @@ fn collect_node_endpoints( validator_endpoints.len(), "validator endpoints must match topology" ); - assert_eq!( - topology.executors.len(), - executor_endpoints.len(), - "executor endpoints must match topology" - ); let mut endpoints = Vec::with_capacity(total_nodes); endpoints.extend_from_slice(validator_endpoints); - endpoints.extend_from_slice(executor_endpoints); endpoints } @@ -271,52 +200,6 @@ async fn wait_for_network_readiness( network_check.wait().await } -fn collect_membership_endpoints( - topology: &GeneratedTopology, - total_nodes: usize, - validator_membership_endpoints: Option<&[Url]>, - executor_membership_endpoints: Option<&[Url]>, -) -> Vec { - let mut membership_endpoints = Vec::with_capacity(total_nodes); - - membership_endpoints.extend(collect_role_membership_endpoints( - &topology.validators, - validator_membership_endpoints, - "validator membership endpoints must match topology", - )); - membership_endpoints.extend(collect_role_membership_endpoints( - &topology.executors, - executor_membership_endpoints, - "executor membership endpoints must match topology", - )); - - membership_endpoints -} - -fn collect_role_membership_endpoints( - nodes: &[GeneratedNodeConfig], - membership_endpoints: Option<&[Url]>, - mismatch_message: &'static str, -) -> Vec { - match membership_endpoints { - Some(urls) => { - assert_eq!(nodes.len(), urls.len(), "{mismatch_message}"); - urls.to_vec() - } - None => nodes - .iter() - .map(|node| testing_base_url(node.testing_http_port())) - .collect(), - } -} - -fn testing_base_url(port: u16) -> Url { - Url::parse(&format!("http://127.0.0.1:{port}/")).unwrap_or_else(|_| unsafe { - // Safety: `port` is a valid u16 port. - std::hint::unreachable_unchecked() - }) -} - pub fn find_expected_peer_counts( listen_ports: &[u16], initial_peer_ports: &[HashSet], diff --git a/testing-framework/core/src/topology/readiness/balancer.rs b/testing-framework/core/src/topology/readiness/balancer.rs deleted file mode 100644 index 57d3bb8..0000000 --- a/testing-framework/core/src/topology/readiness/balancer.rs +++ /dev/null @@ -1,133 +0,0 @@ -use nomos_da_network_core::swarm::BalancerStats; - -use super::ReadinessCheck; -use crate::topology::deployment::Topology; - -const POLL_INTERVAL: std::time::Duration = std::time::Duration::from_secs(1); - -#[derive(Debug)] -pub struct NodeBalancerStatus { - label: String, - threshold: usize, - result: Result, -} - -pub struct DaBalancerReadiness<'a> { - pub(crate) topology: &'a Topology, - pub(crate) labels: &'a [String], -} - -#[async_trait::async_trait] -impl<'a> ReadinessCheck<'a> for DaBalancerReadiness<'a> { - type Data = Vec; - - async fn collect(&'a self) -> Self::Data { - let mut data = Vec::new(); - for (idx, validator) in self.topology.validators.iter().enumerate() { - let label = self - .labels - .get(idx) - .cloned() - .unwrap_or_else(|| format!("validator#{idx}")); - data.push( - ( - label, - validator.config().da_network.subnet_threshold, - validator.api().balancer_stats().await, - ) - .into(), - ); - } - for (offset, executor) in self.topology.executors.iter().enumerate() { - let label_index = self.topology.validators.len() + offset; - let label = self - .labels - .get(label_index) - .cloned() - .unwrap_or_else(|| format!("executor#{offset}")); - data.push( - ( - label, - executor.config().da_network.subnet_threshold, - executor.api().balancer_stats().await, - ) - .into(), - ); - } - data - } - - fn is_ready(&self, data: &Self::Data) -> bool { - if self.topology.validators.len() + self.topology.executors.len() <= 1 { - return true; - } - data.iter().all(|entry| { - if entry.threshold == 0 { - return true; - } - entry - .result - .as_ref() - .is_ok_and(|stats| connected_subnetworks(stats) >= entry.threshold) - }) - } - - fn timeout_message(&self, data: Self::Data) -> String { - let summary = data - .into_iter() - .map(|entry| { - let (connected, details, error) = match entry.result { - Ok(stats) => ( - connected_subnetworks(&stats), - format_balancer_stats(&stats), - None, - ), - Err(err) => (0, "unavailable".to_string(), Some(err.to_string())), - }; - let mut msg = format!( - "{}: connected={connected}, required={}, stats={details}", - entry.label, entry.threshold - ); - if let Some(error) = error { - msg.push_str(&format!(", error={error}")); - } - msg - }) - .collect::>() - .join(", "); - format!("timed out waiting for DA balancer readiness: {summary}") - } - - fn poll_interval(&self) -> std::time::Duration { - POLL_INTERVAL - } -} - -fn connected_subnetworks(stats: &BalancerStats) -> usize { - stats - .values() - .filter(|stat| stat.inbound > 0 || stat.outbound > 0) - .count() -} - -fn format_balancer_stats(stats: &BalancerStats) -> String { - if stats.is_empty() { - return "empty".into(); - } - stats - .iter() - .map(|(subnet, stat)| format!("{}:in={},out={}", subnet, stat.inbound, stat.outbound)) - .collect::>() - .join(";") -} - -impl From<(String, usize, Result)> for NodeBalancerStatus { - fn from(value: (String, usize, Result)) -> Self { - let (label, threshold, result) = value; - Self { - label, - threshold, - result, - } - } -} diff --git a/testing-framework/core/src/topology/readiness/membership.rs b/testing-framework/core/src/topology/readiness/membership.rs deleted file mode 100644 index 9fe3fd5..0000000 --- a/testing-framework/core/src/topology/readiness/membership.rs +++ /dev/null @@ -1,237 +0,0 @@ -use nomos_core::sdp::SessionNumber; -use nomos_da_network_service::MembershipResponse; -use reqwest::{Client, Url}; -use thiserror::Error; - -use super::ReadinessCheck; -use crate::{nodes::ApiClientError, topology::deployment::Topology}; - -#[derive(Debug, Error)] -pub enum MembershipError { - #[error("failed to join url {base} with path {path}: {message}")] - JoinUrl { - base: Url, - path: &'static str, - message: String, - }, - #[error(transparent)] - Http(#[from] reqwest::Error), - #[error(transparent)] - ApiClient(#[from] ApiClientError), -} - -#[derive(Debug)] -pub struct NodeMembershipStatus { - label: String, - result: Result, -} - -pub struct MembershipReadiness<'a> { - pub(crate) topology: &'a Topology, - pub(crate) session: SessionNumber, - pub(crate) labels: &'a [String], - pub(crate) expect_non_empty: bool, -} - -#[async_trait::async_trait] -impl<'a> ReadinessCheck<'a> for MembershipReadiness<'a> { - type Data = Vec; - - async fn collect(&'a self) -> Self::Data { - let (validator_statuses, executor_statuses) = tokio::join!( - collect_validator_statuses(self), - collect_executor_statuses(self) - ); - validator_statuses - .into_iter() - .chain(executor_statuses) - .collect() - } - - fn is_ready(&self, data: &Self::Data) -> bool { - data.iter() - .all(|entry| is_membership_ready(entry.result.as_ref(), self.expect_non_empty)) - } - - fn timeout_message(&self, data: Self::Data) -> String { - let description = if self.expect_non_empty { - "non-empty assignations" - } else { - "empty assignations" - }; - let summary = build_membership_status_summary(&data, description, self.expect_non_empty); - format!("timed out waiting for DA membership readiness ({description}): {summary}") - } -} - -pub struct HttpMembershipReadiness<'a> { - pub(crate) client: &'a Client, - pub(crate) endpoints: &'a [Url], - pub(crate) session: SessionNumber, - pub(crate) labels: &'a [String], - pub(crate) expect_non_empty: bool, -} - -#[async_trait::async_trait] -impl<'a> ReadinessCheck<'a> for HttpMembershipReadiness<'a> { - type Data = Vec; - - async fn collect(&'a self) -> Self::Data { - let futures = self.endpoints.iter().enumerate().map(|(idx, endpoint)| { - let label = self - .labels - .get(idx) - .cloned() - .unwrap_or_else(|| format!("endpoint#{idx}")); - async move { - let result = try_fetch_membership(self.client, endpoint, self.session).await; - NodeMembershipStatus { label, result } - } - }); - futures::future::join_all(futures).await - } - - fn is_ready(&self, data: &Self::Data) -> bool { - data.iter() - .all(|entry| is_membership_ready(entry.result.as_ref(), self.expect_non_empty)) - } - - fn timeout_message(&self, data: Self::Data) -> String { - let description = if self.expect_non_empty { - "non-empty assignations" - } else { - "empty assignations" - }; - let summary = build_membership_status_summary(&data, description, self.expect_non_empty); - format!("timed out waiting for DA membership readiness ({description}): {summary}") - } -} - -async fn collect_validator_statuses( - readiness: &MembershipReadiness<'_>, -) -> Vec { - let validator_futures = readiness - .topology - .validators - .iter() - .enumerate() - .map(|(idx, node)| { - let label = readiness - .labels - .get(idx) - .cloned() - .unwrap_or_else(|| format!("validator#{idx}")); - async move { - let result = node - .api() - .da_get_membership_checked(&readiness.session) - .await - .map_err(MembershipError::from); - NodeMembershipStatus { label, result } - } - }); - - futures::future::join_all(validator_futures).await -} - -async fn collect_executor_statuses( - readiness: &MembershipReadiness<'_>, -) -> Vec { - let offset = readiness.topology.validators.len(); - let executor_futures = readiness - .topology - .executors - .iter() - .enumerate() - .map(|(idx, node)| { - let global_idx = offset + idx; - let label = readiness - .labels - .get(global_idx) - .cloned() - .unwrap_or_else(|| format!("executor#{idx}")); - async move { - let result = node - .api() - .da_get_membership_checked(&readiness.session) - .await - .map_err(MembershipError::from); - NodeMembershipStatus { label, result } - } - }); - - futures::future::join_all(executor_futures).await -} - -pub async fn try_fetch_membership( - client: &Client, - base: &Url, - session: SessionNumber, -) -> Result { - let path = nomos_http_api_common::paths::DA_GET_MEMBERSHIP.trim_start_matches('/'); - let url = base.join(path).map_err(|source| MembershipError::JoinUrl { - base: base.clone(), - path: nomos_http_api_common::paths::DA_GET_MEMBERSHIP, - message: source.to_string(), - })?; - client - .post(url) - .json(&session) - .send() - .await - .map_err(MembershipError::Http)? - .error_for_status() - .map_err(MembershipError::Http)? - .json() - .await - .map_err(MembershipError::Http) -} - -fn is_membership_ready( - result: Result<&MembershipResponse, &MembershipError>, - expect_non_empty: bool, -) -> bool { - match result { - Ok(resp) => { - let is_non_empty = !resp.assignations.is_empty(); - if expect_non_empty { - is_non_empty - } else { - !is_non_empty - } - } - Err(_) => false, - } -} - -fn build_membership_status_summary( - statuses: &[NodeMembershipStatus], - description: &str, - expect_non_empty: bool, -) -> String { - statuses - .iter() - .map(|entry| match entry.result.as_ref() { - Ok(resp) => { - let ready = is_membership_ready(Ok(resp), expect_non_empty); - let status = if ready { "ready" } else { "waiting" }; - format!("{}: status={status}, expected {description}", entry.label) - } - Err(err) => format!("{}: error={err}, expected {description}", entry.label), - }) - .collect::>() - .join(", ") -} - -#[deprecated(note = "use ReadinessCheck timeout_message for richer per-node errors")] -pub fn build_membership_summary(labels: &[String], statuses: &[bool], description: &str) -> String { - statuses - .iter() - .zip(labels.iter()) - .map(|(ready, label)| { - let status = if *ready { "ready" } else { "waiting" }; - format!("{label}: status={status}, expected {description}") - }) - .collect::>() - .join(", ") -} diff --git a/testing-framework/core/src/topology/readiness/mod.rs b/testing-framework/core/src/topology/readiness/mod.rs index 17ff391..7d2e8e1 100644 --- a/testing-framework/core/src/topology/readiness/mod.rs +++ b/testing-framework/core/src/topology/readiness/mod.rs @@ -1,11 +1,7 @@ -pub mod balancer; -pub mod membership; pub mod network; use std::time::Duration; -pub use balancer::DaBalancerReadiness; -pub use membership::{HttpMembershipReadiness, MembershipReadiness}; pub use network::{HttpNetworkReadiness, NetworkReadiness}; use thiserror::Error; use tokio::time::{sleep, timeout}; diff --git a/testing-framework/core/src/topology/readiness/network.rs b/testing-framework/core/src/topology/readiness/network.rs index f251b91..d560195 100644 --- a/testing-framework/core/src/topology/readiness/network.rs +++ b/testing-framework/core/src/topology/readiness/network.rs @@ -1,3 +1,4 @@ +use nomos_libp2p::PeerId; use nomos_network::backends::libp2p::Libp2pInfo; use reqwest::{Client, Url}; use thiserror::Error; @@ -36,14 +37,7 @@ impl<'a> ReadinessCheck<'a> for NetworkReadiness<'a> { type Data = Vec; async fn collect(&'a self) -> Self::Data { - let (validator_statuses, executor_statuses) = tokio::join!( - collect_validator_statuses(self), - collect_executor_statuses(self) - ); - validator_statuses - .into_iter() - .chain(executor_statuses) - .collect() + collect_validator_statuses(self).await } fn is_ready(&self, data: &Self::Data) -> bool { @@ -137,38 +131,6 @@ async fn collect_validator_statuses(readiness: &NetworkReadiness<'_>) -> Vec) -> Vec { - let offset = readiness.topology.validators.len(); - let executor_futures = readiness - .topology - .executors - .iter() - .enumerate() - .map(|(idx, node)| { - let global_idx = offset + idx; - let label = readiness - .labels - .get(global_idx) - .cloned() - .unwrap_or_else(|| format!("executor#{idx}")); - let expected_peers = readiness.expected_peer_counts.get(global_idx).copied(); - async move { - let result = node - .api() - .network_info() - .await - .map_err(NetworkInfoError::from); - NodeNetworkStatus { - label, - expected_peers, - result, - } - } - }); - - futures::future::join_all(executor_futures).await -} - pub async fn try_fetch_network_info( client: &Client, base: &Url, @@ -217,6 +179,7 @@ fn log_network_warning(base: &Url, err: &NetworkInfoError) -> Libp2pInfo { fn empty_libp2p_info() -> Libp2pInfo { Libp2pInfo { listen_addresses: Vec::with_capacity(0), + peer_id: PeerId::random(), n_peers: 0, n_connections: 0, n_pending_connections: 0, diff --git a/testing-framework/core/src/topology/utils.rs b/testing-framework/core/src/topology/utils.rs index 1b3150f..01b7236 100644 --- a/testing-framework/core/src/topology/utils.rs +++ b/testing-framework/core/src/topology/utils.rs @@ -6,21 +6,17 @@ use nomos_utils::net::get_available_udp_port; use rand::{Rng, thread_rng}; use thiserror::Error; -use crate::topology::configs::{ - blend::GeneralBlendConfig, da::GeneralDaConfig, wallet::WalletAccount, -}; +use crate::topology::configs::{blend::GeneralBlendConfig, wallet::WalletAccount}; #[must_use] /// Build preload KMS configs for blend/DA and wallet keys for every node. pub fn create_kms_configs( blend_configs: &[GeneralBlendConfig], - da_configs: &[GeneralDaConfig], wallet_accounts: &[WalletAccount], ) -> Vec { - da_configs + blend_configs .iter() - .zip(blend_configs.iter()) - .map(|(da_conf, blend_conf)| { + .map(|blend_conf| { let mut keys = HashMap::from([ ( hex::encode(blend_conf.signer.public_key().to_bytes()), @@ -32,14 +28,6 @@ pub fn create_kms_configs( )), Key::Zk(blend_conf.secret_zk_key.clone()), ), - ( - hex::encode(da_conf.signer.public_key().to_bytes()), - Key::Ed25519(da_conf.signer.clone()), - ), - ( - hex::encode(fr_to_bytes(da_conf.secret_zk_key.to_public_key().as_fr())), - Key::Zk(da_conf.secret_zk_key.clone()), - ), ]); for account in wallet_accounts { diff --git a/testing-framework/deployers/compose/Cargo.toml b/testing-framework/deployers/compose/Cargo.toml index 02f4432..0642e8c 100644 --- a/testing-framework/deployers/compose/Cargo.toml +++ b/testing-framework/deployers/compose/Cargo.toml @@ -18,18 +18,18 @@ async-trait = { workspace = true } cfgsync_tf = { workspace = true } nomos-tracing = { workspace = true } nomos-tracing-service = { workspace = true } -reqwest = { workspace = true, features = ["json"] } -serde = { workspace = true, features = ["derive"] } +reqwest = { features = ["json"], workspace = true } +serde = { features = ["derive"], workspace = true } tempfile = { workspace = true } tera = "1.19" testing-framework-config = { workspace = true } testing-framework-core = { path = "../../core" } testing-framework-env = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true, features = ["macros", "net", "process", "rt-multi-thread", "sync", "time"] } +tokio = { features = ["macros", "net", "process", "rt-multi-thread", "sync", "time"], workspace = true } tracing = { workspace = true } url = { version = "2" } -uuid = { version = "1", features = ["v4"] } +uuid = { features = ["v4"], version = "1" } [dev-dependencies] groth16 = { workspace = true } diff --git a/testing-framework/deployers/compose/assets/docker-compose.yml.tera b/testing-framework/deployers/compose/assets/docker-compose.yml.tera index 83098c5..cf2c2ba 100644 --- a/testing-framework/deployers/compose/assets/docker-compose.yml.tera +++ b/testing-framework/deployers/compose/assets/docker-compose.yml.tera @@ -29,9 +29,6 @@ services: - seccomp=unconfined restart: on-failure -{% endfor %}{% for node in executors %} - {{ node.name }}: - image: {{ node.image }} {% if node.platform %} platform: {{ node.platform }} {% endif %} entrypoint: {{ node.entrypoint }} volumes: diff --git a/testing-framework/deployers/compose/src/deployer/mod.rs b/testing-framework/deployers/compose/src/deployer/mod.rs index 03af600..aaa4ab3 100644 --- a/testing-framework/deployers/compose/src/deployer/mod.rs +++ b/testing-framework/deployers/compose/src/deployer/mod.rs @@ -109,7 +109,7 @@ mod tests { #[test] fn cfgsync_prebuilt_configs_preserve_genesis() { - let scenario = ScenarioBuilder::topology_with(|t| t.validators(1).executors(1)) + let scenario = ScenarioBuilder::topology_with(|t| t.validators(1)) .build() .expect("scenario build should succeed"); let topology = scenario.topology().clone(); @@ -118,11 +118,9 @@ mod tests { let configs = create_node_configs( &topology.config().consensus_params, - &topology.config().da_params, &tracing_settings, &topology.config().wallet_config, Some(topology.nodes().map(|node| node.id).collect()), - Some(topology.nodes().map(|node| node.da_port).collect()), Some(topology.nodes().map(|node| node.blend_port).collect()), hosts, ) @@ -164,7 +162,7 @@ mod tests { #[test] fn cfgsync_genesis_proofs_verify_against_ledger() { - let scenario = ScenarioBuilder::topology_with(|t| t.validators(1).executors(1)) + let scenario = ScenarioBuilder::topology_with(|t| t.validators(1)) .build() .expect("scenario build should succeed"); let topology = scenario.topology().clone(); @@ -173,11 +171,9 @@ mod tests { let configs = create_node_configs( &topology.config().consensus_params, - &topology.config().da_params, &tracing_settings, &topology.config().wallet_config, Some(topology.nodes().map(|node| node.id).collect()), - Some(topology.nodes().map(|node| node.da_port).collect()), Some(topology.nodes().map(|node| node.blend_port).collect()), hosts, ) @@ -203,7 +199,7 @@ mod tests { #[test] fn cfgsync_docker_overrides_produce_valid_genesis() { - let scenario = ScenarioBuilder::topology_with(|t| t.validators(1).executors(1)) + let scenario = ScenarioBuilder::topology_with(|t| t.validators(3)) .build() .expect("scenario build should succeed"); let topology = scenario.topology().clone(); @@ -212,11 +208,9 @@ mod tests { let configs = create_node_configs( &topology.config().consensus_params, - &topology.config().da_params, &tracing_settings, &topology.config().wallet_config, Some(topology.nodes().map(|node| node.id).collect()), - Some(topology.nodes().map(|node| node.da_port).collect()), Some(topology.nodes().map(|node| node.blend_port).collect()), hosts, ) @@ -237,7 +231,7 @@ mod tests { #[test] fn cfgsync_configs_match_topology_ports_and_genesis() { - let scenario = ScenarioBuilder::topology_with(|t| t.validators(1).executors(1)) + let scenario = ScenarioBuilder::topology_with(|t| t.validators(2)) .build() .expect("scenario build should succeed"); let topology = scenario.topology().clone(); @@ -246,11 +240,9 @@ mod tests { let configs = create_node_configs( &topology.config().consensus_params, - &topology.config().da_params, &tracing_settings, &topology.config().wallet_config, Some(topology.nodes().map(|node| node.id).collect()), - Some(topology.nodes().map(|node| node.da_port).collect()), Some(topology.nodes().map(|node| node.blend_port).collect()), hosts, ) @@ -278,11 +270,6 @@ mod tests { "network port mismatch for {identifier}" ); - assert_eq!( - multiaddr_port(&cfg.da_config.listening_address), - Some(node.da_port), - "DA listening port mismatch for {identifier}" - ); assert_eq!( multiaddr_port(&cfg.blend_config.backend_core.listening_address), Some(node.blend_port), @@ -318,7 +305,6 @@ mod tests { let ip = Ipv4Addr::LOCALHOST; let mut host = make_host(node.role(), ip, identifier); host.network_port = node.network_port(); - host.da_network_port = node.da_port; host.blend_port = node.blend_port; host } @@ -328,7 +314,6 @@ mod tests { let ip = Ipv4Addr::new(172, 23, 0, octet); let mut host = make_host(node.role(), ip, identifier); host.network_port = node.network_port().saturating_add(1000); - host.da_network_port = node.da_port.saturating_add(1000); host.blend_port = node.blend_port.saturating_add(1000); host } @@ -337,7 +322,6 @@ mod tests { topology .validators() .first() - .or_else(|| topology.executors().first()) .expect("topology must contain at least one node") .general .tracing_config @@ -348,21 +332,18 @@ mod tests { fn identifier_for(role: TopologyNodeRole, index: usize) -> String { match role { TopologyNodeRole::Validator => format!("validator-{index}"), - TopologyNodeRole::Executor => format!("executor-{index}"), } } fn make_host(role: TopologyNodeRole, ip: Ipv4Addr, identifier: String) -> Host { let ports = PortOverrides { network_port: None, - da_network_port: None, blend_port: None, api_port: None, testing_http_port: None, }; match role { TopologyNodeRole::Validator => Host::validator_from_ip(ip, identifier, ports), - TopologyNodeRole::Executor => Host::executor_from_ip(ip, identifier, ports), } } diff --git a/testing-framework/deployers/compose/src/deployer/orchestrator.rs b/testing-framework/deployers/compose/src/deployer/orchestrator.rs index 95bc984..dff4a20 100644 --- a/testing-framework/deployers/compose/src/deployer/orchestrator.rs +++ b/testing-framework/deployers/compose/src/deployer/orchestrator.rs @@ -51,7 +51,6 @@ impl DeploymentOrchestrator { tracing::info!( validators = descriptors.validators().len(), - executors = descriptors.executors().len(), duration_secs = scenario.duration().as_secs(), readiness_checks = self.deployer.readiness_checks, metrics_query_url = observability.metrics_query_url.as_ref().map(|u| u.as_str()), @@ -64,7 +63,6 @@ impl DeploymentOrchestrator { ); let validator_count = descriptors.validators().len(); - let executor_count = descriptors.executors().len(); let host_ports = PortManager::prepare(&mut environment, &descriptors).await?; wait_for_readiness_or_grace_period( @@ -105,7 +103,6 @@ impl DeploymentOrchestrator { info!( validators = validator_count, - executors = executor_count, duration_secs = scenario.duration().as_secs(), readiness_checks = self.deployer.readiness_checks, host, @@ -208,16 +205,6 @@ fn log_profiling_urls(host: &str, ports: &HostPortMapping) { "validator profiling endpoint (profiling feature required)" ); } - for (idx, node) in ports.executors.iter().enumerate() { - tracing::info!( - executor = idx, - profiling_url = %format!( - "http://{}:{}/debug/pprof/profile?seconds=15&format=proto", - host, node.api - ), - "executor profiling endpoint (profiling feature required)" - ); - } } fn print_profiling_urls(host: &str, ports: &HostPortMapping) { @@ -227,10 +214,4 @@ fn print_profiling_urls(host: &str, ports: &HostPortMapping) { idx, host, node.api ); } - for (idx, node) in ports.executors.iter().enumerate() { - println!( - "TESTNET_PPROF executor_{}=http://{}:{}/debug/pprof/profile?seconds=15&format=proto", - idx, host, node.api - ); - } } diff --git a/testing-framework/deployers/compose/src/deployer/ports.rs b/testing-framework/deployers/compose/src/deployer/ports.rs index 2ca9708..538aabc 100644 --- a/testing-framework/deployers/compose/src/deployer/ports.rs +++ b/testing-framework/deployers/compose/src/deployer/ports.rs @@ -18,14 +18,12 @@ impl PortManager { ) -> Result { debug!( validators = descriptors.validators().len(), - executors = descriptors.executors().len(), "resolving host ports for compose services" ); match discover_host_ports(environment, descriptors).await { Ok(mapping) => { info!( validator_ports = ?mapping.validator_api_ports(), - executor_ports = ?mapping.executor_api_ports(), "resolved container host ports" ); Ok(mapping) diff --git a/testing-framework/deployers/compose/src/deployer/readiness.rs b/testing-framework/deployers/compose/src/deployer/readiness.rs index b0e5eb6..19cca71 100644 --- a/testing-framework/deployers/compose/src/deployer/readiness.rs +++ b/testing-framework/deployers/compose/src/deployer/readiness.rs @@ -7,7 +7,7 @@ use crate::{ environment::StackEnvironment, ports::{HostPortMapping, ensure_remote_readiness_with_ports}, }, - lifecycle::readiness::{ensure_executors_ready_with_ports, ensure_validators_ready_with_ports}, + lifecycle::readiness::ensure_validators_ready_with_ports, }; pub struct ReadinessChecker; @@ -30,18 +30,6 @@ impl ReadinessChecker { .await; } - let executor_ports = host_ports.executor_api_ports(); - info!(ports = ?executor_ports, "waiting for executor HTTP endpoints"); - if let Err(err) = ensure_executors_ready_with_ports(&executor_ports).await { - return fail_readiness_step( - environment, - "executor readiness failed", - "executor readiness failed", - err, - ) - .await; - } - info!("waiting for remote service readiness"); if let Err(err) = ensure_remote_readiness_with_ports(descriptors, host_ports).await { return fail_readiness_step( diff --git a/testing-framework/deployers/compose/src/deployer/setup.rs b/testing-framework/deployers/compose/src/deployer/setup.rs index 3cccee7..1dc8560 100644 --- a/testing-framework/deployers/compose/src/deployer/setup.rs +++ b/testing-framework/deployers/compose/src/deployer/setup.rs @@ -33,7 +33,6 @@ impl DeploymentSetup { info!( validators = self.descriptors.validators().len(), - executors = self.descriptors.executors().len(), "starting compose deployment" ); diff --git a/testing-framework/deployers/compose/src/descriptor/mod.rs b/testing-framework/deployers/compose/src/descriptor/mod.rs index a7c6f39..8e10f93 100644 --- a/testing-framework/deployers/compose/src/descriptor/mod.rs +++ b/testing-framework/deployers/compose/src/descriptor/mod.rs @@ -21,7 +21,6 @@ use testing_framework_config::constants::DEFAULT_CFGSYNC_PORT; #[derive(Clone, Debug, Serialize)] pub struct ComposeDescriptor { validators: Vec, - executors: Vec, } impl ComposeDescriptor { @@ -35,11 +34,6 @@ impl ComposeDescriptor { pub fn validators(&self) -> &[NodeDescriptor] { &self.validators } - - #[cfg(test)] - pub fn executors(&self) -> &[NodeDescriptor] { - &self.executors - } } /// Builder for `ComposeDescriptor` that plugs topology values into the @@ -89,40 +83,25 @@ impl<'a> ComposeDescriptorBuilder<'a> { cfgsync_port, ); - let executors = build_nodes( - self.topology.executors(), - ComposeNodeKind::Executor, - &image, - platform.as_deref(), - self.use_kzg_mount, - cfgsync_port, - ); - - ComposeDescriptor { - validators, - executors, - } + ComposeDescriptor { validators } } } #[derive(Clone, Copy)] pub(crate) enum ComposeNodeKind { Validator, - Executor, } impl ComposeNodeKind { fn instance_name(self, index: usize) -> String { match self { Self::Validator => format!("validator-{index}"), - Self::Executor => format!("executor-{index}"), } } const fn entrypoint(self) -> &'static str { match self { Self::Validator => "/etc/nomos/scripts/run_nomos_node.sh", - Self::Executor => "/etc/nomos/scripts/run_nomos_executor.sh", } } } diff --git a/testing-framework/deployers/compose/src/descriptor/node.rs b/testing-framework/deployers/compose/src/descriptor/node.rs index 930f6e5..95c9141 100644 --- a/testing-framework/deployers/compose/src/descriptor/node.rs +++ b/testing-framework/deployers/compose/src/descriptor/node.rs @@ -3,7 +3,7 @@ use testing_framework_core::topology::generation::GeneratedNodeConfig; use super::{ComposeNodeKind, base_environment, base_volumes, default_extra_hosts}; -/// Describes a validator or executor container in the compose stack. +/// Describes a validator container in the compose stack. #[derive(Clone, Debug, Serialize)] pub struct NodeDescriptor { name: String, @@ -62,7 +62,6 @@ impl NodeDescriptor { "CFG_NETWORK_PORT", node.general.network_config.backend.swarm.port.to_string(), ), - EnvEntry::new("CFG_DA_PORT", node.da_port.to_string()), EnvEntry::new("CFG_BLEND_PORT", node.blend_port.to_string()), EnvEntry::new("CFG_API_PORT", api_port.to_string()), EnvEntry::new("CFG_TESTING_HTTP_PORT", testing_port.to_string()), diff --git a/testing-framework/deployers/compose/src/docker/control.rs b/testing-framework/deployers/compose/src/docker/control.rs index 9191a38..4849980 100644 --- a/testing-framework/deployers/compose/src/docker/control.rs +++ b/testing-framework/deployers/compose/src/docker/control.rs @@ -54,14 +54,4 @@ impl NodeControlHandle for ComposeNodeControl { .await .map_err(|err| format!("validator restart failed: {err}").into()) } - - async fn restart_executor(&self, index: usize) -> Result<(), DynError> { - restart_compose_service( - &self.compose_file, - &self.project_name, - &format!("executor-{index}"), - ) - .await - .map_err(|err| format!("executor restart failed: {err}").into()) - } } diff --git a/testing-framework/deployers/compose/src/errors.rs b/testing-framework/deployers/compose/src/errors.rs index b2f53f0..6bb7630 100644 --- a/testing-framework/deployers/compose/src/errors.rs +++ b/testing-framework/deployers/compose/src/errors.rs @@ -14,10 +14,8 @@ use crate::{docker::commands::ComposeCommandError, infrastructure::template::Tem #[derive(Debug, thiserror::Error)] /// Top-level compose runner errors. pub enum ComposeRunnerError { - #[error( - "compose runner requires at least one validator (validators={validators}, executors={executors})" - )] - MissingValidator { validators: usize, executors: usize }, + #[error("compose runner requires at least one validator (validators={validators})")] + MissingValidator { validators: usize }, #[error("docker does not appear to be available on this host")] DockerUnavailable, #[error("failed to resolve host port for {service} container port {container_port}: {source}")] diff --git a/testing-framework/deployers/compose/src/infrastructure/cfgsync.rs b/testing-framework/deployers/compose/src/infrastructure/cfgsync.rs index 590b80a..ed38901 100644 --- a/testing-framework/deployers/compose/src/infrastructure/cfgsync.rs +++ b/testing-framework/deployers/compose/src/infrastructure/cfgsync.rs @@ -71,7 +71,6 @@ pub fn update_cfgsync_config( use_kzg_mount, port, validators = topology.validators().len(), - executors = topology.executors().len(), "updating cfgsync template" ); let mut cfg = load_cfgsync_template(path)?; diff --git a/testing-framework/deployers/compose/src/infrastructure/environment.rs b/testing-framework/deployers/compose/src/infrastructure/environment.rs index a85c7ee..8fe51ad 100644 --- a/testing-framework/deployers/compose/src/infrastructure/environment.rs +++ b/testing-framework/deployers/compose/src/infrastructure/environment.rs @@ -139,10 +139,7 @@ pub fn ensure_supported_topology( ) -> Result<(), ComposeRunnerError> { let validators = descriptors.validators().len(); if validators == 0 { - return Err(ComposeRunnerError::MissingValidator { - validators, - executors: descriptors.executors().len(), - }); + return Err(ComposeRunnerError::MissingValidator { validators }); } Ok(()) } diff --git a/testing-framework/deployers/compose/src/infrastructure/ports.rs b/testing-framework/deployers/compose/src/infrastructure/ports.rs index 5cafbe1..7222cb6 100644 --- a/testing-framework/deployers/compose/src/infrastructure/ports.rs +++ b/testing-framework/deployers/compose/src/infrastructure/ports.rs @@ -25,11 +25,10 @@ pub struct NodeHostPorts { pub testing: u16, } -/// All host port mappings for validators and executors. +/// All host port mappings for validators. #[derive(Clone, Debug)] pub struct HostPortMapping { pub validators: Vec, - pub executors: Vec, } impl HostPortMapping { @@ -37,11 +36,6 @@ impl HostPortMapping { pub fn validator_api_ports(&self) -> Vec { self.validators.iter().map(|ports| ports.api).collect() } - - /// Returns API ports for all executors. - pub fn executor_api_ports(&self) -> Vec { - self.executors.iter().map(|ports| ports.api).collect() - } } /// Resolve host ports for all nodes from docker compose. @@ -53,7 +47,6 @@ pub async fn discover_host_ports( compose_file = %environment.compose_path().display(), project = environment.project_name(), validators = descriptors.validators().len(), - executors = descriptors.executors().len(), "resolving compose host ports" ); let mut validators = Vec::new(); @@ -64,22 +57,10 @@ pub async fn discover_host_ports( validators.push(NodeHostPorts { api, testing }); } - let mut executors = Vec::new(); - for node in descriptors.executors() { - let service = node_identifier(TopologyNodeRole::Executor, node.index()); - let api = resolve_service_port(environment, &service, node.api_port()).await?; - let testing = resolve_service_port(environment, &service, node.testing_http_port()).await?; - executors.push(NodeHostPorts { api, testing }); - } - - let mapping = HostPortMapping { - validators, - executors, - }; + let mapping = HostPortMapping { validators }; info!( validator_ports = ?mapping.validators, - executor_ports = ?mapping.executors, "compose host ports resolved" ); @@ -154,14 +135,9 @@ pub async fn ensure_remote_readiness_with_ports( .iter() .map(|ports| readiness_url(HttpNodeRole::Validator, ports.api)) .collect::, _>>()?; - let executor_urls = mapping - .executors - .iter() - .map(|ports| readiness_url(HttpNodeRole::Executor, ports.api)) - .collect::, _>>()?; descriptors - .wait_remote_readiness(&validator_urls, &executor_urls, None, None) + .wait_remote_readiness(&validator_urls) .await .map_err(|source| StackReadinessError::Remote { source }) } @@ -177,7 +153,6 @@ fn localhost_url(port: u16) -> Result { fn node_identifier(role: TopologyNodeRole, index: usize) -> String { match role { TopologyNodeRole::Validator => format!("validator-{index}"), - TopologyNodeRole::Executor => format!("executor-{index}"), } } diff --git a/testing-framework/deployers/compose/src/lifecycle/block_feed.rs b/testing-framework/deployers/compose/src/lifecycle/block_feed.rs index 8f69ab0..a664773 100644 --- a/testing-framework/deployers/compose/src/lifecycle/block_feed.rs +++ b/testing-framework/deployers/compose/src/lifecycle/block_feed.rs @@ -14,7 +14,6 @@ async fn spawn_block_feed_with( ) -> Result<(BlockFeed, BlockFeedTask), ComposeRunnerError> { debug!( validators = node_clients.validator_clients().len(), - executors = node_clients.executor_clients().len(), "selecting validator client for block feed" ); diff --git a/testing-framework/deployers/compose/src/lifecycle/readiness.rs b/testing-framework/deployers/compose/src/lifecycle/readiness.rs index 7c7082c..72a1016 100644 --- a/testing-framework/deployers/compose/src/lifecycle/readiness.rs +++ b/testing-framework/deployers/compose/src/lifecycle/readiness.rs @@ -11,7 +11,7 @@ use tokio::time::sleep; use crate::{ errors::{NodeClientError, StackReadinessError}, infrastructure::ports::{HostPortMapping, NodeHostPorts}, - lifecycle::wait::{wait_for_executors, wait_for_validators}, + lifecycle::wait::wait_for_validators, }; const DISABLED_READINESS_SLEEP: Duration = Duration::from_secs(5); @@ -25,15 +25,6 @@ pub async fn ensure_validators_ready_with_ports(ports: &[u16]) -> Result<(), Sta wait_for_validators(ports).await.map_err(Into::into) } -/// Wait until all executors respond on their API ports. -pub async fn ensure_executors_ready_with_ports(ports: &[u16]) -> Result<(), StackReadinessError> { - if ports.is_empty() { - return Ok(()); - } - - wait_for_executors(ports).await.map_err(Into::into) -} - /// Allow a brief pause when readiness probes are disabled. pub async fn maybe_sleep_for_disabled_readiness(readiness_enabled: bool) { if !readiness_enabled { @@ -53,14 +44,8 @@ pub fn build_node_clients_with_ports( .zip(mapping.validators.iter()) .map(|(node, ports)| api_client_from_host_ports(to_http_role(node.role()), ports, host)) .collect::, _>>()?; - let executors = descriptors - .executors() - .iter() - .zip(mapping.executors.iter()) - .map(|(node, ports)| api_client_from_host_ports(to_http_role(node.role()), ports, host)) - .collect::, _>>()?; - Ok(NodeClients::new(validators, executors)) + Ok(NodeClients::new(validators)) } fn api_client_from_host_ports( @@ -91,7 +76,6 @@ fn api_client_from_host_ports( fn to_http_role(role: TopologyNodeRole) -> testing_framework_core::scenario::http_probe::NodeRole { match role { TopologyNodeRole::Validator => HttpNodeRole::Validator, - TopologyNodeRole::Executor => HttpNodeRole::Executor, } } diff --git a/testing-framework/deployers/compose/src/lifecycle/wait.rs b/testing-framework/deployers/compose/src/lifecycle/wait.rs index 0d06ab0..4fb58ad 100644 --- a/testing-framework/deployers/compose/src/lifecycle/wait.rs +++ b/testing-framework/deployers/compose/src/lifecycle/wait.rs @@ -16,10 +16,6 @@ pub async fn wait_for_validators(ports: &[u16]) -> Result<(), HttpReadinessError wait_for_ports(ports, NodeRole::Validator).await } -pub async fn wait_for_executors(ports: &[u16]) -> Result<(), HttpReadinessError> { - wait_for_ports(ports, NodeRole::Executor).await -} - async fn wait_for_ports(ports: &[u16], role: NodeRole) -> Result<(), HttpReadinessError> { let host = compose_runner_host(); let timeout = compose_http_timeout(); diff --git a/testing-framework/deployers/k8s/Cargo.toml b/testing-framework/deployers/k8s/Cargo.toml index 7869e5c..2d5f978 100644 --- a/testing-framework/deployers/k8s/Cargo.toml +++ b/testing-framework/deployers/k8s/Cargo.toml @@ -15,19 +15,19 @@ workspace = true [dependencies] anyhow = "1" async-trait = { workspace = true } -k8s-openapi = { version = "0.20", features = ["latest"] } -kube = { version = "0.87", default-features = false, features = ["client", "runtime", "rustls-tls"] } +k8s-openapi = { features = ["latest"], version = "0.20" } +kube = { default-features = false, features = ["client", "runtime", "rustls-tls"], version = "0.87" } nomos-tracing = { workspace = true } nomos-tracing-service = { workspace = true } -reqwest = { workspace = true, features = ["json"] } -serde = { version = "1", features = ["derive"] } +reqwest = { features = ["json"], workspace = true } +serde = { features = ["derive"], version = "1" } serde_yaml = { workspace = true } tempfile = { workspace = true } testing-framework-config = { workspace = true } testing-framework-core = { path = "../../core" } testing-framework-env = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true, features = ["macros", "net", "process", "rt-multi-thread", "sync", "time"] } +tokio = { features = ["macros", "net", "process", "rt-multi-thread", "sync", "time"], workspace = true } tracing = { workspace = true } url = { version = "2" } -uuid = { version = "1", features = ["v4"] } +uuid = { features = ["v4"], version = "1" } diff --git a/testing-framework/deployers/k8s/helm/nomos-runner/templates/_helpers.tpl b/testing-framework/deployers/k8s/helm/nomos-runner/templates/_helpers.tpl index cd8406f..0a28c4f 100644 --- a/testing-framework/deployers/k8s/helm/nomos-runner/templates/_helpers.tpl +++ b/testing-framework/deployers/k8s/helm/nomos-runner/templates/_helpers.tpl @@ -29,11 +29,3 @@ nomos/logical-role: validator nomos/validator-index: "{{ $index }}" {{- end -}} -{{- define "nomos-runner.executorLabels" -}} -{{- $root := index . "root" -}} -{{- $index := index . "index" -}} -app.kubernetes.io/name: {{ include "nomos-runner.chart" $root }} -app.kubernetes.io/instance: {{ $root.Release.Name }} -nomos/logical-role: executor -nomos/executor-index: "{{ $index }}" -{{- end -}} diff --git a/testing-framework/deployers/k8s/helm/nomos-runner/templates/configmap.yaml b/testing-framework/deployers/k8s/helm/nomos-runner/templates/configmap.yaml index afa6fef..b47e88b 100644 --- a/testing-framework/deployers/k8s/helm/nomos-runner/templates/configmap.yaml +++ b/testing-framework/deployers/k8s/helm/nomos-runner/templates/configmap.yaml @@ -29,9 +29,4 @@ data: {{- else }} {{ "" | indent 4 }} {{- end }} - run_nomos_executor.sh: | -{{- if .Values.scripts.runNomosExecutorSh }} -{{ .Values.scripts.runNomosExecutorSh | indent 4 }} -{{- else }} -{{ "" | indent 4 }} -{{- end }} + diff --git a/testing-framework/deployers/k8s/helm/nomos-runner/templates/executor-deployments.yaml b/testing-framework/deployers/k8s/helm/nomos-runner/templates/executor-deployments.yaml deleted file mode 100644 index 0c10a5b..0000000 --- a/testing-framework/deployers/k8s/helm/nomos-runner/templates/executor-deployments.yaml +++ /dev/null @@ -1,73 +0,0 @@ -{{- $root := . -}} -{{- $nodes := default (list) .Values.executors.nodes }} -{{- range $i, $node := $nodes }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "nomos-runner.fullname" $root }}-executor-{{ $i }} - labels: - {{- include "nomos-runner.executorLabels" (dict "root" $root "index" $i) | nindent 4 }} -spec: - replicas: 1 - selector: - matchLabels: - {{- include "nomos-runner.executorLabels" (dict "root" $root "index" $i) | nindent 6 }} - template: - metadata: - labels: - {{- include "nomos-runner.executorLabels" (dict "root" $root "index" $i) | nindent 8 }} - spec: - containers: - - name: executor - image: {{ $root.Values.image }} - imagePullPolicy: {{ $root.Values.imagePullPolicy }} - command: ["/etc/nomos/scripts/run_nomos_executor.sh"] - ports: - - name: http - containerPort: {{ default 18080 $node.apiPort }} - - name: testing-http - containerPort: {{ default 18081 $node.testingHttpPort }} - env: - - name: CFG_SERVER_ADDR - value: http://{{ include "nomos-runner.fullname" $root }}-cfgsync:{{ $root.Values.cfgsync.port }} - - name: NOMOS_TIME_BACKEND - value: {{ $root.Values.timeBackend | default "monotonic" | quote }} - - name: LOGOS_BLOCKCHAIN_KZGRS_PARAMS_PATH - value: '{{ if eq $root.Values.kzg.mode "inImage" }}{{ $root.Values.kzg.inImageParamsPath }}{{ else }}{{ $root.Values.kzg.hostPathParamsPath }}{{ end }}' - {{- range $key, $value := $node.env }} - - name: {{ $key }} - value: "{{ $value }}" - {{- end }} - volumeMounts: - - name: assets - mountPath: /etc/nomos - readOnly: true - {{- if eq $root.Values.kzg.mode "hostPath" }} - - name: kzg-params - mountPath: /kzgrs_test_params - readOnly: true - {{- end }} - volumes: - - name: assets - configMap: - name: {{ include "nomos-runner.fullname" $root }}-assets - defaultMode: 0755 - items: - - key: cfgsync.yaml - path: cfgsync.yaml - - key: run_cfgsync.sh - path: scripts/run_cfgsync.sh - - key: run_nomos.sh - path: scripts/run_nomos.sh - - key: run_nomos_executor.sh - path: scripts/run_nomos_executor.sh - - key: run_nomos_node.sh - path: scripts/run_nomos_node.sh - {{- if eq $root.Values.kzg.mode "hostPath" }} - - name: kzg-params - persistentVolumeClaim: - claimName: {{ include "nomos-runner.fullname" $root }}-kzg - readOnly: true - {{- end }} -{{- end }} diff --git a/testing-framework/deployers/k8s/helm/nomos-runner/templates/executor-services.yaml b/testing-framework/deployers/k8s/helm/nomos-runner/templates/executor-services.yaml deleted file mode 100644 index 279a976..0000000 --- a/testing-framework/deployers/k8s/helm/nomos-runner/templates/executor-services.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- $root := . -}} -{{- $nodes := default (list) .Values.executors.nodes }} -{{- range $i, $node := $nodes }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "nomos-runner.fullname" $root }}-executor-{{ $i }} - labels: - {{- include "nomos-runner.executorLabels" (dict "root" $root "index" $i) | nindent 4 }} -spec: - type: NodePort - selector: - {{- include "nomos-runner.executorLabels" (dict "root" $root "index" $i) | nindent 4 }} - ports: - - name: http - port: {{ default 18080 $node.apiPort }} - targetPort: http - - name: testing-http - port: {{ default 18081 $node.testingHttpPort }} - targetPort: testing-http -{{- end }} diff --git a/testing-framework/deployers/k8s/helm/nomos-runner/values.yaml b/testing-framework/deployers/k8s/helm/nomos-runner/values.yaml index 5671f0d..b5083de 100644 --- a/testing-framework/deployers/k8s/helm/nomos-runner/values.yaml +++ b/testing-framework/deployers/k8s/helm/nomos-runner/values.yaml @@ -13,16 +13,11 @@ scripts: runCfgsyncSh: "" runNomosSh: "" runNomosNodeSh: "" - runNomosExecutorSh: "" validators: count: 1 nodes: [] -executors: - count: 1 - nodes: [] - kzg: mode: "hostPath" hostPathParamsPath: "/kzgrs_test_params/kzgrs_test_params" diff --git a/testing-framework/deployers/k8s/src/deployer/orchestrator.rs b/testing-framework/deployers/k8s/src/deployer/orchestrator.rs index 1dca17f..c0b366f 100644 --- a/testing-framework/deployers/k8s/src/deployer/orchestrator.rs +++ b/testing-framework/deployers/k8s/src/deployer/orchestrator.rs @@ -56,10 +56,8 @@ impl K8sDeployer { #[derive(Debug, thiserror::Error)] /// High-level runner failures returned to the scenario harness. pub enum K8sRunnerError { - #[error( - "kubernetes runner requires at least one validator and one executor (validators={validators}, executors={executors})" - )] - UnsupportedTopology { validators: usize, executors: usize }, + #[error("kubernetes runner requires at least one validator (validators={validators})")] + UnsupportedTopology { validators: usize }, #[error("failed to initialise kubernetes client: {source}")] ClientInit { #[source] @@ -125,12 +123,8 @@ impl From for K8sRunnerError { fn ensure_supported_topology(descriptors: &GeneratedTopology) -> Result<(), K8sRunnerError> { let validators = descriptors.validators().len(); - let executors = descriptors.executors().len(); - if validators == 0 || executors == 0 { - return Err(K8sRunnerError::UnsupportedTopology { - validators, - executors, - }); + if validators == 0 { + return Err(K8sRunnerError::UnsupportedTopology { validators }); } Ok(()) } @@ -144,14 +138,12 @@ async fn deploy_with_observability( let descriptors = scenario.topology().clone(); let validator_count = descriptors.validators().len(); - let executor_count = descriptors.executors().len(); ensure_supported_topology(&descriptors)?; let client = init_kube_client().await?; info!( validators = validator_count, - executors = executor_count, duration_secs = scenario.duration().as_secs(), readiness_checks = deployer.readiness_checks, metrics_query_url = observability.metrics_query_url.as_ref().map(|u| u.as_str()), @@ -204,7 +196,6 @@ async fn deploy_with_observability( block_feed, block_feed_guard, validator_count, - executor_count, ) } @@ -217,13 +208,12 @@ async fn setup_cluster( ) -> Result { let assets = prepare_assets(descriptors, observability.metrics_otlp_ingest_url.as_ref())?; let validators = descriptors.validators().len(); - let executors = descriptors.executors().len(); let (namespace, release) = cluster_identifiers(); - info!(%namespace, %release, validators, executors, "preparing k8s assets and namespace"); + info!(%namespace, %release, validators, "preparing k8s assets and namespace"); let mut cleanup_guard = - Some(install_stack(client, &assets, &namespace, &release, validators, executors).await?); + Some(install_stack(client, &assets, &namespace, &release, validators).await?); info!("waiting for helm-managed services to become ready"); let cluster_ready = @@ -346,15 +336,6 @@ fn maybe_print_endpoints( client.base_url() ); } - - let executor_clients = node_clients.executor_clients(); - for (idx, client) in executor_clients.iter().enumerate() { - println!( - "TESTNET_PPROF executor_{}={}/debug/pprof/profile?seconds=15&format=proto", - idx, - client.base_url() - ); - } } #[allow(clippy::too_many_arguments)] @@ -367,7 +348,6 @@ fn finalize_runner( block_feed: testing_framework_core::scenario::BlockFeed, block_feed_guard: BlockFeedTask, validator_count: usize, - executor_count: usize, ) -> Result { let environment = cluster .take() @@ -394,7 +374,6 @@ fn finalize_runner( info!( validators = validator_count, - executors = executor_count, duration_secs = duration.as_secs(), "k8s deployment ready; handing control to scenario runner" ); diff --git a/testing-framework/deployers/k8s/src/infrastructure/assets.rs b/testing-framework/deployers/k8s/src/infrastructure/assets.rs index 909ec9e..3febc0f 100644 --- a/testing-framework/deployers/k8s/src/infrastructure/assets.rs +++ b/testing-framework/deployers/k8s/src/infrastructure/assets.rs @@ -31,7 +31,6 @@ pub struct RunnerAssets { pub run_cfgsync_script: PathBuf, pub run_nomos_script: PathBuf, pub run_nomos_node_script: PathBuf, - pub run_nomos_executor_script: PathBuf, pub values_file: PathBuf, _tempdir: TempDir, } @@ -85,7 +84,6 @@ pub fn prepare_assets( ) -> Result { info!( validators = topology.validators().len(), - executors = topology.executors().len(), "preparing k8s runner assets" ); @@ -130,7 +128,6 @@ pub fn prepare_assets( run_nomos_script: scripts.run_shared, run_cfgsync_script: scripts.run_cfgsync, run_nomos_node_script: scripts.run_node, - run_nomos_executor_script: scripts.run_executor, values_file, _tempdir: tempdir, }) @@ -207,7 +204,6 @@ struct ScriptPaths { run_cfgsync: PathBuf, run_shared: PathBuf, run_node: PathBuf, - run_executor: PathBuf, } fn validate_scripts(root: &Path) -> Result { @@ -215,9 +211,8 @@ fn validate_scripts(root: &Path) -> Result { let run_cfgsync = scripts_dir.join("run_cfgsync.sh"); let run_shared = scripts_dir.join("run_nomos.sh"); let run_node = scripts_dir.join("run_nomos_node.sh"); - let run_executor = scripts_dir.join("run_nomos_executor.sh"); - for path in [&run_cfgsync, &run_shared, &run_node, &run_executor] { + for path in [&run_cfgsync, &run_shared, &run_node] { if !path.exists() { return Err(AssetsError::MissingScript { path: path.clone() }); } @@ -227,7 +222,6 @@ fn validate_scripts(root: &Path) -> Result { run_cfgsync = %run_cfgsync.display(), run_shared = %run_shared.display(), run_node = %run_node.display(), - run_executor = %run_executor.display(), "validated runner scripts exist" ); @@ -235,7 +229,6 @@ fn validate_scripts(root: &Path) -> Result { run_cfgsync, run_shared, run_node, - run_executor, }) } @@ -317,7 +310,6 @@ struct HelmValues { image_pull_policy: String, cfgsync: CfgsyncValues, validators: NodeGroup, - executors: NodeGroup, } #[derive(Serialize)] @@ -349,13 +341,11 @@ fn build_values(topology: &GeneratedTopology) -> HelmValues { tf_env::nomos_testnet_image_pull_policy().unwrap_or_else(|| "IfNotPresent".into()); debug!(pol_mode, "rendering Helm values for k8s stack"); let validators = build_node_group("validator", topology.validators(), &pol_mode); - let executors = build_node_group("executor", topology.executors(), &pol_mode); HelmValues { image_pull_policy, cfgsync, validators, - executors, } } @@ -385,7 +375,6 @@ fn build_node_values( let mut env = BTreeMap::new(); env.insert("POL_PROOF_DEV_MODE".into(), pol_mode.to_string()); env.insert("CFG_NETWORK_PORT".into(), node.network_port().to_string()); - env.insert("CFG_DA_PORT".into(), node.da_port.to_string()); env.insert("CFG_BLEND_PORT".into(), node.blend_port.to_string()); env.insert( "CFG_API_PORT".into(), diff --git a/testing-framework/deployers/k8s/src/infrastructure/cluster.rs b/testing-framework/deployers/k8s/src/infrastructure/cluster.rs index 96d2809..a0430a4 100644 --- a/testing-framework/deployers/k8s/src/infrastructure/cluster.rs +++ b/testing-framework/deployers/k8s/src/infrastructure/cluster.rs @@ -22,7 +22,6 @@ use crate::{ #[derive(Default)] pub struct PortSpecs { pub validators: Vec, - pub executors: Vec, } /// Holds k8s namespace, Helm release, port forwards, and cleanup guard. @@ -32,11 +31,8 @@ pub struct ClusterEnvironment { release: String, cleanup: Option, validator_host: String, - executor_host: String, validator_api_ports: Vec, validator_testing_ports: Vec, - executor_api_ports: Vec, - executor_testing_ports: Vec, port_forwards: Vec, } @@ -57,8 +53,6 @@ impl ClusterEnvironment { ) -> Self { let validator_api_ports = ports.validators.iter().map(|ports| ports.api).collect(); let validator_testing_ports = ports.validators.iter().map(|ports| ports.testing).collect(); - let executor_api_ports = ports.executors.iter().map(|ports| ports.api).collect(); - let executor_testing_ports = ports.executors.iter().map(|ports| ports.testing).collect(); Self { client, @@ -66,11 +60,8 @@ impl ClusterEnvironment { release, cleanup: Some(cleanup), validator_host: ports.validator_host.clone(), - executor_host: ports.executor_host.clone(), validator_api_ports, validator_testing_ports, - executor_api_ports, - executor_testing_ports, port_forwards, } } @@ -111,10 +102,6 @@ impl ClusterEnvironment { pub fn validator_ports(&self) -> (&[u16], &[u16]) { (&self.validator_api_ports, &self.validator_testing_ports) } - - pub fn executor_ports(&self) -> (&[u16], &[u16]) { - (&self.executor_api_ports, &self.executor_testing_ports) - } } #[derive(Debug, thiserror::Error)] @@ -162,23 +149,11 @@ pub fn collect_port_specs(descriptors: &GeneratedTopology) -> PortSpecs { testing: node.general.api_config.testing_http_address.port(), }) .collect(); - let executors = descriptors - .executors() - .iter() - .map(|node| NodeConfigPorts { - api: node.general.api_config.address.port(), - testing: node.general.api_config.testing_http_address.port(), - }) - .collect(); - let specs = PortSpecs { - validators, - executors, - }; + let specs = PortSpecs { validators }; debug!( validators = specs.validators.len(), - executors = specs.executors.len(), "collected k8s port specs" ); @@ -200,28 +175,10 @@ pub fn build_node_clients(cluster: &ClusterEnvironment) -> Result, _>>()?; - let executors = cluster - .executor_api_ports - .iter() - .copied() - .zip(cluster.executor_testing_ports.iter().copied()) - .map(|(api_port, testing_port)| { - api_client_from_ports( - &cluster.executor_host, - NodeRole::Executor, - api_port, - testing_port, - ) - }) - .collect::, _>>()?; - debug!( - validators = validators.len(), - executors = executors.len(), - "built k8s node clients" - ); + debug!(validators = validators.len(), "built k8s node clients"); - Ok(NodeClients::new(validators, executors)) + Ok(NodeClients::new(validators)) } pub async fn ensure_cluster_readiness( @@ -229,33 +186,18 @@ pub async fn ensure_cluster_readiness( cluster: &ClusterEnvironment, ) -> Result<(), RemoteReadinessError> { info!("waiting for remote readiness (API + membership)"); - let (validator_api, validator_testing) = cluster.validator_ports(); - let (executor_api, executor_testing) = cluster.executor_ports(); + let (validator_api, _validator_testing) = cluster.validator_ports(); let validator_urls = readiness_urls(validator_api, NodeRole::Validator, &cluster.validator_host)?; - let executor_urls = readiness_urls(executor_api, NodeRole::Executor, &cluster.executor_host)?; - let validator_membership_urls = readiness_urls( - validator_testing, - NodeRole::Validator, - &cluster.validator_host, - )?; - let executor_membership_urls = - readiness_urls(executor_testing, NodeRole::Executor, &cluster.executor_host)?; descriptors - .wait_remote_readiness( - &validator_urls, - &executor_urls, - Some(&validator_membership_urls), - Some(&executor_membership_urls), - ) + .wait_remote_readiness(&validator_urls) .await .map_err(|source| RemoteReadinessError::Remote { source })?; info!( validator_api_ports = ?validator_api, - executor_api_ports = ?executor_api, "k8s remote readiness confirmed" ); @@ -284,15 +226,13 @@ pub async fn install_stack( namespace: &str, release: &str, validators: usize, - executors: usize, ) -> Result { tracing::info!( release = %release, namespace = %namespace, "installing helm release" ); - crate::infrastructure::helm::install_release(assets, release, namespace, validators, executors) - .await?; + crate::infrastructure::helm::install_release(assets, release, namespace, validators).await?; tracing::info!(release = %release, "helm install succeeded"); let preserve = env::var("K8S_RUNNER_PRESERVE").is_ok(); @@ -313,24 +253,14 @@ pub async fn wait_for_ports_or_cleanup( ) -> Result { info!( validators = specs.validators.len(), - executors = specs.executors.len(), %namespace, %release, "waiting for cluster port-forwards" ); - match wait_for_cluster_ready( - client, - namespace, - release, - &specs.validators, - &specs.executors, - ) - .await - { + match wait_for_cluster_ready(client, namespace, release, &specs.validators).await { Ok(ports) => { info!( validator_ports = ?ports.ports.validators, - executor_ports = ?ports.ports.executors, "cluster port-forwards established" ); Ok(ports) diff --git a/testing-framework/deployers/k8s/src/infrastructure/helm.rs b/testing-framework/deployers/k8s/src/infrastructure/helm.rs index e4ed23b..3e35a8c 100644 --- a/testing-framework/deployers/k8s/src/infrastructure/helm.rs +++ b/testing-framework/deployers/k8s/src/infrastructure/helm.rs @@ -32,14 +32,12 @@ pub async fn install_release( release: &str, namespace: &str, validators: usize, - executors: usize, ) -> Result<(), HelmError> { let kzg = resolve_kzg_install_args(assets)?; info!( release, namespace, validators, - executors, image = %assets.image, cfgsync_port = cfgsync_port_value(), kzg_mode = ?assets.kzg_mode, @@ -49,9 +47,7 @@ pub async fn install_release( ); let command = format!("helm install {release}"); - let cmd = build_install_command( - assets, release, namespace, validators, executors, &kzg, &command, - ); + let cmd = build_install_command(assets, release, namespace, validators, &kzg, &command); let output = run_helm_command(cmd, &command).await?; maybe_log_install_output(&command, &output); @@ -102,7 +98,6 @@ fn build_install_command( release: &str, namespace: &str, validators: usize, - executors: usize, kzg: &KzgInstallArgs<'_>, command: &str, ) -> Command { @@ -121,8 +116,6 @@ fn build_install_command( .arg("--set") .arg(format!("validators.count={validators}")) .arg("--set") - .arg(format!("executors.count={executors}")) - .arg("--set") .arg(format!("cfgsync.port={}", cfgsync_port_value())) .arg("-f") .arg(&assets.values_file) @@ -145,11 +138,6 @@ fn build_install_command( "scripts.runNomosSh={}", assets.run_nomos_script.display() )) - .arg("--set-file") - .arg(format!( - "scripts.runNomosExecutorSh={}", - assets.run_nomos_executor_script.display() - )) .stdout(Stdio::piped()) .stderr(Stdio::piped()); diff --git a/testing-framework/deployers/k8s/src/lifecycle/block_feed.rs b/testing-framework/deployers/k8s/src/lifecycle/block_feed.rs index e72f9c0..ff444cc 100644 --- a/testing-framework/deployers/k8s/src/lifecycle/block_feed.rs +++ b/testing-framework/deployers/k8s/src/lifecycle/block_feed.rs @@ -8,7 +8,6 @@ pub async fn spawn_block_feed_with( ) -> Result<(BlockFeed, BlockFeedTask), K8sRunnerError> { debug!( validators = node_clients.validator_clients().len(), - executors = node_clients.executor_clients().len(), "selecting node client for block feed" ); diff --git a/testing-framework/deployers/k8s/src/lifecycle/wait/mod.rs b/testing-framework/deployers/k8s/src/lifecycle/wait/mod.rs index 0c97ffa..a24a59c 100644 --- a/testing-framework/deployers/k8s/src/lifecycle/wait/mod.rs +++ b/testing-framework/deployers/k8s/src/lifecycle/wait/mod.rs @@ -42,9 +42,7 @@ pub struct HostPort { #[derive(Debug)] pub struct ClusterPorts { pub validators: Vec, - pub executors: Vec, pub validator_host: String, - pub executor_host: String, } /// Success result from waiting for the cluster: host ports and forward handles. diff --git a/testing-framework/deployers/k8s/src/lifecycle/wait/orchestrator.rs b/testing-framework/deployers/k8s/src/lifecycle/wait/orchestrator.rs index 02fc01c..b5a5abe 100644 --- a/testing-framework/deployers/k8s/src/lifecycle/wait/orchestrator.rs +++ b/testing-framework/deployers/k8s/src/lifecycle/wait/orchestrator.rs @@ -14,7 +14,6 @@ pub async fn wait_for_cluster_ready( namespace: &str, release: &str, validator_ports: &[NodeConfigPorts], - executor_ports: &[NodeConfigPorts], ) -> Result { if validator_ports.is_empty() { return Err(ClusterWaitError::MissingValidator); @@ -69,70 +68,11 @@ pub async fn wait_for_cluster_ready( } } - let mut executor_allocations = Vec::with_capacity(executor_ports.len()); - let mut executor_host = crate::host::node_host(); - for (index, ports) in executor_ports.iter().enumerate() { - let name = format!("{release}-executor-{index}"); - wait_for_deployment_ready(client, namespace, &name).await?; - let allocation = discover_node_ports(client, namespace, &name, *ports).await?; - executor_allocations.push(allocation); - } - - let executor_api_ports: Vec = executor_allocations.iter().map(|ports| ports.api).collect(); - if !executor_allocations.is_empty() - && wait_for_node_http_nodeport(&executor_api_ports, NodeRole::Executor) - .await - .is_err() - { - executor_allocations.clear(); - executor_host = "127.0.0.1".to_owned(); - let namespace = namespace.to_owned(); - let release = release.to_owned(); - let ports = executor_ports.to_vec(); - let (forwards, allocations) = match tokio::task::spawn_blocking(move || { - let mut allocations = Vec::with_capacity(ports.len()); - let forwards = - port_forward_group(&namespace, &release, "executor", &ports, &mut allocations)?; - Ok::<_, ClusterWaitError>((forwards, allocations)) - }) - .await - { - Ok(result) => result?, - Err(source) => { - return Err(cleanup_port_forwards( - &mut port_forwards, - ClusterWaitError::PortForwardTask { - source: source.into(), - }, - )); - } - }; - port_forwards.extend(forwards); - executor_allocations = allocations; - let executor_api_ports: Vec = - executor_allocations.iter().map(|ports| ports.api).collect(); - if let Err(err) = - wait_for_node_http_port_forward(&executor_api_ports, NodeRole::Executor).await - { - return Err(cleanup_port_forwards(&mut port_forwards, err)); - } - } - Ok(ClusterReady { ports: ClusterPorts { validators: validator_allocations, - executors: executor_allocations, validator_host, - executor_host, }, port_forwards, }) } - -fn cleanup_port_forwards( - port_forwards: &mut Vec, - error: ClusterWaitError, -) -> ClusterWaitError { - kill_port_forwards(port_forwards); - error -} diff --git a/testing-framework/deployers/local/Cargo.toml b/testing-framework/deployers/local/Cargo.toml index 03b714f..46e9b56 100644 --- a/testing-framework/deployers/local/Cargo.toml +++ b/testing-framework/deployers/local/Cargo.toml @@ -13,15 +13,14 @@ version = "0.1.0" workspace = true [dependencies] -async-trait = "0.1" -logos-blockchain-executor = { workspace = true } -nomos-libp2p = { workspace = true } -nomos-network = { workspace = true } -nomos-node = { workspace = true } -nomos-utils = { workspace = true } -rand = { workspace = true } -testing-framework-config = { workspace = true } -testing-framework-core = { path = "../../core" } -thiserror = { workspace = true } -tokio = { workspace = true } -tracing = { workspace = true } +async-trait = "0.1" +nomos-libp2p = { workspace = true } +nomos-network = { workspace = true } +nomos-node = { workspace = true } +nomos-utils = { workspace = true } +rand = { workspace = true } +testing-framework-config = { workspace = true } +testing-framework-core = { path = "../../core" } +thiserror = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } diff --git a/testing-framework/deployers/local/src/manual/mod.rs b/testing-framework/deployers/local/src/manual/mod.rs index 621c93d..e72f859 100644 --- a/testing-framework/deployers/local/src/manual/mod.rs +++ b/testing-framework/deployers/local/src/manual/mod.rs @@ -56,13 +56,6 @@ impl LocalManualCluster { .await?) } - pub async fn start_executor(&self, name: &str) -> Result { - Ok(self - .nodes - .start_executor_with(name, StartNodeOptions::default()) - .await?) - } - pub async fn start_validator_with( &self, name: &str, @@ -71,14 +64,6 @@ impl LocalManualCluster { Ok(self.nodes.start_validator_with(name, options).await?) } - pub async fn start_executor_with( - &self, - name: &str, - options: StartNodeOptions, - ) -> Result { - Ok(self.nodes.start_executor_with(name, options).await?) - } - pub fn stop_all(&self) { self.nodes.stop_all(); } @@ -119,16 +104,6 @@ impl ManualClusterHandle for LocalManualCluster { .map_err(|err| err.into()) } - async fn start_executor_with( - &self, - name: &str, - options: StartNodeOptions, - ) -> Result { - self.start_executor_with(name, options) - .await - .map_err(|err| err.into()) - } - async fn wait_network_ready(&self) -> Result<(), DynError> { self.wait_network_ready().await.map_err(|err| err.into()) } diff --git a/testing-framework/deployers/local/src/node_control/config.rs b/testing-framework/deployers/local/src/node_control/config.rs index 0afa369..7e1cb8e 100644 --- a/testing-framework/deployers/local/src/node_control/config.rs +++ b/testing-framework/deployers/local/src/node_control/config.rs @@ -46,7 +46,6 @@ pub(super) fn build_general_config_for( let id = random_node_id(); let network_port = allocate_udp_port("network port")?; - let da_port = allocate_udp_port("DA port")?; let blend_port = allocate_udp_port("Blend port")?; let topology = descriptors.config(); let initial_peers = @@ -55,10 +54,8 @@ pub(super) fn build_general_config_for( id, network_port, initial_peers, - da_port, blend_port, &topology.consensus_params, - &topology.da_params, &topology.wallet_config, base_consensus, base_time, @@ -75,7 +72,6 @@ fn descriptor_for( ) -> Option<&GeneratedNodeConfig> { match role { NodeRole::Validator => descriptors.validators().get(index), - NodeRole::Executor => descriptors.executors().get(index), } } diff --git a/testing-framework/deployers/local/src/node_control/mod.rs b/testing-framework/deployers/local/src/node_control/mod.rs index c191516..cd31237 100644 --- a/testing-framework/deployers/local/src/node_control/mod.rs +++ b/testing-framework/deployers/local/src/node_control/mod.rs @@ -3,13 +3,11 @@ use std::{ sync::Mutex, }; -use logos_blockchain_executor::config::Config as ExecutorConfig; use nomos_node::Config as ValidatorConfig; use testing_framework_config::topology::configs::{consensus, time}; use testing_framework_core::{ nodes::{ ApiClient, - executor::{Executor, create_executor_config}, validator::{Validator, create_validator_config}, }, scenario::{DynError, NodeControlHandle, StartNodeOptions, StartedNode}, @@ -57,7 +55,6 @@ pub struct LocalDynamicNodes { #[derive(Clone, Default)] pub struct LocalDynamicSeed { pub validator_count: usize, - pub executor_count: usize, pub peer_ports: Vec, pub peer_ports_by_name: HashMap, } @@ -74,17 +71,10 @@ impl LocalDynamicSeed { .validators() .iter() .map(|node| (format!("validator-{}", node.index()), node.network_port())) - .chain( - descriptors - .executors() - .iter() - .map(|node| (format!("executor-{}", node.index()), node.network_port())), - ) .collect(); Self { validator_count: descriptors.validators().len(), - executor_count: descriptors.executors().len(), peer_ports, peer_ports_by_name, } @@ -110,7 +100,6 @@ impl LocalDynamicNodes { let base_node = descriptors .validators() .first() - .or_else(|| descriptors.executors().first()) .expect("generated topology must include at least one node"); let base_consensus = base_node.general.consensus_config.clone(); @@ -118,12 +107,10 @@ impl LocalDynamicNodes { let state = LocalDynamicState { validator_count: seed.validator_count, - executor_count: seed.executor_count, peer_ports: seed.peer_ports.clone(), peer_ports_by_name: seed.peer_ports_by_name.clone(), clients_by_name: HashMap::new(), validators: Vec::new(), - executors: Vec::new(), }; Self { @@ -153,14 +140,12 @@ impl LocalDynamicNodes { .unwrap_or_else(|poisoned| poisoned.into_inner()); state.validators.clear(); - state.executors.clear(); state.peer_ports.clone_from(&self.seed.peer_ports); state .peer_ports_by_name .clone_from(&self.seed.peer_ports_by_name); state.clients_by_name.clear(); state.validator_count = self.seed.validator_count; - state.executor_count = self.seed.executor_count; self.node_clients.clear(); } @@ -172,14 +157,6 @@ impl LocalDynamicNodes { self.start_node(NodeRole::Validator, name, options).await } - pub async fn start_executor_with( - &self, - name: &str, - options: StartNodeOptions, - ) -> Result { - self.start_node(NodeRole::Executor, name, options).await - } - pub(crate) fn readiness_nodes(&self) -> Vec { let state = self .state @@ -190,12 +167,6 @@ impl LocalDynamicNodes { .validators .iter() .map(|node| node.config().network.backend.swarm.port) - .chain( - state - .executors - .iter() - .map(|node| node.config().network.backend.swarm.port), - ) .collect::>(); let initial_peer_ports = state @@ -210,15 +181,6 @@ impl LocalDynamicNodes { .filter_map(multiaddr_port) .collect::>() }) - .chain(state.executors.iter().map(|node| { - node.config() - .network - .backend - .initial_peers - .iter() - .filter_map(multiaddr_port) - .collect::>() - })) .collect::>(); let expected_peer_counts = find_expected_peer_counts(&listen_ports, &initial_peer_ports); @@ -235,17 +197,6 @@ impl LocalDynamicNodes { expected_peers: expected_peer_counts.get(idx).copied(), api: node.api().clone(), }) - .chain(state.executors.iter().enumerate().map(|(idx, node)| { - let global_idx = state.validators.len() + idx; - ReadinessNode { - label: format!( - "executor#{idx}@{}", - node.config().network.backend.swarm.port - ), - expected_peers: expected_peer_counts.get(global_idx).copied(), - api: node.api().clone(), - } - })) .collect::>() } @@ -263,7 +214,6 @@ impl LocalDynamicNodes { let (index, role_label) = match role { NodeRole::Validator => (state.validator_count, "validator"), - NodeRole::Executor => (state.executor_count, "executor"), }; let label = if name.trim().is_empty() { @@ -303,11 +253,6 @@ impl LocalDynamicNodes { self.spawn_and_register_validator(&node_name, network_port, config) .await? } - NodeRole::Executor => { - let config = create_executor_config(general_config); - self.spawn_and_register_executor(&node_name, network_port, config) - .await? - } }; Ok(StartedNode { @@ -339,29 +284,6 @@ impl LocalDynamicNodes { Ok(client) } - - async fn spawn_and_register_executor( - &self, - node_name: &str, - network_port: u16, - config: ExecutorConfig, - ) -> Result { - let node = Executor::spawn(config, node_name) - .await - .map_err(|source| LocalDynamicError::Spawn { source })?; - let client = node.api().clone(); - - self.node_clients.add_executor(client.clone()); - - let mut state = self - .state - .lock() - .unwrap_or_else(|poisoned| poisoned.into_inner()); - - state.register_executor(node_name, network_port, client.clone(), node); - - Ok(client) - } } #[async_trait::async_trait] @@ -370,22 +292,12 @@ impl NodeControlHandle for LocalDynamicNodes { Err("local deployer does not support restart_validator".into()) } - async fn restart_executor(&self, _index: usize) -> Result<(), DynError> { - Err("local deployer does not support restart_executor".into()) - } - async fn start_validator(&self, name: &str) -> Result { self.start_validator_with(name, StartNodeOptions::default()) .await .map_err(|err| err.into()) } - async fn start_executor(&self, name: &str) -> Result { - self.start_executor_with(name, StartNodeOptions::default()) - .await - .map_err(|err| err.into()) - } - async fn start_validator_with( &self, name: &str, @@ -396,16 +308,6 @@ impl NodeControlHandle for LocalDynamicNodes { .map_err(|err| err.into()) } - async fn start_executor_with( - &self, - name: &str, - options: StartNodeOptions, - ) -> Result { - self.start_executor_with(name, options) - .await - .map_err(|err| err.into()) - } - fn node_client(&self, name: &str) -> Option { self.node_client(name) } diff --git a/testing-framework/deployers/local/src/node_control/state.rs b/testing-framework/deployers/local/src/node_control/state.rs index 738cbc7..b3c4ddb 100644 --- a/testing-framework/deployers/local/src/node_control/state.rs +++ b/testing-framework/deployers/local/src/node_control/state.rs @@ -1,15 +1,13 @@ use std::collections::HashMap; -use testing_framework_core::nodes::{ApiClient, executor::Executor, validator::Validator}; +use testing_framework_core::nodes::{ApiClient, validator::Validator}; pub(crate) struct LocalDynamicState { pub(crate) validator_count: usize, - pub(crate) executor_count: usize, pub(crate) peer_ports: Vec, pub(crate) peer_ports_by_name: HashMap, pub(crate) clients_by_name: HashMap, pub(crate) validators: Vec, - pub(crate) executors: Vec, } impl LocalDynamicState { @@ -31,16 +29,4 @@ impl LocalDynamicState { self.validator_count += 1; self.validators.push(node); } - - pub(super) fn register_executor( - &mut self, - node_name: &str, - network_port: u16, - client: ApiClient, - node: Executor, - ) { - self.register_common(node_name, network_port, client); - self.executor_count += 1; - self.executors.push(node); - } } diff --git a/testing-framework/deployers/local/src/runner.rs b/testing-framework/deployers/local/src/runner.rs index a89ae9c..fc4d7d3 100644 --- a/testing-framework/deployers/local/src/runner.rs +++ b/testing-framework/deployers/local/src/runner.rs @@ -19,7 +19,7 @@ use crate::{ manual::{LocalManualCluster, ManualClusterError}, node_control::{LocalDynamicNodes, LocalDynamicSeed}, }; -/// Spawns validators and executors as local processes, reusing the existing +/// Spawns validators as local processes, reusing the existing /// integration harness. #[derive(Clone)] pub struct LocalDeployer {} @@ -67,7 +67,6 @@ impl Deployer<()> for LocalDeployer { async fn deploy(&self, scenario: &Scenario<()>) -> Result { info!( validators = scenario.topology().validators().len(), - executors = scenario.topology().executors().len(), "starting local deployment" ); let topology = Self::prepare_topology(scenario).await?; @@ -99,7 +98,6 @@ impl Deployer for LocalDeployer { ) -> Result { info!( validators = scenario.topology().validators().len(), - executors = scenario.topology().executors().len(), "starting local deployment with node control" ); @@ -149,8 +147,7 @@ impl LocalDeployer { info!( validators = descriptors.validators().len(), - executors = descriptors.executors().len(), - "spawning local validators/executors" + "spawning local validators" ); let topology = descriptors @@ -188,7 +185,6 @@ async fn spawn_block_feed_with( ) -> Result<(BlockFeed, BlockFeedTask), LocalDeployerError> { debug!( validators = node_clients.validator_clients().len(), - executors = node_clients.executor_clients().len(), "selecting validator client for local block feed" ); diff --git a/testing-framework/tools/cfgsync_tf/Cargo.toml b/testing-framework/tools/cfgsync_tf/Cargo.toml index 47f8c44..6951e60 100644 --- a/testing-framework/tools/cfgsync_tf/Cargo.toml +++ b/testing-framework/tools/cfgsync_tf/Cargo.toml @@ -19,9 +19,7 @@ clap = { default-features = false, version = "4" } groth16 = { workspace = true } hex = { workspace = true } key-management-system-service = { workspace = true } -logos-blockchain-executor = { workspace = true } nomos-core = { workspace = true } -nomos-da-network-core = { workspace = true } nomos-libp2p = { workspace = true } nomos-node = { workspace = true } nomos-tracing-service = { workspace = true } @@ -33,7 +31,6 @@ serde_json = { default-features = false, version = "1.0" } serde_path_to_error = "0.1" serde_with = { workspace = true } serde_yaml = "0.9" -subnetworks-assignations = { workspace = true } testing-framework-config = { workspace = true } testing-framework-core = { path = "../../core" } thiserror = { workspace = true } diff --git a/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs b/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs index 4f312eb..d09f86e 100644 --- a/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs +++ b/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs @@ -1,20 +1,11 @@ -use std::{ - collections::{HashMap, HashSet}, - env, fs, - net::Ipv4Addr, - process, - str::FromStr, -}; +use std::{env, fs, net::Ipv4Addr, process}; use cfgsync_tf::{ client::{FetchedConfig, get_config}, server::ClientIp, }; -use logos_blockchain_executor::config::Config as ExecutorConfig; -use nomos_libp2p::PeerId; use nomos_node::Config as ValidatorConfig; use serde::{Serialize, de::DeserializeOwned}; -use subnetworks_assignations::{MembershipCreator, MembershipHandler, SubnetworkId}; use testing_framework_config::constants::cfgsync_port as default_cfgsync_port; use testing_framework_core::nodes::common::config::injection::{ inject_ibd_into_cryptarchia, normalize_ed25519_sigs, @@ -27,53 +18,14 @@ fn parse_ip(ip_str: &str) -> Ipv4Addr { }) } -fn parse_assignations(raw: &serde_json::Value) -> Option>> { - let assignations = raw - .pointer("/da_network/membership/assignations")? - .as_object()?; - let mut result = HashMap::new(); - - for (subnetwork, peers) in assignations { - let subnetwork_id = SubnetworkId::from_str(subnetwork).ok()?; - let mut members = HashSet::new(); - - for peer in peers.as_array()? { - if let Some(peer) = peer.as_str().and_then(|p| PeerId::from_str(p).ok()) { - members.insert(peer); - } - } - - result.insert(subnetwork_id, members); - } - - Some(result) -} - -fn apply_da_assignations< - Membership: MembershipCreator + MembershipHandler, ->( - membership: &Membership, - assignations: HashMap>, -) -> Membership { - let session_id = membership.session_id(); - membership.init(session_id, assignations) -} - -async fn pull_to_file( - payload: ClientIp, - url: &str, - config_file: &str, - apply_membership: F, -) -> Result<(), String> +async fn pull_to_file(payload: ClientIp, url: &str, config_file: &str) -> Result<(), String> where Config: Serialize + DeserializeOwned, - F: FnOnce(&mut Config, HashMap>), { - let FetchedConfig { mut config, raw } = get_config::(payload, url).await?; - - if let Some(assignations) = parse_assignations(&raw) { - apply_membership(&mut config, assignations); - } + let FetchedConfig { + config, + raw: _unused, + } = get_config::(payload, url).await?; let mut yaml_value = serde_yaml::to_value(&config) .map_err(|err| format!("Failed to serialize config to YAML value: {err}"))?; @@ -97,12 +49,9 @@ async fn main() { let identifier = env::var("CFG_HOST_IDENTIFIER").unwrap_or_else(|_| "unidentified-node".to_owned()); - let host_kind = env::var("CFG_HOST_KIND").unwrap_or_else(|_| "validator".to_owned()); - let network_port = env::var("CFG_NETWORK_PORT") .ok() .and_then(|v| v.parse().ok()); - let da_port = env::var("CFG_DA_PORT").ok().and_then(|v| v.parse().ok()); let blend_port = env::var("CFG_BLEND_PORT").ok().and_then(|v| v.parse().ok()); let api_port = env::var("CFG_API_PORT").ok().and_then(|v| v.parse().ok()); let testing_http_port = env::var("CFG_TESTING_HTTP_PORT") @@ -113,43 +62,15 @@ async fn main() { ip, identifier, network_port, - da_port, blend_port, api_port, testing_http_port, }; - let node_config_endpoint = match host_kind.as_str() { - "executor" => format!("{server_addr}/executor"), - _ => format!("{server_addr}/validator"), - }; + let node_config_endpoint = format!("{server_addr}/validator"); - let config_result = match host_kind.as_str() { - "executor" => { - pull_to_file::( - payload, - &node_config_endpoint, - &config_file_path, - |config, assignations| { - config.da_network.membership = - apply_da_assignations(&config.da_network.membership, assignations); - }, - ) - .await - } - _ => { - pull_to_file::( - payload, - &node_config_endpoint, - &config_file_path, - |config, assignations| { - config.da_network.membership = - apply_da_assignations(&config.da_network.membership, assignations); - }, - ) - .await - } - }; + let config_result = + pull_to_file::(payload, &node_config_endpoint, &config_file_path).await; // Handle error if the config request fails if let Err(err) = config_result { diff --git a/testing-framework/tools/cfgsync_tf/src/config/builder.rs b/testing-framework/tools/cfgsync_tf/src/config/builder.rs index 1e50cb2..44a1f51 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/builder.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/builder.rs @@ -3,14 +3,12 @@ use std::{collections::HashMap, net::Ipv4Addr, str::FromStr as _}; use nomos_core::mantle::GenesisTx as _; use nomos_libp2p::{Multiaddr, PeerId, ed25519}; use nomos_tracing_service::TracingSettings; -use nomos_utils::net::get_available_udp_port; use rand::{Rng as _, thread_rng}; use testing_framework_config::topology::configs::{ GeneralConfig, api::GeneralApiConfig, base::{BaseConfigError, BaseConfigs, build_base_configs}, consensus::{ConsensusConfigError, ConsensusParams, create_genesis_tx_with_declarations}, - da::DaParams, network::NetworkParams, time::default_time_config, wallet::WalletConfig, @@ -24,27 +22,23 @@ use crate::{ tracing::update_tracing_identifier, validation::{ValidationError, validate_inputs}, }, - host::{Host, HostKind, sort_hosts}, + host::{Host, sort_hosts}, network::rewrite_initial_peers, }; pub fn create_node_configs( consensus_params: &ConsensusParams, - da_params: &DaParams, tracing_settings: &TracingSettings, wallet_config: &WalletConfig, ids: Option>, - da_ports: Option>, blend_ports: Option>, hosts: Vec, ) -> Result, NodeConfigBuildError> { try_create_node_configs( consensus_params, - da_params, tracing_settings, wallet_config, ids, - da_ports, blend_ports, hosts, ) @@ -81,41 +75,29 @@ pub enum NodeConfigBuildError { pub fn try_create_node_configs( consensus_params: &ConsensusParams, - da_params: &DaParams, tracing_settings: &TracingSettings, wallet_config: &WalletConfig, ids: Option>, - da_ports: Option>, blend_ports: Option>, hosts: Vec, ) -> Result, NodeConfigBuildError> { let hosts = sort_hosts(hosts); - validate_inputs( - &hosts, - consensus_params, - ids.as_ref(), - da_ports.as_ref(), - blend_ports.as_ref(), - )?; + validate_inputs(&hosts, consensus_params, ids.as_ref(), blend_ports.as_ref())?; let ids = generate_ids(consensus_params.n_participants, ids); - let ports = resolve_da_ports(consensus_params.n_participants, da_ports)?; let blend_ports = resolve_blend_ports(&hosts, blend_ports); let BaseConfigs { mut consensus_configs, bootstrap_configs, - da_configs, network_configs, blend_configs, } = build_base_configs( &ids, consensus_params, - da_params, &NetworkParams::default(), wallet_config, - &ports, &blend_ports, )?; @@ -139,7 +121,7 @@ pub fn try_create_node_configs( &peer_ids, )?; - let providers = try_create_providers(&hosts, &consensus_configs, &blend_configs, &da_configs)?; + let providers = try_create_providers(&hosts, &consensus_configs, &blend_configs)?; let first_consensus = consensus_configs .get(0) @@ -151,12 +133,11 @@ pub fn try_create_node_configs( c.genesis_tx = genesis_tx.clone(); } - let kms_configs = create_kms_configs(&blend_configs, &da_configs); + let kms_configs = create_kms_configs(&blend_configs); for (i, host) in hosts.into_iter().enumerate() { if i >= consensus_configs.len() || i >= api_configs.len() - || i >= da_configs.len() || i >= network_configs.len() || i >= blend_configs.len() || i >= host_network_init_peers.len() @@ -169,18 +150,6 @@ pub fn try_create_node_configs( let consensus_config = consensus_configs[i].clone(); let api_config = api_configs[i].clone(); - let mut da_config = da_configs[i].clone(); - let da_addr_value = format!("/ip4/0.0.0.0/udp/{}/quic-v1", host.da_network_port); - da_config.listening_address = Multiaddr::from_str(&da_addr_value).map_err(|source| { - NodeConfigBuildError::InvalidMultiaddr { - value: da_addr_value, - message: source.to_string(), - } - })?; - if matches!(host.kind, HostKind::Validator) { - da_config.policy_settings.min_dispersal_peers = 0; - } - let mut network_config = network_configs[i].clone(); network_config.backend.swarm.host = Ipv4Addr::UNSPECIFIED; network_config.backend.swarm.port = host.network_port; @@ -215,7 +184,6 @@ pub fn try_create_node_configs( GeneralConfig { consensus_config, bootstrapping_config: bootstrap_configs[i].clone(), - da_config, network_config, blend_config, api_config, @@ -241,17 +209,6 @@ fn generate_ids(count: usize, ids: Option>) -> Vec<[u8; 32]> { }) } -fn resolve_da_ports( - count: usize, - da_ports: Option>, -) -> Result, NodeConfigBuildError> { - da_ports.map(Ok).unwrap_or_else(|| { - (0..count) - .map(|_| get_available_udp_port().ok_or(NodeConfigBuildError::PortAllocFailed)) - .collect() - }) -} - fn resolve_blend_ports(hosts: &[Host], blend_ports: Option>) -> Vec { blend_ports.unwrap_or_else(|| hosts.iter().map(|h| h.blend_port).collect()) } diff --git a/testing-framework/tools/cfgsync_tf/src/config/kms.rs b/testing-framework/tools/cfgsync_tf/src/config/kms.rs index 8f49d37..a7a76c9 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/kms.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/kms.rs @@ -1,15 +1,11 @@ use groth16::fr_to_bytes; use key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; -use testing_framework_config::topology::configs::{blend::GeneralBlendConfig, da::GeneralDaConfig}; +use testing_framework_config::topology::configs::blend::GeneralBlendConfig; -pub fn create_kms_configs( - blend_configs: &[GeneralBlendConfig], - da_configs: &[GeneralDaConfig], -) -> Vec { - da_configs +pub fn create_kms_configs(blend_configs: &[GeneralBlendConfig]) -> Vec { + blend_configs .iter() - .zip(blend_configs.iter()) - .map(|(da_conf, blend_conf)| PreloadKMSBackendSettings { + .map(|blend_conf| PreloadKMSBackendSettings { keys: [ ( hex::encode(blend_conf.signer.public_key().to_bytes()), @@ -21,14 +17,6 @@ pub fn create_kms_configs( )), Key::Zk(blend_conf.secret_zk_key.clone()), ), - ( - hex::encode(da_conf.signer.public_key().to_bytes()), - Key::Ed25519(da_conf.signer.clone()), - ), - ( - hex::encode(fr_to_bytes(da_conf.secret_zk_key.to_public_key().as_fr())), - Key::Zk(da_conf.secret_zk_key.clone()), - ), ] .into(), }) diff --git a/testing-framework/tools/cfgsync_tf/src/config/providers.rs b/testing-framework/tools/cfgsync_tf/src/config/providers.rs index eda8535..e5ff712 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/providers.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/providers.rs @@ -5,7 +5,6 @@ use nomos_libp2p::Multiaddr; use testing_framework_config::topology::configs::{ blend::GeneralBlendConfig, consensus::{GeneralConsensusConfig, ProviderInfo}, - da::GeneralDaConfig, }; use thiserror::Error; @@ -15,16 +14,10 @@ use crate::host::Host; pub enum ProviderBuildError { #[error("consensus configs are empty")] MissingConsensusConfigs, - #[error( - "config length mismatch (hosts={hosts}, da_configs={da_configs}, blend_configs={blend_configs})" - )] - HostConfigLenMismatch { - hosts: usize, - da_configs: usize, - blend_configs: usize, - }, - #[error("consensus notes length mismatch (da_notes={da_notes}, blend_notes={blend_notes})")] - NoteLenMismatch { da_notes: usize, blend_notes: usize }, + #[error("config length mismatch (hosts={hosts}, blend_configs={blend_configs})")] + HostConfigLenMismatch { hosts: usize, blend_configs: usize }, + #[error("consensus notes length mismatch, blend_notes={blend_notes})")] + NoteLenMismatch { blend_notes: usize }, #[error("failed to parse multiaddr '{value}': {message}")] InvalidMultiaddr { value: String, message: String }, } @@ -33,16 +26,14 @@ pub fn try_create_providers( hosts: &[Host], consensus_configs: &[GeneralConsensusConfig], blend_configs: &[GeneralBlendConfig], - da_configs: &[GeneralDaConfig], ) -> Result, ProviderBuildError> { let first = consensus_configs .first() .ok_or(ProviderBuildError::MissingConsensusConfigs)?; - validate_provider_inputs(hosts, first, da_configs, blend_configs)?; + validate_provider_inputs(hosts, first, blend_configs)?; - let mut providers = Vec::with_capacity(da_configs.len() + blend_configs.len()); - providers.extend(build_da_providers(hosts, first, da_configs)?); + let mut providers = Vec::with_capacity(blend_configs.len()); providers.extend(build_blend_providers(hosts, first, blend_configs)?); Ok(providers) } @@ -51,28 +42,24 @@ pub fn create_providers( hosts: &[Host], consensus_configs: &[GeneralConsensusConfig], blend_configs: &[GeneralBlendConfig], - da_configs: &[GeneralDaConfig], ) -> Result, ProviderBuildError> { - try_create_providers(hosts, consensus_configs, blend_configs, da_configs) + try_create_providers(hosts, consensus_configs, blend_configs) } fn validate_provider_inputs( hosts: &[Host], first: &GeneralConsensusConfig, - da_configs: &[GeneralDaConfig], blend_configs: &[GeneralBlendConfig], ) -> Result<(), ProviderBuildError> { - if hosts.len() != da_configs.len() || hosts.len() != blend_configs.len() { + if hosts.len() != blend_configs.len() { return Err(ProviderBuildError::HostConfigLenMismatch { hosts: hosts.len(), - da_configs: da_configs.len(), blend_configs: blend_configs.len(), }); } - if first.da_notes.len() < da_configs.len() || first.blend_notes.len() < blend_configs.len() { + if first.blend_notes.len() < blend_configs.len() { return Err(ProviderBuildError::NoteLenMismatch { - da_notes: first.da_notes.len(), blend_notes: first.blend_notes.len(), }); } @@ -80,27 +67,6 @@ fn validate_provider_inputs( Ok(()) } -fn build_da_providers( - hosts: &[Host], - first: &GeneralConsensusConfig, - da_configs: &[GeneralDaConfig], -) -> Result, ProviderBuildError> { - da_configs - .iter() - .enumerate() - .map(|(i, da_conf)| { - let locator = locator_for_host(hosts, i, hosts[i].da_network_port)?; - Ok(ProviderInfo { - service_type: ServiceType::DataAvailability, - provider_sk: da_conf.signer.clone(), - zk_sk: da_conf.secret_zk_key.clone(), - locator, - note: first.da_notes[i].clone(), - }) - }) - .collect() -} - fn build_blend_providers( hosts: &[Host], first: &GeneralConsensusConfig, diff --git a/testing-framework/tools/cfgsync_tf/src/config/validation.rs b/testing-framework/tools/cfgsync_tf/src/config/validation.rs index afaad54..041b26a 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/validation.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/validation.rs @@ -18,7 +18,6 @@ pub fn validate_inputs( hosts: &[Host], consensus_params: &ConsensusParams, ids: Option<&Vec<[u8; 32]>>, - da_ports: Option<&Vec>, blend_ports: Option<&Vec>, ) -> Result<(), ValidationError> { let expected = consensus_params.n_participants; @@ -30,7 +29,7 @@ pub fn validate_inputs( }); } - validate_node_vectors(expected, ids, da_ports, blend_ports)?; + validate_node_vectors(expected, ids, blend_ports)?; Ok(()) } diff --git a/testing-framework/tools/cfgsync_tf/src/host.rs b/testing-framework/tools/cfgsync_tf/src/host.rs index 76c2f68..3f480d0 100644 --- a/testing-framework/tools/cfgsync_tf/src/host.rs +++ b/testing-framework/tools/cfgsync_tf/src/host.rs @@ -1,14 +1,12 @@ use std::net::Ipv4Addr; use testing_framework_config::constants::{ - DEFAULT_API_PORT, DEFAULT_BLEND_NETWORK_PORT, DEFAULT_DA_NETWORK_PORT, - DEFAULT_LIBP2P_NETWORK_PORT, + DEFAULT_API_PORT, DEFAULT_BLEND_NETWORK_PORT, DEFAULT_LIBP2P_NETWORK_PORT, }; #[derive(Copy, Clone, Eq, PartialEq, Hash)] pub enum HostKind { Validator, - Executor, } #[derive(Eq, PartialEq, Hash, Clone)] @@ -17,7 +15,6 @@ pub struct Host { pub ip: Ipv4Addr, pub identifier: String, pub network_port: u16, - pub da_network_port: u16, pub blend_port: u16, pub api_port: u16, pub testing_http_port: u16, @@ -26,7 +23,6 @@ pub struct Host { #[derive(Clone, Copy)] pub struct PortOverrides { pub network_port: Option, - pub da_network_port: Option, pub blend_port: Option, pub api_port: Option, pub testing_http_port: Option, @@ -39,7 +35,6 @@ impl Host { ip, identifier, network_port: ports.network_port.unwrap_or(DEFAULT_LIBP2P_NETWORK_PORT), - da_network_port: ports.da_network_port.unwrap_or(DEFAULT_DA_NETWORK_PORT), blend_port: ports.blend_port.unwrap_or(DEFAULT_BLEND_NETWORK_PORT), api_port: ports.api_port.unwrap_or(DEFAULT_API_PORT), testing_http_port: ports.testing_http_port.unwrap_or(DEFAULT_API_PORT + 1), @@ -50,11 +45,6 @@ impl Host { pub fn validator_from_ip(ip: Ipv4Addr, identifier: String, ports: PortOverrides) -> Self { Self::from_parts(HostKind::Validator, ip, identifier, ports) } - - #[must_use] - pub fn executor_from_ip(ip: Ipv4Addr, identifier: String, ports: PortOverrides) -> Self { - Self::from_parts(HostKind::Executor, ip, identifier, ports) - } } #[must_use] @@ -68,7 +58,6 @@ pub fn sort_hosts(mut hosts: Vec) -> Vec { .unwrap_or(0); let kind = match host.kind { HostKind::Validator => 0, - HostKind::Executor => 1, }; (kind, index) }); diff --git a/testing-framework/tools/cfgsync_tf/src/repo.rs b/testing-framework/tools/cfgsync_tf/src/repo.rs index e7b2c46..657bae3 100644 --- a/testing-framework/tools/cfgsync_tf/src/repo.rs +++ b/testing-framework/tools/cfgsync_tf/src/repo.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, sync::Arc, time::Duration}; use nomos_tracing_service::TracingSettings; use testing_framework_config::topology::configs::{ - GeneralConfig, consensus::ConsensusParams, da::DaParams, wallet::WalletConfig, + GeneralConfig, consensus::ConsensusParams, wallet::WalletConfig, }; use tokio::{ sync::{Mutex, oneshot::Sender}, @@ -24,33 +24,27 @@ pub struct ConfigRepo { waiting_hosts: Mutex>>, n_hosts: usize, consensus_params: ConsensusParams, - da_params: DaParams, tracing_settings: TracingSettings, wallet_config: WalletConfig, timeout_duration: Duration, ids: Option>, - da_ports: Option>, blend_ports: Option>, } impl From for Arc { fn from(config: CfgSyncConfig) -> Self { let consensus_params = config.to_consensus_params(); - let da_params = config.to_da_params(); let tracing_settings = config.to_tracing_settings(); let wallet_config = config.wallet_config(); let ids = config.ids; - let da_ports = config.da_ports; let blend_ports = config.blend_ports; ConfigRepo::new( config.n_hosts, consensus_params, - da_params, tracing_settings, wallet_config, ids, - da_ports, blend_ports, Duration::from_secs(config.timeout), ) @@ -62,11 +56,9 @@ impl ConfigRepo { pub fn new( n_hosts: usize, consensus_params: ConsensusParams, - da_params: DaParams, tracing_settings: TracingSettings, wallet_config: WalletConfig, ids: Option>, - da_ports: Option>, blend_ports: Option>, timeout_duration: Duration, ) -> Arc { @@ -74,11 +66,9 @@ impl ConfigRepo { waiting_hosts: Mutex::new(HashMap::new()), n_hosts, consensus_params, - da_params, tracing_settings, wallet_config, ids, - da_ports, blend_ports, timeout_duration, }); @@ -150,11 +140,9 @@ fn generate_node_configs( ) -> Result, String> { try_create_node_configs( &repo.consensus_params, - &repo.da_params, &repo.tracing_settings, &repo.wallet_config, repo.ids.clone(), - repo.da_ports.clone(), repo.blend_ports.clone(), hosts, ) diff --git a/testing-framework/tools/cfgsync_tf/src/server.rs b/testing-framework/tools/cfgsync_tf/src/server.rs index 55aa399..c14cf35 100644 --- a/testing-framework/tools/cfgsync_tf/src/server.rs +++ b/testing-framework/tools/cfgsync_tf/src/server.rs @@ -1,31 +1,18 @@ use std::{fs, net::Ipv4Addr, num::NonZero, path::PathBuf, sync::Arc, time::Duration}; -// DA Policy Constants -const DEFAULT_MAX_DISPERSAL_FAILURES: usize = 3; -const DEFAULT_MAX_SAMPLING_FAILURES: usize = 3; -const DEFAULT_MAX_REPLICATION_FAILURES: usize = 3; -const DEFAULT_MALICIOUS_THRESHOLD: usize = 10; - -// DA Network Constants -const DEFAULT_SUBNETS_REFRESH_INTERVAL_SECS: u64 = 30; - // Bootstrap Constants const DEFAULT_DELAY_BEFORE_NEW_DOWNLOAD_SECS: u64 = 10; const DEFAULT_MAX_ORPHAN_CACHE_SIZE: usize = 5; use axum::{Json, Router, extract::State, http::StatusCode, response::IntoResponse, routing::post}; -use nomos_da_network_core::swarm::{ - DAConnectionMonitorSettings, DAConnectionPolicySettings, ReplicationConfig, -}; use nomos_tracing_service::TracingSettings; use nomos_utils::bounded_duration::{MinimalBoundedDuration, SECOND}; use serde::{Deserialize, Serialize}; use serde_json::{Value, json, to_value}; use serde_with::serde_as; -use subnetworks_assignations::MembershipHandler; use testing_framework_config::{ - nodes::{executor::create_executor_config, validator::create_validator_config}, - topology::configs::{consensus::ConsensusParams, da::DaParams, wallet::WalletConfig}, + nodes::validator::create_validator_config, + topology::configs::{consensus::ConsensusParams, wallet::WalletConfig}, }; use tokio::sync::oneshot::channel; @@ -48,8 +35,6 @@ pub struct CfgSyncConfig { #[serde(default)] pub ids: Option>, #[serde(default)] - pub da_ports: Option>, - #[serde(default)] pub blend_ports: Option>, // DaConfig related parameters @@ -68,7 +53,6 @@ pub struct CfgSyncConfig { pub monitor_failure_time_window: Duration, #[serde_as(as = "MinimalBoundedDuration<0, SECOND>")] pub balancer_interval: Duration, - pub replication_settings: ReplicationConfig, pub retry_shares_limit: usize, pub retry_commitments_limit: usize, @@ -93,37 +77,6 @@ impl CfgSyncConfig { } } - #[must_use] - pub fn to_da_params(&self) -> DaParams { - DaParams { - subnetwork_size: self.subnetwork_size, - dispersal_factor: self.dispersal_factor, - num_samples: self.num_samples, - num_subnets: self.num_subnets, - old_blobs_check_interval: self.old_blobs_check_interval, - blobs_validity_duration: self.blobs_validity_duration, - global_params_path: self.global_params_path.clone(), - policy_settings: DAConnectionPolicySettings { - min_dispersal_peers: self.min_dispersal_peers, - min_replication_peers: self.min_replication_peers, - max_dispersal_failures: DEFAULT_MAX_DISPERSAL_FAILURES, - max_sampling_failures: DEFAULT_MAX_SAMPLING_FAILURES, - max_replication_failures: DEFAULT_MAX_REPLICATION_FAILURES, - malicious_threshold: DEFAULT_MALICIOUS_THRESHOLD, - }, - monitor_settings: DAConnectionMonitorSettings { - failure_time_window: self.monitor_failure_time_window, - ..Default::default() - }, - balancer_interval: self.balancer_interval, - redial_cooldown: Duration::ZERO, - replication_settings: self.replication_settings, - subnets_refresh_interval: Duration::from_secs(DEFAULT_SUBNETS_REFRESH_INTERVAL_SECS), - retry_shares_limit: self.retry_shares_limit, - retry_commitments_limit: self.retry_commitments_limit, - } - } - #[must_use] pub fn to_tracing_settings(&self) -> TracingSettings { self.tracing_settings.clone() @@ -142,8 +95,6 @@ pub struct ClientIp { #[serde(default)] pub network_port: Option, #[serde(default)] - pub da_port: Option, - #[serde(default)] pub blend_port: Option, #[serde(default)] pub api_port: Option, @@ -159,14 +110,12 @@ async fn validator_config( ip, identifier, network_port, - da_port, blend_port, api_port, testing_http_port, } = payload; let ports = PortOverrides { network_port, - da_network_port: da_port, blend_port, api_port, testing_http_port, @@ -195,64 +144,6 @@ async fn validator_config( inject_defaults(&mut value); override_api_ports(&mut value, &ports); - inject_da_assignations(&mut value, &config.da_network.membership); - override_min_session_members(&mut value); - - (StatusCode::OK, Json(value)).into_response() - } - RepoResponse::Timeout => (StatusCode::REQUEST_TIMEOUT).into_response(), - RepoResponse::Error(message) => { - (StatusCode::INTERNAL_SERVER_ERROR, message).into_response() - } - }, - ) -} - -async fn executor_config( - State(config_repo): State>, - Json(payload): Json, -) -> impl IntoResponse { - let ClientIp { - ip, - identifier, - network_port, - da_port, - blend_port, - api_port, - testing_http_port, - } = payload; - let ports = PortOverrides { - network_port, - da_network_port: da_port, - blend_port, - api_port, - testing_http_port, - }; - - let (reply_tx, reply_rx) = channel(); - config_repo - .register(Host::executor_from_ip(ip, identifier, ports), reply_tx) - .await; - - (reply_rx.await).map_or_else( - |_| (StatusCode::INTERNAL_SERVER_ERROR, "Error receiving config").into_response(), - |config_response| match config_response { - RepoResponse::Config(config) => { - let config = create_executor_config(*config); - let mut value = match to_value(&config) { - Ok(value) => value, - Err(err) => { - return ( - StatusCode::INTERNAL_SERVER_ERROR, - format!("failed to serialize executor config: {err}"), - ) - .into_response(); - } - }; - - inject_defaults(&mut value); - override_api_ports(&mut value, &ports); - inject_da_assignations(&mut value, &config.da_network.membership); override_min_session_members(&mut value); (StatusCode::OK, Json(value)).into_response() @@ -268,7 +159,6 @@ async fn executor_config( pub fn cfgsync_app(config_repo: Arc) -> Router { Router::new() .route("/validator", post(validator_config)) - .route("/executor", post(executor_config)) .with_state(config_repo) } @@ -286,41 +176,6 @@ fn override_api_ports(config: &mut Value, ports: &PortOverrides) { } } -fn inject_da_assignations( - config: &mut Value, - membership: &nomos_node::LogosBlockchainDaMembership, -) { - struct SubnetAssignment { - subnet_id: String, - peers: Vec, - } - - fn convert_subnet_to_assignment( - subnet_id: impl ToString, - members: impl IntoIterator, - ) -> SubnetAssignment { - let peers = members.into_iter().map(|peer| peer.to_string()).collect(); - - SubnetAssignment { - subnet_id: subnet_id.to_string(), - peers, - } - } - - let subnetworks = membership.subnetworks(); - let assignations: std::collections::HashMap> = subnetworks - .into_iter() - .map(|(subnet_id, members)| convert_subnet_to_assignment(subnet_id, members)) - .map(|assignment| (assignment.subnet_id, assignment.peers)) - .collect(); - - if let Some(membership) = config.pointer_mut("/da_network/membership") { - if let Some(map) = membership.as_object_mut() { - map.insert("assignations".to_string(), json!(assignations)); - } - } -} - fn override_min_session_members(config: &mut Value) { if let Some(value) = config.pointer_mut("/da_network/min_session_members") { *value = json!(1); diff --git a/testing-framework/workflows/Cargo.toml b/testing-framework/workflows/Cargo.toml index cd4a4d6..58b6337 100644 --- a/testing-framework/workflows/Cargo.toml +++ b/testing-framework/workflows/Cargo.toml @@ -22,7 +22,7 @@ reqwest = { workspace = true } testing-framework-config = { workspace = true } testing-framework-core = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true, features = ["macros", "net", "rt-multi-thread", "time"] } +tokio = { features = ["macros", "net", "rt-multi-thread", "time"], workspace = true } tracing = { workspace = true } [package.metadata.cargo-machete] diff --git a/testing-framework/workflows/src/builder/mod.rs b/testing-framework/workflows/src/builder/mod.rs index 9762fa2..c75e42d 100644 --- a/testing-framework/workflows/src/builder/mod.rs +++ b/testing-framework/workflows/src/builder/mod.rs @@ -531,7 +531,6 @@ impl ChaosBuilder { max_delay: DEFAULT_CHAOS_MAX_DELAY, target_cooldown: DEFAULT_CHAOS_TARGET_COOLDOWN, include_validators: true, - include_executors: true, } } } @@ -542,7 +541,6 @@ pub struct ChaosRestartBuilder { max_delay: Duration, target_cooldown: Duration, include_validators: bool, - include_executors: bool, } impl ChaosRestartBuilder { @@ -588,13 +586,6 @@ impl ChaosRestartBuilder { self } - #[must_use] - /// Include executors in the restart target set. - pub const fn include_executors(mut self, enabled: bool) -> Self { - self.include_executors = enabled; - self - } - #[must_use] /// Finalize the chaos restart workload and attach it to the scenario. pub fn apply(mut self) -> CoreScenarioBuilder { @@ -614,10 +605,9 @@ impl ChaosRestartBuilder { ); self.target_cooldown = self.min_delay; } - if !self.include_validators && !self.include_executors { + if !self.include_validators { tracing::warn!("chaos restart requires at least one node group; enabling all targets"); self.include_validators = true; - self.include_executors = true; } let workload = RandomRestartWorkload::new( @@ -625,7 +615,6 @@ impl ChaosRestartBuilder { self.max_delay, self.target_cooldown, self.include_validators, - self.include_executors, ); self.builder = self.builder.with_workload(workload); self.builder diff --git a/testing-framework/workflows/src/expectations/consensus_liveness.rs b/testing-framework/workflows/src/expectations/consensus_liveness.rs index 571320e..7136606 100644 --- a/testing-framework/workflows/src/expectations/consensus_liveness.rs +++ b/testing-framework/workflows/src/expectations/consensus_liveness.rs @@ -67,7 +67,7 @@ enum ConsensusLivenessIssue { #[derive(Debug, Error)] enum ConsensusLivenessError { - #[error("consensus liveness requires at least one validator or executor")] + #[error("consensus liveness requires at least one validator")] MissingParticipants, #[error("consensus liveness violated (target={target}):\n{details}")] Violations { diff --git a/testing-framework/workflows/src/workloads/chaos.rs b/testing-framework/workflows/src/workloads/chaos.rs index 7a3142f..ea137b9 100644 --- a/testing-framework/workflows/src/workloads/chaos.rs +++ b/testing-framework/workflows/src/workloads/chaos.rs @@ -8,14 +8,13 @@ use tracing::info; const MIN_DELAY_SPREAD_FALLBACK: Duration = Duration::from_millis(1); -/// Randomly restarts validators and executors during a run to introduce chaos. +/// Randomly restarts validators during a run to introduce chaos. #[derive(Debug)] pub struct RandomRestartWorkload { min_delay: Duration, max_delay: Duration, target_cooldown: Duration, include_validators: bool, - include_executors: bool, } impl RandomRestartWorkload { @@ -23,21 +22,19 @@ impl RandomRestartWorkload { /// /// `min_delay`/`max_delay` bound the sleep between restart attempts, while /// `target_cooldown` prevents repeatedly restarting the same node too - /// quickly. Validators or executors can be selectively included. + /// quickly. Validators can be selectively included. #[must_use] pub const fn new( min_delay: Duration, max_delay: Duration, target_cooldown: Duration, include_validators: bool, - include_executors: bool, ) -> Self { Self { min_delay, max_delay, target_cooldown, include_validators, - include_executors, } } @@ -53,11 +50,6 @@ impl RandomRestartWorkload { info!("chaos restart skipping validators: only one validator configured"); } } - if self.include_executors { - for index in 0..ctx.descriptors().executors().len() { - targets.push(Target::Executor(index)); - } - } targets } @@ -155,7 +147,6 @@ impl Workload for RandomRestartWorkload { tracing::info!( config = ?self, validators = ctx.descriptors().validators().len(), - executors = ctx.descriptors().executors().len(), target_count = targets.len(), "starting chaos restart workload" ); @@ -174,13 +165,6 @@ impl Workload for RandomRestartWorkload { .await .map_err(|err| format!("validator restart failed: {err}"))? } - Target::Executor(index) => { - tracing::info!(index, "chaos restarting executor"); - handle - .restart_executor(index) - .await - .map_err(|err| format!("executor restart failed: {err}"))? - } } cooldowns.insert(target, Instant::now() + self.target_cooldown); @@ -191,5 +175,4 @@ impl Workload for RandomRestartWorkload { #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] enum Target { Validator(usize), - Executor(usize), } diff --git a/testing-framework/workflows/src/workloads/transaction/workload.rs b/testing-framework/workflows/src/workloads/transaction/workload.rs index 4f8c1e2..e5574dd 100644 --- a/testing-framework/workflows/src/workloads/transaction/workload.rs +++ b/testing-framework/workflows/src/workloads/transaction/workload.rs @@ -75,7 +75,6 @@ impl ScenarioWorkload for Workload { let reference_node = descriptors .validators() .first() - .or_else(|| descriptors.executors().first()) .ok_or("transaction workload requires at least one node in the topology")?; let utxo_map = wallet_utxo_map(reference_node); diff --git a/testing-framework/workflows/src/workloads/util.rs b/testing-framework/workflows/src/workloads/util.rs index 0a48d4e..0e89e32 100644 --- a/testing-framework/workflows/src/workloads/util.rs +++ b/testing-framework/workflows/src/workloads/util.rs @@ -49,11 +49,9 @@ pub async fn submit_transaction_via_cluster( let node_clients = ctx.node_clients(); let mut validator_clients = node_clients.validator_clients(); - let mut executor_clients = node_clients.executor_clients(); validator_clients.shuffle(&mut thread_rng()); - executor_clients.shuffle(&mut thread_rng()); - let clients = validator_clients.into_iter().chain(executor_clients); + let clients = validator_clients.into_iter(); let mut clients: Vec<_> = clients.collect(); let mut last_err = None; diff --git a/versions.env b/versions.env index 544a806..0464058 100644 --- a/versions.env +++ b/versions.env @@ -1,7 +1,7 @@ VERSION=v0.3.2 NOMOS_BUNDLE_VERSION=v4 # Pinned logos-blockchain-node revision used for CI builds and binary bundles. -NOMOS_NODE_REV=97b411ed0ce269e72a6253c8cd48eea41db5ab71 +NOMOS_NODE_REV=47ae18e95f643bde563b4769212b37f6f018fed3 # Optional: local logos-blockchain-node checkout override (do not commit absolute paths). # NOMOS_NODE_PATH=