From 79037d7279800aa676f93817c94a7d2cb4a98c1d Mon Sep 17 00:00:00 2001 From: andrussal Date: Fri, 27 Mar 2026 10:42:47 +0100 Subject: [PATCH] Refactor generic compose and k8s runners --- .cargo-deny.toml | 18 +- .github/workflows/build-binaries.yml | 78 - .github/workflows/lint.yml | 411 -- .pre-commit-config.yaml | 6 - Cargo.lock | 5130 +---------------- Cargo.toml | 61 - logos/README.md | 33 - logos/examples/Cargo.toml | 31 - logos/examples/doc-snippets/Cargo.toml | 23 - .../src/architecture_overview_builder_api.rs | 15 - .../src/chaos_workloads_random_restart.rs | 20 - .../custom_workload_example_expectation.rs | 35 - .../src/custom_workload_example_workload.rs | 61 - .../doc-snippets/src/dsl_cheat_sheet_build.rs | 8 - .../dsl_cheat_sheet_build_complete_example.rs | 24 - .../src/dsl_cheat_sheet_deployers.rs | 14 - .../src/dsl_cheat_sheet_expectations.rs | 10 - .../src/dsl_cheat_sheet_imports.rs | 7 - .../src/dsl_cheat_sheet_run_duration.rs | 12 - .../src/dsl_cheat_sheet_topology.rs | 8 - .../dsl_cheat_sheet_transactions_workload.rs | 14 - .../src/dsl_cheat_sheet_wallets.rs | 10 - .../src/dsl_cheat_sheet_workload_chaos.rs | 20 - .../src/dsl_cheat_sheet_workload_execution.rs | 16 - ...examples_advanced_aggressive_chaos_test.rs | 29 - ...examples_advanced_load_progression_test.rs | 25 - .../examples_advanced_sustained_load_test.rs | 21 - .../src/examples_chaos_resilience.rs | 29 - .../src/examples_da_and_transactions.rs | 21 - .../src/examples_simple_consensus.rs | 19 - .../src/examples_transaction_workload.rs | 21 - .../internal_crate_reference_add_deployer.rs | 19 - ...e_reference_add_expectation_builder_ext.rs | 20 - ...l_crate_reference_add_expectation_trait.rs | 16 - ...rate_reference_add_workload_builder_ext.rs | 11 - ...rnal_crate_reference_add_workload_trait.rs | 16 - ..._reference_add_workload_use_in_examples.rs | 34 - logos/examples/doc-snippets/src/lib.rs | 47 - .../manual_cluster_external_driver_example.rs | 59 - .../src/manual_cluster_validation_patterns.rs | 60 - .../src/node_control_accessing_control.rs | 19 - .../doc-snippets/src/node_control_trait.rs | 7 - .../src/quickstart_adjust_topology.rs | 17 - .../src/quickstart_core_api_pattern.rs | 26 - .../src/quickstart_step_1_topology.rs | 8 - .../src/quickstart_step_2_wallets.rs | 6 - .../src/quickstart_step_3_workloads.rs | 11 - .../src/quickstart_step_4_expectation.rs | 6 - .../src/quickstart_step_5_run_duration.rs | 7 - .../quickstart_step_6_deploy_and_execute.rs | 13 - .../src/quickstart_swap_deployer_compose.rs | 14 - ..._philosophy_declarative_over_imperative.rs | 20 - .../testing_philosophy_determinism_first.rs | 33 - .../testing_philosophy_minimum_run_windows.rs | 22 - ..._philosophy_protocol_time_not_wall_time.rs | 23 - logos/examples/src/bin/compose_runner.rs | 83 - logos/examples/src/bin/k8s_runner.rs | 80 - logos/examples/src/bin/local_runner.rs | 72 - logos/examples/src/defaults.rs | 62 - logos/examples/src/demo.rs | 6 - logos/examples/src/env.rs | 41 - logos/examples/src/lib.rs | 14 - .../tests/compose_attach_node_control.rs | 55 - logos/examples/tests/deployer_parity.rs | 120 - logos/examples/tests/dynamic_join.rs | 152 - .../tests/expectation_fail_fast_capture.rs | 65 - .../examples/tests/external_sources_local.rs | 283 - .../examples/tests/k8s_attach_node_control.rs | 55 - .../examples/tests/local_deployer_restart.rs | 90 - logos/examples/tests/manual_cluster.rs | 78 - logos/examples/tests/node_config_override.rs | 128 - logos/examples/tests/orphan_manual_cluster.rs | 111 - logos/infra/assets/stack/Dockerfile.base | 106 - logos/infra/assets/stack/Dockerfile.runtime | 9 - logos/infra/assets/stack/Dockerfile.testnet | 9 - .../stack/monitoring/grafana/dashboards.yml | 8 - .../grafana/dashboards/api-dashboard.json | 468 -- .../dashboards/api-detailed-dashboard.json | 402 -- .../grafana/dashboards/blend-dashboard.json | 696 --- .../dashboards/consensus-dashboard.json | 1965 ------- .../grafana/dashboards/da-dashboard.json | 980 ---- .../issues-diagnostics-dashboard.json | 822 --- .../dashboards/kms-wallet-dashboard.json | 328 -- .../grafana/dashboards/mempool-dashboard.json | 567 -- .../dashboards/overview-dashboard.json | 1026 ---- .../grafana/dashboards/sdp-dashboard.json | 347 -- .../grafana/dashboards/storage-dashboard.json | 453 -- .../storage-detailed-dashboard.json | 288 - .../stack/monitoring/grafana/datasources.yaml | 11 - .../stack/monitoring/grafana/grafana.ini | 51 - .../stack/monitoring/grafana/plugins.env | 1 - .../assets/stack/monitoring/prometheus.yml | 4 - .../infra/assets/stack/monitoring/tempo.yaml | 53 - .../stack/scripts/docker/build_cfgsync.sh | 13 - .../stack/scripts/docker/prepare_binaries.sh | 67 - .../setup-logos-blockchain-circuits.sh | 118 - logos/infra/helm/logos-runner/Chart.yaml | 6 - .../helm/logos-runner/templates/_helpers.tpl | 34 - .../templates/cfgsync-deployment.yaml | 45 - .../templates/cfgsync-service.yaml | 15 - .../logos-runner/templates/configmap.yaml | 37 - .../infra/helm/logos-runner/templates/pv.yaml | 18 - .../helm/logos-runner/templates/pvc.yaml | 16 - .../templates/validator-deployments.yaml | 61 - .../templates/validator-services.yaml | 26 - logos/infra/helm/logos-runner/values.yaml | 20 - logos/runtime/env/Cargo.toml | 15 - logos/runtime/env/src/lib.rs | 73 - logos/runtime/ext/Cargo.toml | 34 - logos/runtime/ext/src/cfgsync/mod.rs | 157 - logos/runtime/ext/src/compose_env.rs | 393 -- logos/runtime/ext/src/constants.rs | 13 - logos/runtime/ext/src/k8s_env.rs | 648 --- logos/runtime/ext/src/lib.rs | 168 - logos/runtime/ext/src/scenario/mod.rs | 212 - logos/runtime/workloads/Cargo.toml | 19 - logos/runtime/workloads/src/lib.rs | 9 - .../runtime/workloads/src/workflows/manual.rs | 77 - logos/runtime/workloads/src/workflows/mod.rs | 5 - logos/runtime/workloads/src/workloads/mod.rs | 7 - rust-toolchain.toml | 2 +- scripts/build/build-bundle.sh | 446 -- scripts/build/build-linux-binaries.sh | 156 - scripts/build/build_test_image.sh | 253 - scripts/checks/check-node-rev-sync.sh | 40 - scripts/lib/common.sh | 4 +- .../observability/compose/docker-compose.yml | 10 - .../compose/prometheus/prometheus.yml | 3 - scripts/observability/deploy.sh | 13 +- .../k8s/kube-prometheus-stack.values.yaml | 9 - scripts/ops/push-ecr-test.sh | 54 - scripts/ops/update-nomos-rev.sh | 249 - scripts/run/checks.sh | 20 +- scripts/run/run-examples.sh | 589 -- scripts/run/run-test-matrix.sh | 306 - .../setup/setup-logos-blockchain-circuits.sh | 245 - scripts/setup/setup-observability.sh | 33 +- .../assets/stack/scripts/run_cfgsync.sh | 0 .../assets/stack/scripts/run_logos.sh | 0 .../assets/stack/scripts/run_logos_node.sh | 0 testing-framework/core/Cargo.toml | 4 + testing-framework/core/src/cfgsync/mod.rs | 120 + .../deployers/compose/Cargo.toml | 5 +- .../deployers/compose/src/deployer/mod.rs | 9 +- .../compose/src/deployer/orchestrator.rs | 28 +- .../deployers/compose/src/deployer/setup.rs | 28 +- .../deployers/compose/src/descriptor/node.rs | 49 + .../compose/src/docker/config_server.rs | 239 + .../deployers/compose/src/docker/mod.rs | 159 +- .../deployers/compose/src/docker/workspace.rs | 15 +- .../deployers/compose/src/env.rs | 124 +- .../compose/src/infrastructure/environment.rs | 113 +- .../compose/src/infrastructure/ports.rs | 4 +- .../deployers/compose/src/lib.rs | 6 +- testing-framework/deployers/k8s/Cargo.toml | 3 + .../k8s/assets/helm/tf-runner/Chart.yaml | 6 + .../helm/tf-runner/templates/_helpers.tpl | 34 + .../templates/bootstrap-deployment.yaml | 61 + .../templates/bootstrap-service.yaml | 17 + .../helm/tf-runner/templates/configmap.yaml | 45 + .../tf-runner/templates/node-deployments.yaml | 69 + .../tf-runner/templates/node-services.yaml | 24 + .../k8s/assets/helm/tf-runner/values.yaml | 33 + .../k8s/src/deployer/attach_provider.rs | 8 - .../k8s/src/deployer/orchestrator.rs | 16 +- testing-framework/deployers/k8s/src/env.rs | 53 +- .../k8s/src/infrastructure/chart_values.rs | 255 + .../k8s/src/infrastructure/cluster.rs | 12 +- .../deployers/k8s/src/infrastructure/helm.rs | 138 +- .../deployers/k8s/src/infrastructure/mod.rs | 2 + .../k8s/src/infrastructure/runtime_spec.rs | 232 + testing-framework/deployers/k8s/src/lib.rs | 21 +- .../deployers/k8s/src/lifecycle/wait/mod.rs | 4 +- .../k8s/src/lifecycle/wait/orchestrator.rs | 10 +- .../deployers/k8s/src/lifecycle/wait/ports.rs | 6 +- .../deployers/k8s/src/workspace.rs | 109 + versions.env | 7 - 177 files changed, 1832 insertions(+), 21807 deletions(-) delete mode 100644 .github/workflows/build-binaries.yml delete mode 100644 logos/README.md delete mode 100644 logos/examples/Cargo.toml delete mode 100644 logos/examples/doc-snippets/Cargo.toml delete mode 100644 logos/examples/doc-snippets/src/architecture_overview_builder_api.rs delete mode 100644 logos/examples/doc-snippets/src/chaos_workloads_random_restart.rs delete mode 100644 logos/examples/doc-snippets/src/custom_workload_example_expectation.rs delete mode 100644 logos/examples/doc-snippets/src/custom_workload_example_workload.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_build.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_build_complete_example.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_deployers.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_expectations.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_imports.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_run_duration.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_topology.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_transactions_workload.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_wallets.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_workload_chaos.rs delete mode 100644 logos/examples/doc-snippets/src/dsl_cheat_sheet_workload_execution.rs delete mode 100644 logos/examples/doc-snippets/src/examples_advanced_aggressive_chaos_test.rs delete mode 100644 logos/examples/doc-snippets/src/examples_advanced_load_progression_test.rs delete mode 100644 logos/examples/doc-snippets/src/examples_advanced_sustained_load_test.rs delete mode 100644 logos/examples/doc-snippets/src/examples_chaos_resilience.rs delete mode 100644 logos/examples/doc-snippets/src/examples_da_and_transactions.rs delete mode 100644 logos/examples/doc-snippets/src/examples_simple_consensus.rs delete mode 100644 logos/examples/doc-snippets/src/examples_transaction_workload.rs delete mode 100644 logos/examples/doc-snippets/src/internal_crate_reference_add_deployer.rs delete mode 100644 logos/examples/doc-snippets/src/internal_crate_reference_add_expectation_builder_ext.rs delete mode 100644 logos/examples/doc-snippets/src/internal_crate_reference_add_expectation_trait.rs delete mode 100644 logos/examples/doc-snippets/src/internal_crate_reference_add_workload_builder_ext.rs delete mode 100644 logos/examples/doc-snippets/src/internal_crate_reference_add_workload_trait.rs delete mode 100644 logos/examples/doc-snippets/src/internal_crate_reference_add_workload_use_in_examples.rs delete mode 100644 logos/examples/doc-snippets/src/lib.rs delete mode 100644 logos/examples/doc-snippets/src/manual_cluster_external_driver_example.rs delete mode 100644 logos/examples/doc-snippets/src/manual_cluster_validation_patterns.rs delete mode 100644 logos/examples/doc-snippets/src/node_control_accessing_control.rs delete mode 100644 logos/examples/doc-snippets/src/node_control_trait.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_adjust_topology.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_core_api_pattern.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_step_1_topology.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_step_2_wallets.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_step_3_workloads.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_step_4_expectation.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_step_5_run_duration.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_step_6_deploy_and_execute.rs delete mode 100644 logos/examples/doc-snippets/src/quickstart_swap_deployer_compose.rs delete mode 100644 logos/examples/doc-snippets/src/testing_philosophy_declarative_over_imperative.rs delete mode 100644 logos/examples/doc-snippets/src/testing_philosophy_determinism_first.rs delete mode 100644 logos/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs delete mode 100644 logos/examples/doc-snippets/src/testing_philosophy_protocol_time_not_wall_time.rs delete mode 100644 logos/examples/src/bin/compose_runner.rs delete mode 100644 logos/examples/src/bin/k8s_runner.rs delete mode 100644 logos/examples/src/bin/local_runner.rs delete mode 100644 logos/examples/src/defaults.rs delete mode 100644 logos/examples/src/demo.rs delete mode 100644 logos/examples/src/env.rs delete mode 100644 logos/examples/src/lib.rs delete mode 100644 logos/examples/tests/compose_attach_node_control.rs delete mode 100644 logos/examples/tests/deployer_parity.rs delete mode 100644 logos/examples/tests/dynamic_join.rs delete mode 100644 logos/examples/tests/expectation_fail_fast_capture.rs delete mode 100644 logos/examples/tests/external_sources_local.rs delete mode 100644 logos/examples/tests/k8s_attach_node_control.rs delete mode 100644 logos/examples/tests/local_deployer_restart.rs delete mode 100644 logos/examples/tests/manual_cluster.rs delete mode 100644 logos/examples/tests/node_config_override.rs delete mode 100644 logos/examples/tests/orphan_manual_cluster.rs delete mode 100644 logos/infra/assets/stack/Dockerfile.base delete mode 100644 logos/infra/assets/stack/Dockerfile.runtime delete mode 100644 logos/infra/assets/stack/Dockerfile.testnet delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards.yml delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/api-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/api-detailed-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/blend-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/consensus-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/da-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/issues-diagnostics-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/kms-wallet-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/mempool-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/overview-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/sdp-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/storage-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/dashboards/storage-detailed-dashboard.json delete mode 100644 logos/infra/assets/stack/monitoring/grafana/datasources.yaml delete mode 100644 logos/infra/assets/stack/monitoring/grafana/grafana.ini delete mode 100644 logos/infra/assets/stack/monitoring/grafana/plugins.env delete mode 100644 logos/infra/assets/stack/monitoring/prometheus.yml delete mode 100644 logos/infra/assets/stack/monitoring/tempo.yaml delete mode 100755 logos/infra/assets/stack/scripts/docker/build_cfgsync.sh delete mode 100755 logos/infra/assets/stack/scripts/docker/prepare_binaries.sh delete mode 100755 logos/infra/assets/stack/scripts/setup-logos-blockchain-circuits.sh delete mode 100644 logos/infra/helm/logos-runner/Chart.yaml delete mode 100644 logos/infra/helm/logos-runner/templates/_helpers.tpl delete mode 100644 logos/infra/helm/logos-runner/templates/cfgsync-deployment.yaml delete mode 100644 logos/infra/helm/logos-runner/templates/cfgsync-service.yaml delete mode 100644 logos/infra/helm/logos-runner/templates/configmap.yaml delete mode 100644 logos/infra/helm/logos-runner/templates/pv.yaml delete mode 100644 logos/infra/helm/logos-runner/templates/pvc.yaml delete mode 100644 logos/infra/helm/logos-runner/templates/validator-deployments.yaml delete mode 100644 logos/infra/helm/logos-runner/templates/validator-services.yaml delete mode 100644 logos/infra/helm/logos-runner/values.yaml delete mode 100644 logos/runtime/env/Cargo.toml delete mode 100644 logos/runtime/env/src/lib.rs delete mode 100644 logos/runtime/ext/Cargo.toml delete mode 100644 logos/runtime/ext/src/cfgsync/mod.rs delete mode 100644 logos/runtime/ext/src/compose_env.rs delete mode 100644 logos/runtime/ext/src/constants.rs delete mode 100644 logos/runtime/ext/src/k8s_env.rs delete mode 100644 logos/runtime/ext/src/lib.rs delete mode 100644 logos/runtime/ext/src/scenario/mod.rs delete mode 100644 logos/runtime/workloads/Cargo.toml delete mode 100644 logos/runtime/workloads/src/lib.rs delete mode 100644 logos/runtime/workloads/src/workflows/manual.rs delete mode 100644 logos/runtime/workloads/src/workflows/mod.rs delete mode 100644 logos/runtime/workloads/src/workloads/mod.rs delete mode 100755 scripts/build/build-bundle.sh delete mode 100755 scripts/build/build-linux-binaries.sh delete mode 100755 scripts/build/build_test_image.sh delete mode 100644 scripts/checks/check-node-rev-sync.sh mode change 100755 => 100644 scripts/observability/deploy.sh delete mode 100755 scripts/ops/push-ecr-test.sh delete mode 100755 scripts/ops/update-nomos-rev.sh delete mode 100755 scripts/run/run-examples.sh delete mode 100755 scripts/run/run-test-matrix.sh delete mode 100755 scripts/setup/setup-logos-blockchain-circuits.sh mode change 100755 => 100644 scripts/setup/setup-observability.sh rename {logos/infra => testing-framework}/assets/stack/scripts/run_cfgsync.sh (100%) rename {logos/infra => testing-framework}/assets/stack/scripts/run_logos.sh (100%) rename {logos/infra => testing-framework}/assets/stack/scripts/run_logos_node.sh (100%) create mode 100644 testing-framework/deployers/compose/src/docker/config_server.rs create mode 100644 testing-framework/deployers/k8s/assets/helm/tf-runner/Chart.yaml create mode 100644 testing-framework/deployers/k8s/assets/helm/tf-runner/templates/_helpers.tpl create mode 100644 testing-framework/deployers/k8s/assets/helm/tf-runner/templates/bootstrap-deployment.yaml create mode 100644 testing-framework/deployers/k8s/assets/helm/tf-runner/templates/bootstrap-service.yaml create mode 100644 testing-framework/deployers/k8s/assets/helm/tf-runner/templates/configmap.yaml create mode 100644 testing-framework/deployers/k8s/assets/helm/tf-runner/templates/node-deployments.yaml create mode 100644 testing-framework/deployers/k8s/assets/helm/tf-runner/templates/node-services.yaml create mode 100644 testing-framework/deployers/k8s/assets/helm/tf-runner/values.yaml create mode 100644 testing-framework/deployers/k8s/src/infrastructure/chart_values.rs create mode 100644 testing-framework/deployers/k8s/src/infrastructure/runtime_spec.rs create mode 100644 testing-framework/deployers/k8s/src/workspace.rs delete mode 100644 versions.env diff --git a/.cargo-deny.toml b/.cargo-deny.toml index af01722..a3d8654 100644 --- a/.cargo-deny.toml +++ b/.cargo-deny.toml @@ -7,16 +7,10 @@ no-default-features = true [advisories] ignore = [ - # Keep local ignores in sync with nomos-node if needed. Unused entries removed. - "RUSTSEC-2024-0370", # proc-macro-error unmaintained; upstream dependency "RUSTSEC-2024-0384", # instant unmaintained; upstream dependency "RUSTSEC-2024-0388", # derivative unmaintained; no safe upgrade available upstream - "RUSTSEC-2024-0436", # paste unmaintained; upstream dependency "RUSTSEC-2025-0012", # backoff unmaintained; upstream workspace still relies on it - "RUSTSEC-2025-0055", # tracing-subscriber ansi escape issue; upstream dependency "RUSTSEC-2025-0134", # rustls-pemfile unmaintained; transitive via rustls stack - "RUSTSEC-2025-0141", # bincode unmaintained; no safe upgrade available - "RUSTSEC-2026-0002", # lru IterMut soundness issue; pending upstream upgrade ] yanked = "deny" @@ -31,13 +25,9 @@ allow = [ "BSD-2-Clause", "BSD-3-Clause", "BSL-1.0", - "CC0-1.0", - "CDLA-Permissive-2.0", "ISC", "MIT", - "MPL-2.0", "Unicode-3.0", - "Zlib", ] private = { ignore = false } unused-allowed-license = "deny" @@ -53,10 +43,6 @@ license-files = [{ hash = 0xcb90f5db, path = "LICENSE" }] name = "jsonpath-rust" [sources] -allow-git = [ - "https://github.com/EspressoSystems/jellyfish.git", - "https://github.com/logos-blockchain/logos-blockchain.git", - "https://github.com/logos-co/Overwatch", -] -unknown-git = "deny" +allow-git = [] +unknown-git = "deny" unknown-registry = "deny" diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml deleted file mode 100644 index 2aff6cb..0000000 --- a/.github/workflows/build-binaries.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Build Nomos Binaries - -on: - workflow_dispatch: - -env: - CARGO_TERM_COLOR: always - -jobs: - build_nomos_binaries: - strategy: - matrix: - include: - - name: linux - runs-on: ubuntu-latest - runs-on: ${{ matrix.runs-on }} - env: - LOGOS_BLOCKCHAIN_CIRCUITS: ${{ github.workspace }}/.tmp/logos-blockchain-circuits - CARGO_INCREMENTAL: 0 - CARGO_PROFILE_DEV_DEBUG: 0 - RUSTFLAGS: -C debuginfo=0 --cfg feature="pol-dev-mode" - CARGO_TARGET_DIR: ${{ github.workspace }}/.tmp/nomos-target - steps: - - uses: actions/checkout@v4 - - name: Load versions - run: | - set -euo pipefail - if [ ! -f versions.env ]; then - echo "versions.env missing; populate VERSION, LOGOS_BLOCKCHAIN_NODE_REV, LOGOS_BLOCKCHAIN_BUNDLE_VERSION" >&2 - exit 1 - fi - set -a - . versions.env - set +a - # $GITHUB_ENV does not accept comments/blank lines; keep only KEY=VALUE exports. - grep -E '^[A-Za-z_][A-Za-z0-9_]*=' versions.env >> "$GITHUB_ENV" - : "${VERSION:?Missing VERSION}" - : "${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV}" - : "${LOGOS_BLOCKCHAIN_BUNDLE_VERSION:?Missing LOGOS_BLOCKCHAIN_BUNDLE_VERSION}" - - name: Install system dependencies (Linux) - if: runner.os == 'Linux' - run: | - set -euo pipefail - sudo apt-get update - sudo apt-get install -y clang llvm-dev libclang-dev pkg-config cmake libssl-dev rsync libgmp10 libgmp-dev libgomp1 nasm - - name: Install nomos circuits - run: | - ./scripts/setup/setup-logos-blockchain-circuits.sh "${VERSION}" "$LOGOS_BLOCKCHAIN_CIRCUITS" - echo "LOGOS_BLOCKCHAIN_CIRCUITS=$LOGOS_BLOCKCHAIN_CIRCUITS" >> "$GITHUB_ENV" - - name: Add top-level KZG params file - run: | - curl -fsSL "https://raw.githubusercontent.com/logos-co/nomos-node/${LOGOS_BLOCKCHAIN_NODE_REV}/tests/kzgrs/kzgrs_test_params" \ - -o "${LOGOS_BLOCKCHAIN_CIRCUITS}/kzgrs_test_params" - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2025-09-14 - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- - - name: Build nomos binaries bundle - run: | - chmod +x scripts/build/build-bundle.sh - DEST=".tmp/nomos-binaries-linux-${VERSION}.tar.gz" - scripts/build/build-bundle.sh --platform linux --output "$DEST" - echo "LOGOS_BLOCKCHAIN_BINARIES_TAR=$DEST" >> "$GITHUB_ENV" - - name: Save nomos binaries cache - uses: actions/cache@v4 - with: - path: ${{ github.workspace }}/.tmp/nomos-binaries-linux-${{ env.VERSION }}.tar.gz - key: ${{ runner.os }}-nomos-binaries-${{ env.VERSION }}-${{ env.LOGOS_BLOCKCHAIN_BUNDLE_VERSION }} - - uses: actions/upload-artifact@v4 - with: - name: nomos-binaries-${{ runner.os }}-${{ env.VERSION }}-${{ env.LOGOS_BLOCKCHAIN_BUNDLE_VERSION }} - path: .tmp/nomos-binaries-linux-${{ env.VERSION }}.tar.gz diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9960f28..4a90666 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,25 +20,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Load versions - run: | - set -euo pipefail - if [ ! -f versions.env ]; then - echo "versions.env missing; populate VERSION, LOGOS_BLOCKCHAIN_NODE_REV, LOGOS_BLOCKCHAIN_BUNDLE_VERSION" >&2 - exit 1 - fi - set -a - . versions.env - set +a - # $GITHUB_ENV does not accept comments/blank lines; keep only KEY=VALUE exports. - grep -E '^[A-Za-z_][A-Za-z0-9_]*=' versions.env >> "$GITHUB_ENV" - : "${VERSION:?Missing VERSION}" - : "${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV}" - : "${LOGOS_BLOCKCHAIN_BUNDLE_VERSION:?Missing LOGOS_BLOCKCHAIN_BUNDLE_VERSION}" - - name: Install nomos circuits - run: | - ./scripts/setup/setup-logos-blockchain-circuits.sh "${VERSION}" "$HOME/.logos-blockchain-circuits" - echo "LOGOS_BLOCKCHAIN_CIRCUITS=$HOME/.logos-blockchain-circuits" >> "$GITHUB_ENV" - uses: dtolnay/rust-toolchain@master with: toolchain: nightly-2025-09-14 @@ -61,25 +42,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Load versions - run: | - set -euo pipefail - if [ ! -f versions.env ]; then - echo "versions.env missing; populate VERSION, LOGOS_BLOCKCHAIN_NODE_REV, LOGOS_BLOCKCHAIN_BUNDLE_VERSION" >&2 - exit 1 - fi - set -a - . versions.env - set +a - # $GITHUB_ENV does not accept comments/blank lines; keep only KEY=VALUE exports. - grep -E '^[A-Za-z_][A-Za-z0-9_]*=' versions.env >> "$GITHUB_ENV" - : "${VERSION:?Missing VERSION}" - : "${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV}" - : "${LOGOS_BLOCKCHAIN_BUNDLE_VERSION:?Missing LOGOS_BLOCKCHAIN_BUNDLE_VERSION}" - - name: Install nomos circuits - run: | - ./scripts/setup/setup-logos-blockchain-circuits.sh "${VERSION}" "$HOME/.logos-blockchain-circuits" - echo "LOGOS_BLOCKCHAIN_CIRCUITS=$HOME/.logos-blockchain-circuits" >> "$GITHUB_ENV" - uses: dtolnay/rust-toolchain@master with: toolchain: nightly-2025-09-14 @@ -102,25 +64,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Load versions - run: | - set -euo pipefail - if [ ! -f versions.env ]; then - echo "versions.env missing; populate VERSION, LOGOS_BLOCKCHAIN_NODE_REV, LOGOS_BLOCKCHAIN_BUNDLE_VERSION" >&2 - exit 1 - fi - set -a - . versions.env - set +a - # $GITHUB_ENV does not accept comments/blank lines; keep only KEY=VALUE exports. - grep -E '^[A-Za-z_][A-Za-z0-9_]*=' versions.env >> "$GITHUB_ENV" - : "${VERSION:?Missing VERSION}" - : "${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV}" - : "${LOGOS_BLOCKCHAIN_BUNDLE_VERSION:?Missing LOGOS_BLOCKCHAIN_BUNDLE_VERSION}" - - name: Install nomos circuits - run: | - ./scripts/setup/setup-logos-blockchain-circuits.sh "${VERSION}" "$HOME/.logos-blockchain-circuits" - echo "LOGOS_BLOCKCHAIN_CIRCUITS=$HOME/.logos-blockchain-circuits" >> "$GITHUB_ENV" - uses: dtolnay/rust-toolchain@master with: toolchain: nightly-2025-09-14 @@ -139,21 +82,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Load versions - run: | - set -euo pipefail - if [ ! -f versions.env ]; then - echo "versions.env missing; populate VERSION, LOGOS_BLOCKCHAIN_NODE_REV, LOGOS_BLOCKCHAIN_BUNDLE_VERSION" >&2 - exit 1 - fi - set -a - . versions.env - set +a - # $GITHUB_ENV does not accept comments/blank lines; keep only KEY=VALUE exports. - grep -E '^[A-Za-z_][A-Za-z0-9_]*=' versions.env >> "$GITHUB_ENV" - : "${VERSION:?Missing VERSION}" - : "${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV}" - : "${LOGOS_BLOCKCHAIN_BUNDLE_VERSION:?Missing LOGOS_BLOCKCHAIN_BUNDLE_VERSION}" - uses: dtolnay/rust-toolchain@master with: toolchain: nightly-2025-09-14 @@ -168,25 +96,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Load versions - run: | - set -euo pipefail - if [ ! -f versions.env ]; then - echo "versions.env missing; populate VERSION, LOGOS_BLOCKCHAIN_NODE_REV, LOGOS_BLOCKCHAIN_BUNDLE_VERSION" >&2 - exit 1 - fi - set -a - . versions.env - set +a - # $GITHUB_ENV does not accept comments/blank lines; keep only KEY=VALUE exports. - grep -E '^[A-Za-z_][A-Za-z0-9_]*=' versions.env >> "$GITHUB_ENV" - : "${VERSION:?Missing VERSION}" - : "${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV}" - : "${LOGOS_BLOCKCHAIN_BUNDLE_VERSION:?Missing LOGOS_BLOCKCHAIN_BUNDLE_VERSION}" - - name: Install nomos circuits - run: | - ./scripts/setup/setup-logos-blockchain-circuits.sh "${VERSION}" "$HOME/.logos-blockchain-circuits" - echo "LOGOS_BLOCKCHAIN_CIRCUITS=$HOME/.logos-blockchain-circuits" >> "$GITHUB_ENV" - uses: dtolnay/rust-toolchain@master with: toolchain: nightly-2025-09-14 @@ -200,323 +109,3 @@ jobs: - name: Install cargo-machete run: cargo +nightly-2025-09-14 install --git https://github.com/bnjbvr/cargo-machete --locked cargo-machete - run: cargo machete - - host_smoke: - runs-on: ubuntu-latest - env: - LOCAL_DEMO_RUN_SECS: 120 - LOCAL_DEMO_VALIDATORS: 1 - LOGOS_BLOCKCHAIN_CIRCUITS: ${{ github.workspace }}/.tmp/logos-blockchain-circuits - CARGO_INCREMENTAL: 0 - CARGO_PROFILE_DEV_DEBUG: 0 - RUSTFLAGS: -C debuginfo=0 - RUST_LOG: info,libp2p_swarm=debug,libp2p_quic=debug - steps: - - uses: actions/checkout@v4 - - name: Load versions - run: | - set -euo pipefail - if [ ! -f versions.env ]; then - echo "versions.env missing; populate VERSION, LOGOS_BLOCKCHAIN_NODE_REV, LOGOS_BLOCKCHAIN_BUNDLE_VERSION" >&2 - exit 1 - fi - set -a - . versions.env - set +a - # $GITHUB_ENV does not accept comments/blank lines; keep only KEY=VALUE exports. - grep -E '^[A-Za-z_][A-Za-z0-9_]*=' versions.env >> "$GITHUB_ENV" - : "${VERSION:?Missing VERSION}" - : "${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV}" - : "${LOGOS_BLOCKCHAIN_BUNDLE_VERSION:?Missing LOGOS_BLOCKCHAIN_BUNDLE_VERSION}" - - name: Set temp dir - run: | - echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV" - echo "CARGO_TARGET_DIR=${{ runner.temp }}/target-local" >> "$GITHUB_ENV" - echo "LOGOS_BLOCKCHAIN_LOG_DIR=${{ runner.temp }}/local-logs" >> "$GITHUB_ENV" - echo "LOGOS_BLOCKCHAIN_STATE_DIR=${{ runner.temp }}/nomos-state" >> "$GITHUB_ENV" - rm -rf "${{ runner.temp }}/local-logs" "${{ runner.temp }}/nomos-state" - mkdir -p "${{ runner.temp }}/local-logs" "${{ runner.temp }}/nomos-state" - - name: Install circuits - run: | - mkdir -p "${LOGOS_BLOCKCHAIN_CIRCUITS}" - ./scripts/setup/setup-logos-blockchain-circuits.sh "${VERSION}" "${LOGOS_BLOCKCHAIN_CIRCUITS}" - - name: Clean workspace caches - run: | - rm -rf .tmp/nomos-* testing-framework/assets/stack/kzgrs_test_params - mkdir -p .tmp - - name: Install system dependencies (Linux) - if: runner.os == 'Linux' - run: | - set -euo pipefail - if command -v sudo >/dev/null 2>&1; then - sudo apt-get update - sudo apt-get install -y clang llvm-dev libclang-dev pkg-config cmake libssl-dev rsync libgmp10 libgmp-dev libgomp1 nasm - else - apt-get update - apt-get install -y clang llvm-dev libclang-dev pkg-config cmake libssl-dev rsync libgmp10 libgmp-dev libgomp1 nasm - fi - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2025-09-14 - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- - - name: Restore cached nomos binaries - id: restore-nomos-bins-host - uses: actions/cache@v4 - with: - path: ${{ github.workspace }}/.tmp/nomos-binaries.tar.gz - key: ${{ runner.os }}-nomos-binaries-${{ env.VERSION }}-${{ env.LOGOS_BLOCKCHAIN_BUNDLE_VERSION }}-${{ env.LOGOS_BLOCKCHAIN_NODE_REV }} - - - name: Download nomos binaries artifact (fallback) - if: steps.restore-nomos-bins-host.outputs.cache-hit != 'true' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ARTIFACT_NAME: nomos-binaries-${{ runner.os }}-${{ env.VERSION }}-${{ env.LOGOS_BLOCKCHAIN_BUNDLE_VERSION }}-${{ env.LOGOS_BLOCKCHAIN_NODE_REV }} - run: | - set -euo pipefail - mkdir -p "${TMPDIR}" - artifact_id=$(gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/artifacts" --paginate -F per_page=100 \ - --jq '.artifacts[] | select(.name=="'"${ARTIFACT_NAME}"'") | .id' | head -n1) - if [ -z "$artifact_id" ]; then - echo "Nomos binaries artifact ${ARTIFACT_NAME} not found; building host bundle locally." - ./scripts/build/build-bundle.sh --platform host --output "${GITHUB_WORKSPACE}/.tmp/nomos-binaries-host-${VERSION}.tar.gz" - cp "${GITHUB_WORKSPACE}/.tmp/nomos-binaries-host-${VERSION}.tar.gz" "${GITHUB_WORKSPACE}/.tmp/nomos-binaries.tar.gz" - exit 0 - fi - gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/artifacts/${artifact_id}/zip" > "${TMPDIR}/nomos-binaries.zip" - unzip -o "${TMPDIR}/nomos-binaries.zip" -d "${TMPDIR}" - found_tar="$(find "${TMPDIR}" -name 'nomos-binaries-*.tar.gz' -maxdepth 2 | head -n1)" - if [ -z "$found_tar" ]; then - echo "Expected a nomos-binaries tar.gz in downloaded artifact" >&2 - exit 1 - fi - mkdir -p "${GITHUB_WORKSPACE}/.tmp" - mv "$found_tar" "${GITHUB_WORKSPACE}/.tmp/nomos-binaries.tar.gz" - - name: Normalize host bundle path - run: | - set -euo pipefail - mkdir -p .tmp - SRC="${GITHUB_WORKSPACE}/.tmp/nomos-binaries.tar.gz" - DEST="${GITHUB_WORKSPACE}/.tmp/nomos-binaries-host-${VERSION}.tar.gz" - if [ -f "${SRC}" ]; then - mv "${SRC}" "${DEST}" - echo "LOGOS_BLOCKCHAIN_BINARIES_TAR=${DEST}" >> "$GITHUB_ENV" - else - echo "Expected ${SRC} not found" >&2 - exit 1 - fi - - name: Run host demo (scripted) - env: - LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS: "true" - RUST_LOG: "info" - LOGOS_BLOCKCHAIN_LOG_DIR: "${{ runner.temp }}/local-logs" - run: | - scripts/run/run-examples.sh -t 120 -n 1 host - - name: Collect host demo logs (on failure) - if: failure() - run: | - if [ -d "${LOGOS_BLOCKCHAIN_LOG_DIR}" ]; then - tar -czf "${RUNNER_TEMP}/local-logs.tgz" -C "$(dirname "${LOGOS_BLOCKCHAIN_LOG_DIR}")" "$(basename "${LOGOS_BLOCKCHAIN_LOG_DIR}")" - echo "Local logs tar: $(realpath ${RUNNER_TEMP}/local-logs.tgz)" - find "${LOGOS_BLOCKCHAIN_LOG_DIR}" -type f -print - else - echo "No local logs directory at ${LOGOS_BLOCKCHAIN_LOG_DIR}" - fi - - name: Upload host smoke logs - if: failure() - id: upload-local-logs - uses: actions/upload-artifact@v4 - with: - name: host-smoke-logs - path: ${{ runner.temp }}/local-logs.tgz - if-no-files-found: error - - name: Print host smoke logs download URL - if: failure() - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh api "repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts" \ - --jq '.artifacts[] | select(.name=="host-smoke-logs") | "host-smoke-logs: \(.archive_download_url)"' || true - - compose_smoke: - runs-on: ubuntu-latest - env: - TMPDIR: ${{ github.workspace }}/.tmp - LOGOS_BLOCKCHAIN_CIRCUITS: ${{ github.workspace }}/.tmp/logos-blockchain-circuits - LOGOS_BLOCKCHAIN_TESTNET_IMAGE: nomos-testnet:${{ github.run_id }} - DOCKER_BUILDKIT: 1 - CARGO_INCREMENTAL: 0 - CARGO_PROFILE_DEV_DEBUG: 0 - RUSTFLAGS: -C debuginfo=0 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Load versions - run: | - set -euo pipefail - if [ ! -f versions.env ]; then - echo "versions.env missing; populate VERSION, LOGOS_BLOCKCHAIN_NODE_REV, LOGOS_BLOCKCHAIN_BUNDLE_VERSION" >&2 - exit 1 - fi - set -a - . versions.env - set +a - # $GITHUB_ENV does not accept comments/blank lines; keep only KEY=VALUE exports. - grep -E '^[A-Za-z_][A-Za-z0-9_]*=' versions.env >> "$GITHUB_ENV" - : "${VERSION:?Missing VERSION}" - : "${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV}" - : "${LOGOS_BLOCKCHAIN_BUNDLE_VERSION:?Missing LOGOS_BLOCKCHAIN_BUNDLE_VERSION}" - - - name: Prepare workspace tmpdir - run: mkdir -p "$TMPDIR" - - name: Install circuits - run: | - mkdir -p "${LOGOS_BLOCKCHAIN_CIRCUITS}" - ./scripts/setup/setup-logos-blockchain-circuits.sh "${VERSION}" "${LOGOS_BLOCKCHAIN_CIRCUITS}" - - - name: Restore cached nomos binaries - id: restore-nomos-bins - uses: actions/cache@v4 - with: - path: ${{ github.workspace }}/.tmp/nomos-binaries.tar.gz - key: ${{ runner.os }}-nomos-binaries-${{ env.VERSION }}-${{ env.LOGOS_BLOCKCHAIN_BUNDLE_VERSION }}-${{ env.LOGOS_BLOCKCHAIN_NODE_REV }} - - - name: Download nomos binaries artifact (fallback) - if: steps.restore-nomos-bins.outputs.cache-hit != 'true' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ARTIFACT_NAME: nomos-binaries-${{ runner.os }}-${{ env.VERSION }}-${{ env.LOGOS_BLOCKCHAIN_BUNDLE_VERSION }}-${{ env.LOGOS_BLOCKCHAIN_NODE_REV }} - run: | - set -euo pipefail - download_dir="${TMPDIR}/nomos-binaries-download" - rm -rf "${download_dir}" - mkdir -p "${download_dir}" - artifact_id=$(gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/artifacts" --paginate -F per_page=100 \ - --jq '.artifacts[] | select(.name=="'"${ARTIFACT_NAME}"'") | .id' | head -n1) - if [ -z "$artifact_id" ]; then - echo "Nomos binaries artifact ${ARTIFACT_NAME} not found; building linux bundle locally." - ./scripts/build/build-bundle.sh --platform linux --output "${GITHUB_WORKSPACE}/.tmp/nomos-binaries-linux-${VERSION}.tar.gz" - cp "${GITHUB_WORKSPACE}/.tmp/nomos-binaries-linux-${VERSION}.tar.gz" "${GITHUB_WORKSPACE}/.tmp/nomos-binaries.tar.gz" - exit 0 - fi - gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/artifacts/${artifact_id}/zip" > "${download_dir}/nomos-binaries.zip" - unzip -o "${download_dir}/nomos-binaries.zip" -d "${download_dir}" - found_tar="$(find "${download_dir}" -name 'nomos-binaries-*.tar.gz' -maxdepth 2 | head -n1)" - if [ -z "$found_tar" ]; then - echo "Expected a nomos-binaries tar.gz in downloaded artifact" >&2 - exit 1 - fi - mv "${found_tar}" "${GITHUB_WORKSPACE}/.tmp/nomos-binaries.tar.gz" - - - name: Normalize linux bundle path - run: | - set -euo pipefail - mkdir -p .tmp - SRC="${GITHUB_WORKSPACE}/.tmp/nomos-binaries.tar.gz" - DEST="${GITHUB_WORKSPACE}/.tmp/nomos-binaries-linux-${VERSION}.tar.gz" - if [ -f "${SRC}" ]; then - mv "${SRC}" "${DEST}" - echo "LOGOS_BLOCKCHAIN_BINARIES_TAR=${DEST}" >> "$GITHUB_ENV" - else - echo "Expected ${SRC} not found" >&2 - exit 1 - fi - - - name: Set compose target dir - run: echo "CARGO_TARGET_DIR=${RUNNER_TEMP}/target-compose" >> "$GITHUB_ENV" - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2025-09-14 - - name: Install system dependencies (Linux) - if: runner.os == 'Linux' - run: | - set -euo pipefail - if command -v sudo >/dev/null 2>&1; then - sudo apt-get update - sudo apt-get install -y clang llvm-dev libclang-dev pkg-config cmake libssl-dev rsync libgmp10 libgmp-dev libgomp1 nasm - else - apt-get update - apt-get install -y clang llvm-dev libclang-dev pkg-config cmake libssl-dev rsync libgmp10 libgmp-dev libgomp1 nasm - fi - - - name: Free disk space for compose build - run: | - set -euo pipefail - sudo rm -rf /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL || true - docker system prune -af --volumes || true - - - name: Cache cargo registry - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo- - - - name: Run compose mixed workload binary - env: - COMPOSE_NODE_PAIRS: "1x1" - LOGOS_BLOCKCHAIN_TESTNET_IMAGE: ${{ env.LOGOS_BLOCKCHAIN_TESTNET_IMAGE }} - COMPOSE_RUNNER_HOST: "127.0.0.1" - LOGOS_BLOCKCHAIN_TIME_BACKEND: "monotonic" - RUST_BACKTRACE: "1" - LOGOS_BLOCKCHAIN_TESTS_TRACING: "true" - RUST_LOG: "info" - LOGOS_BLOCKCHAIN_LOG_LEVEL: "info" - LOGOS_BLOCKCHAIN_LOG_DIR: "${{ github.workspace }}/.tmp/compose-logs" - run: | - mkdir -p "$TMPDIR" - scripts/run/run-examples.sh -t 120 -n 1 compose - - - name: Show compose runner log - env: - LOG_DIR: "${{ github.workspace }}/.tmp/compose-logs" - run: | - if [ -f "${LOG_DIR}/runner.log" ]; then - echo "=== runner.log (tail) ===" - tail -n 200 "${LOG_DIR}/runner.log" - else - echo "runner.log not found under ${LOG_DIR}" - fi - - - name: Collect compose logs - if: failure() - run: | - mkdir -p ci-artifacts/compose - if [ -d "${TMPDIR}/compose-logs" ]; then - tar -czf ci-artifacts/compose/node-logs.tgz -C "${TMPDIR}/compose-logs" . - echo "Node logs tar: $(realpath ci-artifacts/compose/node-logs.tgz)" - find "${TMPDIR}/compose-logs" -type f -print - fi - mkdir -p ci-artifacts/compose - docker ps -a --filter "name=nomos-compose-" --format '{{.ID}} {{.Names}} {{.Status}}' > ci-artifacts/compose/containers.txt || true - echo "Containers list: $(realpath ci-artifacts/compose/containers.txt)" - for id in $(docker ps -a --filter "name=nomos-compose-" -q); do - docker logs "$id" > "ci-artifacts/compose/${id}.log" 2>&1 || true - echo "Container log: $(realpath ci-artifacts/compose/${id}.log)" - done - - - name: Upload compose artifacts - if: failure() - uses: actions/upload-artifact@v4 - with: - name: compose-mixed-workload-logs - path: ci-artifacts - if-no-files-found: ignore - - - name: Cleanup compose containers - if: always() - run: | - ids=$(docker ps -a --filter "name=nomos-compose-" -q) - if [ -n "$ids" ]; then - docker rm -f $ids - fi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50ea06d..d933e10 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,12 +33,6 @@ repos: - id: cargo-machete - repo: local hooks: - - id: node-rev-sync - name: node rev sync - language: system - entry: sh scripts/checks/check-node-rev-sync.sh - pass_filenames: false - files: ^(versions\.env|Cargo\.toml)$ - id: cargo-hack-check language: script name: cargo hack check diff --git a/Cargo.lock b/Cargo.lock index e00e0a4..2edb835 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,21 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - [[package]] name = "ahash" version = "0.8.12" @@ -110,463 +95,6 @@ version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] - -[[package]] -name = "archery" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e0a5f99dfebb87bb342d0f53bb92c81842e100bbb915223e38349580e5441d" -dependencies = [ - "triomphe", -] - -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-bn254" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" -dependencies = [ - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-std 0.5.0", -] - -[[package]] -name = "ark-crypto-primitives" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" -dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-relations", - "ark-serialize 0.4.2", - "ark-snark", - "ark-std 0.4.0", - "blake2", - "derivative", - "digest", - "sha2", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" -dependencies = [ - "ahash", - "ark-ff 0.5.0", - "ark-poly 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "educe", - "fnv", - "hashbrown 0.15.5", - "itertools 0.13.0", - "num-bigint", - "num-integer", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" -dependencies = [ - "ark-ff-asm 0.5.0", - "ark-ff-macros 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "arrayvec", - "digest", - "educe", - "itertools 0.13.0", - "num-bigint", - "num-traits", - "paste", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-asm" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" -dependencies = [ - "quote", - "syn 2.0.114", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "ark-groth16" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" -dependencies = [ - "ark-crypto-primitives", - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-relations", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-poly" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" -dependencies = [ - "ahash", - "ark-ff 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "educe", - "fnv", - "hashbrown 0.15.5", -] - -[[package]] -name = "ark-relations" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" -dependencies = [ - "ark-ff 0.4.2", - "ark-std 0.4.0", - "tracing", - "tracing-subscriber 0.2.25", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive 0.4.2", - "ark-std 0.4.0", - "digest", - "num-bigint", -] - -[[package]] -name = "ark-serialize" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" -dependencies = [ - "ark-serialize-derive 0.5.0", - "ark-std 0.5.0", - "arrayvec", - "digest", - "num-bigint", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "ark-snark" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" -dependencies = [ - "ark-ff 0.4.2", - "ark-relations", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "ark-std" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "asn1-rs" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60" -dependencies = [ - "asn1-rs-derive", - "asn1-rs-impl", - "displaydoc", - "nom 7.1.3", - "num-traits", - "rusticata-macros", - "thiserror 2.0.18", - "time", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", - "synstructure", -] - -[[package]] -name = "asn1-rs-impl" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - -[[package]] -name = "astro-float" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96034cc871c05bb65ad7fb77e6a8bebf45d8b055ed0311769e2f83a1d373c1ec" -dependencies = [ - "astro-float-macro", - "astro-float-num", -] - -[[package]] -name = "astro-float-macro" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cfe0f6df5a74fb25b9e713470ad77e091f35f798730673c8772f26ed438963" -dependencies = [ - "astro-float-num", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "astro-float-num" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86887daca11d02e0b04f37a9cb81888aae881397fb48ff66494e356aea97554a" -dependencies = [ - "itertools 0.10.5", - "lazy_static", - "rand 0.8.5", - "serde", -] - -[[package]] -name = "async-channel" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-ctrlc" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907279f6e91a51c8ec7cac24711e8308f21da7c10c7700ca2f7e125694ed2df1" -dependencies = [ - "ctrlc", -] - -[[package]] -name = "async-io" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" -dependencies = [ - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix", - "slab", - "windows-sys 0.61.2", -] - -[[package]] -name = "async-recursion" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "async-trait" version = "0.1.89" @@ -578,48 +106,12 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "asynchronous-codec" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" -dependencies = [ - "bytes", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite", -] - [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "attohttpc" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" -dependencies = [ - "http 0.2.12", - "log", - "url", -] - -[[package]] -name = "attohttpc" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e2cdb6d5ed835199484bb92bb8b3edd526effe995c61732580439c1a67e2e9" -dependencies = [ - "base64 0.22.1", - "http 1.4.0", - "log", - "url", -] - [[package]] name = "autocfg" version = "1.5.0" @@ -651,7 +143,6 @@ dependencies = [ "serde", "serde_json", "serde_path_to_error", - "serde_urlencoded", "sync_wrapper", "tokio", "tower 0.5.3", @@ -687,55 +178,7 @@ checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "getrandom 0.2.17", "instant", - "rand 0.8.5", -] - -[[package]] -name = "backon" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cffb0e931875b666fc4fcb20fee52e9bbd1ef836fd9e9e04ec21555f9f85f7ef" -dependencies = [ - "fastrand", - "gloo-timers", - "tokio", -] - -[[package]] -name = "backtrace" -version = "0.3.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-link", -] - -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base256emoji" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e9430d9a245a77c92176e649af6e275f20839a48389859d1661e9a128d077c" -dependencies = [ - "const-str", - "match-lookup", + "rand", ] [[package]] @@ -750,85 +193,19 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64ct" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.72.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" -dependencies = [ - "bitflags 2.10.0", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.114", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest", -] - [[package]] name = "block-buffer" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "block2" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" -dependencies = [ - "objc2", -] - -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "tinyvec", + "generic-array", ] [[package]] @@ -847,30 +224,11 @@ version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "bytes" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" -dependencies = [ - "serde", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.13+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" -dependencies = [ - "cc", - "pkg-config", -] [[package]] name = "cc" @@ -879,43 +237,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" dependencies = [ "find-msvc-tools", - "jobserver", - "libc", "shlex", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom 7.1.3", -] - [[package]] name = "cfg-if" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "cfg_eval" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "cfgsync-adapter" version = "0.1.0" @@ -1002,27 +332,6 @@ dependencies = [ "phf_codegen", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "4.5.57" @@ -1063,67 +372,12 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" -[[package]] -name = "color-eyre" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" -dependencies = [ - "backtrace", - "eyre", - "indenter", - "once_cell", - "owo-colors", -] - [[package]] name = "colorchoice" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "const-hex" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb320cac8a0750d7f25280aa97b09c26edfe161164238ecbbb31092b079e735" -dependencies = [ - "cfg-if", - "cpufeatures", - "proptest", - "serde_core", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "const-str" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f421161cb492475f1661ddc9815a745a1c894592070661180fdec3d4872e9c3" - -[[package]] -name = "convert_case" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -1140,15 +394,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - [[package]] name = "cpufeatures" version = "0.2.17" @@ -1158,24 +403,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.6" @@ -1201,175 +428,16 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-common" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ - "generic-array 0.14.7", + "generic-array", "typenum", ] -[[package]] -name = "ctrlc" -version = "3.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" -dependencies = [ - "dispatch2", - "nix 0.30.1", - "windows-sys 0.61.2", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "rustc_version", - "serde", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "darling" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.114", -] - -[[package]] -name = "darling_macro" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "data-encoding" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" - -[[package]] -name = "data-encoding-macro" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8142a83c17aa9461d637e649271eae18bf2edd00e91f2e105df36c3c16355bdb" -dependencies = [ - "data-encoding", - "data-encoding-macro-internal", -] - -[[package]] -name = "data-encoding-macro-internal" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" -dependencies = [ - "data-encoding", - "syn 2.0.114", -] - -[[package]] -name = "default-net" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4898b43aed56499fad6b294d15b3e76a51df68079bf492e5daae38ca084e003" -dependencies = [ - "dlopen2 0.4.1", - "libc", - "memalloc", - "netlink-packet-core 0.5.0", - "netlink-packet-route 0.15.0", - "netlink-sys", - "once_cell", - "system-configuration 0.5.1", - "windows 0.32.0", -] - -[[package]] -name = "der" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "der-parser" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" -dependencies = [ - "asn1-rs", - "displaydoc", - "nom 7.1.3", - "num-bigint", - "num-traits", - "rusticata-macros", -] - [[package]] name = "deranged" version = "0.5.5" @@ -1391,17 +459,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "deunicode" version = "1.6.2" @@ -1415,42 +472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", - "const-oid", "crypto-common", - "subtle", -] - -[[package]] -name = "dirs" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.61.2", -] - -[[package]] -name = "dispatch2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" -dependencies = [ - "bitflags 2.10.0", - "block2", - "libc", - "objc2", ] [[package]] @@ -1464,123 +486,12 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "dlopen2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b121caccfc363e4d9a4589528f3bef7c71b83c6ed01c8dc68cbeeb7fd29ec698" -dependencies = [ - "dlopen2_derive", - "libc", - "once_cell", - "winapi", -] - -[[package]] -name = "dlopen2" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b4f5f101177ff01b8ec4ecc81eead416a8aa42819a2869311b3420fa114ffa" -dependencies = [ - "libc", - "once_cell", - "winapi", -] - -[[package]] -name = "dlopen2_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a09ac8bb8c16a282264c379dffba707b9c998afc7506009137f3c6136888078" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "dtoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "serde", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand_core 0.6.4", - "serde", - "sha2", - "subtle", - "zeroize", -] - -[[package]] -name = "educe" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" -dependencies = [ - "enum-ordinalize", - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array 0.14.7", - "group", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", -] - [[package]] name = "enum-as-inner" version = "0.6.1" @@ -1593,26 +504,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "enum-ordinalize" -version = "4.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1091a7bb1f8f2c4b28f1fe2cef4980ca2d410a3d727d67ecc3178c9b0800f0" -dependencies = [ - "enum-ordinalize-derive", -] - -[[package]] -name = "enum-ordinalize-derive" -version = "4.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -1629,87 +520,24 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "event-listener" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" -dependencies = [ - "event-listener", - "pin-project-lite", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - [[package]] name = "fastrand" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" -[[package]] -name = "ff" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - [[package]] name = "find-msvc-tools" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" -[[package]] -name = "flate2" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - [[package]] name = "foreign-types" version = "0.3.2" @@ -1725,16 +553,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "fork_stream" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc54cf296aa5a82dfffcc911fc7a37b0dcba605725bbb4db486f7b24d7667f9d" -dependencies = [ - "futures", - "pin-project", -] - [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1765,16 +583,6 @@ dependencies = [ "futures-util", ] -[[package]] -name = "futures-bounded" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91f328e7fb845fc832912fb6a34f40cf6d1888c92f974d1893a54e97b5ff542e" -dependencies = [ - "futures-timer", - "futures-util", -] - [[package]] name = "futures-channel" version = "0.3.31" @@ -1800,7 +608,6 @@ dependencies = [ "futures-core", "futures-task", "futures-util", - "num_cpus", ] [[package]] @@ -1809,16 +616,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-lite" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" -dependencies = [ - "futures-core", - "pin-project-lite", -] - [[package]] name = "futures-macro" version = "0.3.31" @@ -1830,17 +627,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "futures-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" -dependencies = [ - "futures-io", - "rustls 0.23.36", - "rustls-pki-types", -] - [[package]] name = "futures-sink" version = "0.3.31" @@ -1853,12 +639,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.31" @@ -1885,18 +665,6 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", - "zeroize", -] - -[[package]] -name = "generic-array" -version = "1.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf57c49a95fd1fe24b90b3033bee6dc7e8f1288d51494cb44e627c295e38542" -dependencies = [ - "rustversion", - "serde_core", - "typenum", ] [[package]] @@ -1906,10 +674,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", ] [[package]] @@ -1919,25 +685,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi", "wasip2", - "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - [[package]] name = "globset" version = "0.4.18" @@ -1957,34 +709,11 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.10.0", + "bitflags", "ignore", "walkdir", ] -[[package]] -name = "gloo-timers" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "h2" version = "0.4.13" @@ -2004,15 +733,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -2023,121 +743,18 @@ dependencies = [ "allocator-api2", ] -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", -] - [[package]] name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -[[package]] -name = "hashlink" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" -dependencies = [ - "hashbrown 0.14.5", -] - [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - -[[package]] -name = "hickory-proto" -version = "0.25.0-alpha.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d00147af6310f4392a31680db52a3ed45a2e0f68eb18e8c3fe5537ecc96d9e2" -dependencies = [ - "async-recursion", - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna", - "ipnet", - "once_cell", - "rand 0.9.2", - "socket2 0.5.10", - "thiserror 2.0.18", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "hickory-resolver" -version = "0.25.0-alpha.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5762f69ebdbd4ddb2e975cd24690bf21fe6b2604039189c26acddbc427f12887" -dependencies = [ - "cfg-if", - "futures-util", - "hickory-proto", - "ipconfig", - "moka", - "once_cell", - "parking_lot", - "rand 0.9.2", - "resolv-conf", - "smallvec", - "thiserror 2.0.18", - "tokio", - "tracing", -] - -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - [[package]] name = "home" version = "0.5.12" @@ -2147,17 +764,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - [[package]] name = "http" version = "0.2.12" @@ -2240,12 +846,6 @@ dependencies = [ "libm", ] -[[package]] -name = "humantime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" - [[package]] name = "hyper" version = "0.14.32" @@ -2302,27 +902,10 @@ dependencies = [ "http 0.2.12", "hyper 0.14.32", "log", - "rustls 0.21.12", + "rustls", "rustls-native-certs", "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" -dependencies = [ - "http 1.4.0", - "hyper 1.8.1", - "hyper-util", - "rustls 0.23.36", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.26.4", - "tower-service", - "webpki-roots", + "tokio-rustls", ] [[package]] @@ -2337,19 +920,6 @@ dependencies = [ "tokio-io-timeout", ] -[[package]] -name = "hyper-timeout" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" -dependencies = [ - "hyper 1.8.1", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - [[package]] name = "hyper-tls" version = "0.6.0" @@ -2401,7 +971,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.62.2", + "windows-core", ] [[package]] @@ -2494,12 +1064,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "1.1.0" @@ -2521,81 +1085,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "if-addrs" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "if-watch" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf9d64cfcf380606e64f9a0bcf493616b65331199f984151a6fa11a7b3cde38" -dependencies = [ - "async-io", - "core-foundation", - "fnv", - "futures", - "if-addrs", - "ipnet", - "log", - "netlink-packet-core 0.7.0", - "netlink-packet-route 0.17.1", - "netlink-proto", - "netlink-sys", - "rtnetlink", - "system-configuration 0.6.1", - "tokio", - "windows 0.53.0", -] - -[[package]] -name = "igd-next" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76b0d7d4541def58a37bf8efc559683f21edce7c82f0d866c93ac21f7e098f93" -dependencies = [ - "async-trait", - "attohttpc 0.24.1", - "bytes", - "futures", - "http 1.4.0", - "http-body-util", - "hyper 1.8.1", - "hyper-util", - "log", - "rand 0.8.5", - "tokio", - "url", - "xmltree", -] - -[[package]] -name = "igd-next" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516893339c97f6011282d5825ac94fc1c7aad5cad26bdc2d0cee068c0bf97f97" -dependencies = [ - "async-trait", - "attohttpc 0.30.1", - "bytes", - "futures", - "http 1.4.0", - "http-body-util", - "hyper 1.8.1", - "hyper-util", - "log", - "rand 0.9.2", - "tokio", - "url", - "xmltree", -] - [[package]] name = "ignore" version = "0.4.25" @@ -2612,12 +1101,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "indenter" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" - [[package]] name = "indexmap" version = "2.13.0" @@ -2626,17 +1109,6 @@ checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown 0.16.1", - "serde", - "serde_core", -] - -[[package]] -name = "inout" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" -dependencies = [ - "generic-array 0.14.7", ] [[package]] @@ -2648,18 +1120,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "ipconfig" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" -dependencies = [ - "socket2 0.5.10", - "widestring", - "windows-sys 0.48.0", - "winreg", -] - [[package]] name = "ipnet" version = "2.11.0" @@ -2682,74 +1142,12 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" -[[package]] -name = "jf-crhf" -version = "0.1.1" -source = "git+https://github.com/EspressoSystems/jellyfish?tag=jf-crhf-v0.1.1#8f3dce0bc2bd161b4648f6ac029dcc1a23aaf4c5" -dependencies = [ - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "jf-poseidon2" -version = "0.1.0" -source = "git+https://github.com/EspressoSystems/jellyfish.git?rev=dc166cf0f803c3e5067f9dfcc21e3dade986a447#dc166cf0f803c3e5067f9dfcc21e3dade986a447" -dependencies = [ - "ark-bn254 0.4.0", - "ark-ff 0.4.2", - "ark-std 0.4.0", - "displaydoc", - "hex", - "jf-crhf", - "lazy_static", - "nimue", - "zeroize", -] - -[[package]] -name = "jobserver" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" -dependencies = [ - "getrandom 0.3.4", - "libc", -] - [[package]] name = "js-sys" version = "0.3.85" @@ -2784,20 +1182,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "k256" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", - "signature", -] - [[package]] name = "k8s-openapi" version = "0.20.0" @@ -2812,15 +1196,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "keccak" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653" -dependencies = [ - "cpufeatures", -] - [[package]] name = "kube" version = "0.87.2" @@ -2848,14 +1223,14 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper 0.14.32", - "hyper-rustls 0.24.2", - "hyper-timeout 0.4.1", + "hyper-rustls", + "hyper-timeout", "jsonpath-rust", "k8s-openapi", "kube-core", "pem", "pin-project", - "rustls 0.21.12", + "rustls", "rustls-pemfile", "secrecy", "serde", @@ -2918,509 +1293,18 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lb-ext" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "cfgsync-adapter", - "cfgsync-artifacts", - "cfgsync-core", - "kube", - "logos-blockchain-http-api-common", - "reqwest", - "serde", - "serde_yaml", - "tempfile", - "testing-framework-core", - "testing-framework-env", - "testing-framework-runner-compose", - "testing-framework-runner-k8s", - "testing-framework-runner-local", - "testing_framework", - "thiserror 2.0.18", - "tokio", - "tracing", - "uuid", -] - -[[package]] -name = "lb-workloads" -version = "0.1.0" -dependencies = [ - "lb-ext", - "testing-framework-core", - "testing_framework", - "thiserror 2.0.18", - "tokio", -] - [[package]] name = "libc" version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - [[package]] name = "libm" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" -[[package]] -name = "libp2p" -version = "0.55.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72dc443ddd0254cb49a794ed6b6728400ee446a0f7ab4a07d0209ee98de20e9" -dependencies = [ - "bytes", - "either", - "futures", - "futures-timer", - "getrandom 0.2.17", - "libp2p-allow-block-list", - "libp2p-autonat", - "libp2p-connection-limits", - "libp2p-core", - "libp2p-dns", - "libp2p-gossipsub", - "libp2p-identify", - "libp2p-identity", - "libp2p-kad", - "libp2p-mdns", - "libp2p-metrics", - "libp2p-quic", - "libp2p-swarm", - "libp2p-tcp", - "libp2p-upnp", - "multiaddr", - "pin-project", - "rw-stream-sink", - "thiserror 2.0.18", -] - -[[package]] -name = "libp2p-allow-block-list" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38944b7cb981cc93f2f0fb411ff82d0e983bd226fbcc8d559639a3a73236568b" -dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", -] - -[[package]] -name = "libp2p-autonat" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e297bfc6cabb70c6180707f8fa05661b77ecb9cb67e8e8e1c469301358fa21d0" -dependencies = [ - "async-trait", - "asynchronous-codec", - "either", - "futures", - "futures-bounded", - "futures-timer", - "libp2p-core", - "libp2p-identity", - "libp2p-request-response", - "libp2p-swarm", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.5", - "rand_core 0.6.4", - "thiserror 2.0.18", - "tracing", - "web-time", -] - -[[package]] -name = "libp2p-connection-limits" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efe9323175a17caa8a2ed4feaf8a548eeef5e0b72d03840a0eab4bcb0210ce1c" -dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", -] - -[[package]] -name = "libp2p-core" -version = "0.43.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249128cd37a2199aff30a7675dffa51caf073b51aa612d2f544b19932b9aebca" -dependencies = [ - "either", - "fnv", - "futures", - "futures-timer", - "libp2p-identity", - "multiaddr", - "multihash", - "multistream-select", - "parking_lot", - "pin-project", - "quick-protobuf", - "rand 0.8.5", - "rw-stream-sink", - "thiserror 2.0.18", - "tracing", - "unsigned-varint 0.8.0", - "web-time", -] - -[[package]] -name = "libp2p-dns" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b780a1150214155b0ed1cdf09fbd2e1b0442604f9146a431d1b21d23eef7bd7" -dependencies = [ - "async-trait", - "futures", - "hickory-resolver", - "libp2p-core", - "libp2p-identity", - "parking_lot", - "smallvec", - "tracing", -] - -[[package]] -name = "libp2p-gossipsub" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d558548fa3b5a8e9b66392f785921e363c57c05dcadfda4db0d41ae82d313e4a" -dependencies = [ - "async-channel", - "asynchronous-codec", - "base64 0.22.1", - "byteorder", - "bytes", - "either", - "fnv", - "futures", - "futures-timer", - "getrandom 0.2.17", - "hashlink", - "hex_fmt", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "prometheus-client", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.5", - "regex", - "serde", - "sha2", - "tracing", - "web-time", -] - -[[package]] -name = "libp2p-identify" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c06862544f02d05d62780ff590cc25a75f5c2b9df38ec7a370dcae8bb873cf" -dependencies = [ - "asynchronous-codec", - "either", - "futures", - "futures-bounded", - "futures-timer", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "quick-protobuf", - "quick-protobuf-codec", - "smallvec", - "thiserror 2.0.18", - "tracing", -] - -[[package]] -name = "libp2p-identity" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c7892c221730ba55f7196e98b0b8ba5e04b4155651736036628e9f73ed6fc3" -dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "hkdf", - "k256", - "multihash", - "quick-protobuf", - "rand 0.8.5", - "serde", - "sha2", - "thiserror 2.0.18", - "tracing", - "zeroize", -] - -[[package]] -name = "libp2p-kad" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bab0466a27ebe955bcbc27328fae5429c5b48c915fd6174931414149802ec23" -dependencies = [ - "asynchronous-codec", - "bytes", - "either", - "fnv", - "futures", - "futures-bounded", - "futures-timer", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.5", - "serde", - "sha2", - "smallvec", - "thiserror 2.0.18", - "tracing", - "uint", - "web-time", -] - -[[package]] -name = "libp2p-mdns" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d0ba095e1175d797540e16b62e7576846b883cb5046d4159086837b36846cc" -dependencies = [ - "futures", - "hickory-proto", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "rand 0.8.5", - "smallvec", - "socket2 0.5.10", - "tokio", - "tracing", -] - -[[package]] -name = "libp2p-metrics" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce58c64292e87af624fcb86465e7dd8342e46a388d71e8fec0ab37ee789630a" -dependencies = [ - "futures", - "libp2p-core", - "libp2p-gossipsub", - "libp2p-identify", - "libp2p-identity", - "libp2p-kad", - "libp2p-swarm", - "pin-project", - "prometheus-client", - "web-time", -] - -[[package]] -name = "libp2p-quic" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41432a159b00424a0abaa2c80d786cddff81055ac24aa127e0cf375f7858d880" -dependencies = [ - "futures", - "futures-timer", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-tls", - "quinn", - "rand 0.8.5", - "ring", - "rustls 0.23.36", - "socket2 0.5.10", - "thiserror 2.0.18", - "tokio", - "tracing", -] - -[[package]] -name = "libp2p-request-response" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548fe44a80ff275d400f1b26b090d441d83ef73efabbeb6415f4ce37e5aed865" -dependencies = [ - "async-trait", - "futures", - "futures-bounded", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "rand 0.8.5", - "smallvec", - "tracing", -] - -[[package]] -name = "libp2p-stream" -version = "0.3.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826716f1ee125895f1fb44911413cba023485b552ff96c7a2159bd037ac619bb" -dependencies = [ - "futures", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "rand 0.8.5", - "tracing", -] - -[[package]] -name = "libp2p-swarm" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803399b4b6f68adb85e63ab573ac568154b193e9a640f03e0f2890eabbcb37f8" -dependencies = [ - "either", - "fnv", - "futures", - "futures-timer", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm-derive", - "lru", - "multistream-select", - "once_cell", - "rand 0.8.5", - "smallvec", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "libp2p-swarm-derive" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206e0aa0ebe004d778d79fb0966aa0de996c19894e2c0605ba2f8524dd4443d8" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "libp2p-tcp" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65346fb4d36035b23fec4e7be4c320436ba53537ce9b6be1d1db1f70c905cad0" -dependencies = [ - "futures", - "futures-timer", - "if-watch", - "libc", - "libp2p-core", - "socket2 0.5.10", - "tokio", - "tracing", -] - -[[package]] -name = "libp2p-tls" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ff65a82e35375cbc31ebb99cacbbf28cb6c4fefe26bf13756ddcf708d40080" -dependencies = [ - "futures", - "futures-rustls", - "libp2p-core", - "libp2p-identity", - "rcgen", - "ring", - "rustls 0.23.36", - "rustls-webpki 0.103.10", - "thiserror 2.0.18", - "x509-parser", - "yasna", -] - -[[package]] -name = "libp2p-upnp" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d457b9ecceb66e7199f049926fad447f1f17f040e8d29d690c086b4cab8ed14a" -dependencies = [ - "futures", - "futures-timer", - "igd-next 0.15.1", - "libp2p-core", - "libp2p-swarm", - "tokio", - "tracing", -] - -[[package]] -name = "libredox" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" -dependencies = [ - "bitflags 2.10.0", - "libc", -] - -[[package]] -name = "librocksdb-sys" -version = "0.17.3+10.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef2a00ee60fe526157c9023edab23943fae1ce2ab6f4abb2a807c1746835de9" -dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "libc", - "libz-sys", -] - -[[package]] -name = "libz-sys" -version = "1.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "light-poseidon" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a1ccadd0bb5a32c196da536fd72c59183de24a055f6bf0513bf845fefab862" -dependencies = [ - "ark-bn254 0.5.0", - "ark-ff 0.5.0", - "num-bigint", - "thiserror 1.0.69", -] - [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -3448,1022 +1332,12 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[package]] -name = "logos-blockchain-api-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "bytes", - "futures", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-chain-leader-service", - "logos-blockchain-chain-service", - "logos-blockchain-core", - "logos-blockchain-network-service", - "logos-blockchain-sdp-service", - "logos-blockchain-storage-service", - "logos-blockchain-time-service", - "logos-blockchain-tx-service", - "overwatch", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tracing", - "utoipa", - "utoipa-swagger-ui", -] - -[[package]] -name = "logos-blockchain-blend" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "logos-blockchain-blend-crypto", - "logos-blockchain-blend-message", - "logos-blockchain-blend-network", - "logos-blockchain-blend-proofs", - "logos-blockchain-blend-scheduling", -] - -[[package]] -name = "logos-blockchain-blend-crypto" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "blake2", - "logos-blockchain-groth16", - "logos-blockchain-poq", - "logos-blockchain-poseidon2", - "logos-blockchain-utils", - "rs-merkle-tree", - "thiserror 1.0.69", -] - -[[package]] -name = "logos-blockchain-blend-message" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "blake2", - "derivative", - "itertools 0.14.0", - "logos-blockchain-blend-crypto", - "logos-blockchain-blend-proofs", - "logos-blockchain-core", - "logos-blockchain-groth16", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-utils", - "serde", - "serde-big-array", - "serde_with", - "thiserror 1.0.69", - "tracing", - "zeroize", -] - -[[package]] -name = "logos-blockchain-blend-network" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "either", - "futures", - "futures-timer", - "libp2p", - "logos-blockchain-blend-message", - "logos-blockchain-blend-proofs", - "logos-blockchain-blend-scheduling", - "logos-blockchain-core", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-libp2p", - "tracing", -] - -[[package]] -name = "logos-blockchain-blend-proofs" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "ed25519-dalek", - "generic-array 1.3.5", - "hex", - "logos-blockchain-blend-crypto", - "logos-blockchain-groth16", - "logos-blockchain-pol", - "logos-blockchain-poq", - "logos-blockchain-utils", - "num-bigint", - "serde", - "thiserror 1.0.69", -] - -[[package]] -name = "logos-blockchain-blend-scheduling" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "derivative", - "fork_stream", - "futures", - "logos-blockchain-blend-message", - "logos-blockchain-blend-proofs", - "logos-blockchain-core", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-utils", - "multiaddr", - "rand 0.8.5", - "serde", - "thiserror 1.0.69", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", -] - -[[package]] -name = "logos-blockchain-blend-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "fork_stream", - "futures", - "hex", - "libp2p", - "libp2p-stream", - "logos-blockchain-blend", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-chain-service", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-groth16", - "logos-blockchain-key-management-system-service", - "logos-blockchain-ledger", - "logos-blockchain-libp2p", - "logos-blockchain-network-service", - "logos-blockchain-poq", - "logos-blockchain-sdp-service", - "logos-blockchain-services-utils", - "logos-blockchain-time-service", - "logos-blockchain-utils", - "overwatch", - "rand 0.8.5", - "serde", - "serde_with", - "thiserror 1.0.69", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "logos-blockchain-chain-broadcast-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "derivative", - "futures", - "logos-blockchain-core", - "overwatch", - "serde", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "logos-blockchain-chain-leader-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "futures", - "logos-blockchain-blend-service", - "logos-blockchain-chain-network-service", - "logos-blockchain-chain-service", - "logos-blockchain-chain-service-common", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-key-management-system-service", - "logos-blockchain-ledger", - "logos-blockchain-services-utils", - "logos-blockchain-time-service", - "logos-blockchain-tx-service", - "logos-blockchain-wallet-service", - "overwatch", - "rand 0.8.5", - "serde", - "thiserror 1.0.69", - "tokio", - "tracing", - "tracing-futures", -] - -[[package]] -name = "logos-blockchain-chain-network-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "futures", - "logos-blockchain-chain-service", - "logos-blockchain-chain-service-common", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-cryptarchia-sync", - "logos-blockchain-ledger", - "logos-blockchain-network-service", - "logos-blockchain-services-utils", - "logos-blockchain-time-service", - "logos-blockchain-tx-service", - "overwatch", - "rand 0.8.5", - "serde", - "serde_with", - "thiserror 1.0.69", - "tokio", - "tokio-stream", - "tracing", - "tracing-futures", -] - -[[package]] -name = "logos-blockchain-chain-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "bytes", - "futures", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-cryptarchia-sync", - "logos-blockchain-groth16", - "logos-blockchain-ledger", - "logos-blockchain-network-service", - "logos-blockchain-services-utils", - "logos-blockchain-storage-service", - "logos-blockchain-time-service", - "logos-blockchain-utils", - "num-bigint", - "overwatch", - "serde", - "serde_with", - "strum", - "thiserror 1.0.69", - "tokio", - "tracing", - "tracing-futures", -] - -[[package]] -name = "logos-blockchain-chain-service-common" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "logos-blockchain-core", - "serde", -] - -[[package]] -name = "logos-blockchain-circuits-prover" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "logos-blockchain-circuits-utils", - "tempfile", -] - -[[package]] -name = "logos-blockchain-circuits-utils" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "dirs", -] - -[[package]] -name = "logos-blockchain-common-http-client" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "futures", - "hex", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-chain-service", - "logos-blockchain-core", - "logos-blockchain-groth16", - "logos-blockchain-http-api-common", - "logos-blockchain-key-management-system-keys", - "reqwest", - "serde", - "serde_json", - "thiserror 1.0.69", - "url", -] - -[[package]] -name = "logos-blockchain-core" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "ark-ff 0.4.2", - "bincode", - "blake2", - "bytes", - "const-hex", - "futures", - "hex", - "logos-blockchain-blend-proofs", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-groth16", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-poc", - "logos-blockchain-pol", - "logos-blockchain-poseidon2", - "logos-blockchain-utils", - "logos-blockchain-utxotree", - "multiaddr", - "nom 8.0.0", - "num-bigint", - "serde", - "strum", - "thiserror 1.0.69", - "tracing", -] - -[[package]] -name = "logos-blockchain-cryptarchia-engine" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "cfg_eval", - "logos-blockchain-pol", - "logos-blockchain-utils", - "serde", - "serde_with", - "thiserror 1.0.69", - "time", - "tokio", - "tracing", -] - -[[package]] -name = "logos-blockchain-cryptarchia-sync" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "bytes", - "futures", - "libp2p", - "libp2p-stream", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "rand 0.8.5", - "serde", - "serde_with", - "thiserror 1.0.69", - "tokio", - "tracing", -] - -[[package]] -name = "logos-blockchain-groth16" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -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.18", -] - -[[package]] -name = "logos-blockchain-http-api-common" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "axum", - "logos-blockchain-core", - "logos-blockchain-key-management-system-keys", - "serde", - "serde_json", - "serde_with", - "tracing", -] - -[[package]] -name = "logos-blockchain-key-management-system-keys" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "bytes", - "ed25519-dalek", - "generic-array 1.3.5", - "hex", - "logos-blockchain-groth16", - "logos-blockchain-key-management-system-macros", - "logos-blockchain-poseidon2", - "logos-blockchain-utils", - "logos-blockchain-zksign", - "num-bigint", - "rand_core 0.6.4", - "serde", - "subtle", - "thiserror 2.0.18", - "tokio", - "tracing", - "x25519-dalek", - "zeroize", -] - -[[package]] -name = "logos-blockchain-key-management-system-macros" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "logos-blockchain-key-management-system-operators" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "logos-blockchain-blend-proofs", - "logos-blockchain-core", - "logos-blockchain-groth16", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-poseidon2", - "logos-blockchain-utxotree", - "tokio", - "tracing", -] - -[[package]] -name = "logos-blockchain-key-management-system-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "log", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-key-management-system-operators", - "overwatch", - "serde", - "thiserror 2.0.18", - "tokio", - "tracing", -] - -[[package]] -name = "logos-blockchain-ledger" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "derivative", - "logos-blockchain-blend-crypto", - "logos-blockchain-blend-message", - "logos-blockchain-blend-proofs", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-groth16", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-pol", - "logos-blockchain-utils", - "logos-blockchain-utxotree", - "num-bigint", - "rand 0.8.5", - "rpds", - "serde", - "thiserror 1.0.69", - "tracing", -] - -[[package]] -name = "logos-blockchain-libp2p" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "backon", - "blake2", - "default-net", - "either", - "futures", - "hex", - "igd-next 0.16.2", - "libp2p", - "logos-blockchain-cryptarchia-sync", - "logos-blockchain-utils", - "multiaddr", - "natpmp", - "netdev", - "num_enum", - "rand 0.8.5", - "serde", - "serde_with", - "thiserror 1.0.69", - "tokio", - "tracing", - "zerocopy", -] - -[[package]] -name = "logos-blockchain-network-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "futures", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-sync", - "logos-blockchain-libp2p", - "overwatch", - "rand 0.8.5", - "rand_chacha 0.3.1", - "serde", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "logos-blockchain-node" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "axum", - "cfg-if", - "clap", - "color-eyre", - "futures", - "hex", - "http 1.4.0", - "libp2p", - "logos-blockchain-api-service", - "logos-blockchain-blend", - "logos-blockchain-blend-service", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-chain-leader-service", - "logos-blockchain-chain-network-service", - "logos-blockchain-chain-service", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-groth16", - "logos-blockchain-http-api-common", - "logos-blockchain-key-management-system-service", - "logos-blockchain-ledger", - "logos-blockchain-libp2p", - "logos-blockchain-network-service", - "logos-blockchain-pol", - "logos-blockchain-poq", - "logos-blockchain-sdp-service", - "logos-blockchain-services-utils", - "logos-blockchain-storage-service", - "logos-blockchain-system-sig-service", - "logos-blockchain-time-service", - "logos-blockchain-tracing", - "logos-blockchain-tracing-service", - "logos-blockchain-tui-zone", - "logos-blockchain-tx-service", - "logos-blockchain-utils", - "logos-blockchain-wallet-service", - "num-bigint", - "overwatch", - "rand 0.8.5", - "serde", - "serde_ignored", - "serde_json", - "serde_with", - "serde_yaml", - "thiserror 2.0.18", - "time", - "tokio", - "tokio-stream", - "tower 0.4.13", - "tower-http 0.5.2", - "tracing", - "url", - "utoipa", - "utoipa-swagger-ui", -] - -[[package]] -name = "logos-blockchain-poc" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "logos-blockchain-circuits-prover", - "logos-blockchain-circuits-utils", - "logos-blockchain-groth16", - "logos-blockchain-witness-generator", - "num-bigint", - "serde", - "serde_json", - "thiserror 2.0.18", - "tracing", -] - -[[package]] -name = "logos-blockchain-pol" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "astro-float", - "logos-blockchain-circuits-prover", - "logos-blockchain-circuits-utils", - "logos-blockchain-groth16", - "logos-blockchain-utils", - "logos-blockchain-witness-generator", - "num-bigint", - "num-traits", - "serde", - "serde_json", - "thiserror 2.0.18", - "tracing", -] - -[[package]] -name = "logos-blockchain-poq" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "logos-blockchain-circuits-prover", - "logos-blockchain-circuits-utils", - "logos-blockchain-groth16", - "logos-blockchain-pol", - "logos-blockchain-witness-generator", - "num-bigint", - "serde", - "serde_json", - "thiserror 2.0.18", - "tracing", -] - -[[package]] -name = "logos-blockchain-poseidon2" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "ark-bn254 0.4.0", - "ark-ff 0.4.2", - "jf-poseidon2", - "num-bigint", -] - -[[package]] -name = "logos-blockchain-sdp-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "futures", - "logos-blockchain-core", - "logos-blockchain-key-management-system-keys", - "overwatch", - "serde", - "thiserror 2.0.18", - "tokio", - "tracing", -] - -[[package]] -name = "logos-blockchain-services-utils" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "futures", - "log", - "overwatch", - "serde", - "serde_json", - "thiserror 1.0.69", - "tracing", -] - -[[package]] -name = "logos-blockchain-storage-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "bytes", - "futures", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "overwatch", - "rocksdb", - "serde", - "thiserror 1.0.69", - "tokio", - "tracing", -] - -[[package]] -name = "logos-blockchain-system-sig-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-ctrlc", - "async-trait", - "overwatch", - "tracing", -] - -[[package]] -name = "logos-blockchain-time-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "cfg_eval", - "futures", - "log", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-utils", - "overwatch", - "serde", - "serde_with", - "sntpc", - "thiserror 2.0.18", - "time", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "logos-blockchain-tracing" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "opentelemetry", - "opentelemetry-appender-tracing", - "opentelemetry-http", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", - "opentelemetry_sdk", - "rand 0.8.5", - "serde", - "tokio", - "tracing", - "tracing-appender", - "tracing-gelf", - "tracing-loki", - "tracing-opentelemetry", - "tracing-subscriber 0.3.22", - "url", -] - -[[package]] -name = "logos-blockchain-tracing-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "logos-blockchain-tracing", - "overwatch", - "serde", - "time", - "tracing", - "tracing-appender", - "tracing-subscriber 0.3.22", -] - -[[package]] -name = "logos-blockchain-tui-zone" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "clap", - "hex", - "logos-blockchain-core", - "logos-blockchain-key-management-system-service", - "logos-blockchain-zone-sdk", - "rand 0.8.5", - "reqwest", - "serde_json", - "tokio", - "tracing-subscriber 0.3.22", -] - -[[package]] -name = "logos-blockchain-tx-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "futures", - "logos-blockchain-core", - "logos-blockchain-network-service", - "logos-blockchain-services-utils", - "logos-blockchain-storage-service", - "overwatch", - "rand 0.8.5", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", - "tokio-stream", - "tracing", - "utoipa", -] - -[[package]] -name = "logos-blockchain-utils" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "blake2", - "cipher", - "const-hex", - "humantime", - "overwatch", - "rand 0.8.5", - "serde", - "serde_with", - "time", -] - -[[package]] -name = "logos-blockchain-utxotree" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "ark-ff 0.4.2", - "logos-blockchain-groth16", - "logos-blockchain-poseidon2", - "num-bigint", - "rpds", - "serde", - "thiserror 1.0.69", -] - -[[package]] -name = "logos-blockchain-wallet" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "logos-blockchain-core", - "logos-blockchain-key-management-system-keys", - "logos-blockchain-ledger", - "num-bigint", - "rpds", - "serde", - "thiserror 2.0.18", - "tracing", -] - -[[package]] -name = "logos-blockchain-wallet-service" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "async-trait", - "bytes", - "futures", - "hex", - "logos-blockchain-chain-service", - "logos-blockchain-core", - "logos-blockchain-groth16", - "logos-blockchain-key-management-system-service", - "logos-blockchain-ledger", - "logos-blockchain-services-utils", - "logos-blockchain-storage-service", - "logos-blockchain-utxotree", - "logos-blockchain-wallet", - "overwatch", - "serde", - "thiserror 1.0.69", - "tokio", - "tracing", -] - -[[package]] -name = "logos-blockchain-witness-generator" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "tempfile", -] - -[[package]] -name = "logos-blockchain-zksign" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "logos-blockchain-circuits-prover", - "logos-blockchain-circuits-utils", - "logos-blockchain-groth16", - "logos-blockchain-poseidon2", - "logos-blockchain-witness-generator", - "num-bigint", - "serde", - "serde_json", - "thiserror 2.0.18", - "tracing", -] - -[[package]] -name = "logos-blockchain-zone-sdk" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "futures", - "logos-blockchain-common-http-client", - "logos-blockchain-core", - "logos-blockchain-key-management-system-service", - "reqwest", - "rpds", - "serde", - "thiserror 2.0.18", - "tokio", - "tracing", -] - -[[package]] -name = "loki-api" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdc38a304f59a03e6efa3876766a48c70a766a93f88341c3fff4212834b8e327" -dependencies = [ - "prost 0.13.5", - "prost-types", -] - -[[package]] -name = "lru" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" -dependencies = [ - "hashbrown 0.15.5", -] - -[[package]] -name = "lru-slab" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" - -[[package]] -name = "match-lookup" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "757aee279b8bdbb9f9e676796fd459e4207a1f986e87886700abf589f5abf771" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - -[[package]] -name = "matchers" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" -dependencies = [ - "regex-automata", -] - [[package]] name = "matchit" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" -[[package]] -name = "memalloc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df39d232f5c40b0891c10216992c2f250c054105cb1e56f0fc9032db6203ecc1" - [[package]] name = "memchr" version = "2.7.6" @@ -4476,32 +1350,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", - "simd-adler32", -] - [[package]] name = "mio" version = "1.1.1" @@ -4513,79 +1361,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "moka" -version = "0.12.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac832c50ced444ef6be0767a008b02c106a909ba79d1d830501e94b96f6b7e" -dependencies = [ - "crossbeam-channel", - "crossbeam-epoch", - "crossbeam-utils", - "equivalent", - "parking_lot", - "portable-atomic", - "smallvec", - "tagptr", - "uuid", -] - -[[package]] -name = "multiaddr" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" -dependencies = [ - "arrayref", - "byteorder", - "data-encoding", - "libp2p-identity", - "multibase", - "multihash", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint 0.8.0", - "url", -] - -[[package]] -name = "multibase" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8694bb4835f452b0e3bb06dbebb1d6fc5385b6ca1caf2e55fd165c042390ec77" -dependencies = [ - "base-x", - "base256emoji", - "data-encoding", - "data-encoding-macro", -] - -[[package]] -name = "multihash" -version = "0.19.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" -dependencies = [ - "core2", - "serde", - "unsigned-varint 0.8.0", -] - -[[package]] -name = "multistream-select" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" -dependencies = [ - "bytes", - "futures", - "log", - "pin-project", - "smallvec", - "unsigned-varint 0.7.2", -] - [[package]] name = "native-tls" version = "0.2.14" @@ -4603,219 +1378,12 @@ dependencies = [ "tempfile", ] -[[package]] -name = "natpmp" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77366fa8ce34e2e1322dd97da65f11a62f451bd3daae8be6993c00800f61dd07" -dependencies = [ - "async-trait", - "cc", - "netdev", - "tokio", -] - -[[package]] -name = "netdev" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f901362e84cd407be6f8cd9d3a46bccf09136b095792785401ea7d283c79b91d" -dependencies = [ - "dlopen2 0.5.0", - "ipnet", - "libc", - "netlink-packet-core 0.7.0", - "netlink-packet-route 0.17.1", - "netlink-sys", - "once_cell", - "system-configuration 0.6.1", - "windows-sys 0.52.0", -] - -[[package]] -name = "netlink-packet-core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5cf0b54effda4b91615c40ff0fd12d0d4c9a6e0f5116874f03941792ff535a" -dependencies = [ - "anyhow", - "byteorder", - "libc", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-core" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72724faf704479d67b388da142b186f916188505e7e0b26719019c525882eda4" -dependencies = [ - "anyhow", - "byteorder", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-route" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea993e32c77d87f01236c38f572ecb6c311d592e56a06262a007fd2a6e31253c" -dependencies = [ - "anyhow", - "bitflags 1.3.2", - "byteorder", - "libc", - "netlink-packet-core 0.5.0", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-route" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053998cea5a306971f88580d0829e90f270f940befd7cf928da179d4187a5a66" -dependencies = [ - "anyhow", - "bitflags 1.3.2", - "byteorder", - "libc", - "netlink-packet-core 0.7.0", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-utils" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" -dependencies = [ - "anyhow", - "byteorder", - "paste", - "thiserror 1.0.69", -] - -[[package]] -name = "netlink-proto" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72452e012c2f8d612410d89eea01e2d9b56205274abb35d53f60200b2ec41d60" -dependencies = [ - "bytes", - "futures", - "log", - "netlink-packet-core 0.7.0", - "netlink-sys", - "thiserror 2.0.18", -] - -[[package]] -name = "netlink-sys" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6c30ed10fa69cc491d491b85cc971f6bdeb8e7367b7cde2ee6cc878d583fae" -dependencies = [ - "bytes", - "futures-util", - "libc", - "log", - "tokio", -] - -[[package]] -name = "nimue" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0dc7d3b2b7bd112c0cecf7d6f4f16a174ee7a98e27615b1d08256d0176588f2" -dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "digest", - "generic-array 0.14.7", - "hex", - "keccak", - "log", - "rand 0.8.5", - "zeroize", -] - -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nix" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" -dependencies = [ - "bitflags 2.10.0", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nom" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" -dependencies = [ - "memchr", -] - -[[package]] -name = "nu-ansi-term" -version = "0.50.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - [[package]] name = "num-conv" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -4825,71 +1393,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" -dependencies = [ - "num_enum_derive", - "rustversion", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "objc2" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" -dependencies = [ - "objc2-encode", -] - -[[package]] -name = "objc2-encode" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "object" -version = "0.37.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" -dependencies = [ - "memchr", -] - -[[package]] -name = "oid-registry" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" -dependencies = [ - "asn1-rs", -] - [[package]] name = "once_cell" version = "1.21.3" @@ -4908,7 +1411,7 @@ version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ - "bitflags 2.10.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -4946,103 +1449,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "opentelemetry" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bcd6ae87133e903af7ef497404dda70c60d0ea14895fc8a5e6722754fc2a0" -dependencies = [ - "futures-core", - "futures-sink", - "js-sys", - "pin-project-lite", - "thiserror 2.0.18", -] - -[[package]] -name = "opentelemetry-appender-tracing" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef6a1ac5ca3accf562b8c306fa8483c85f4390f768185ab775f242f7fe8fdcc2" -dependencies = [ - "opentelemetry", - "tracing", - "tracing-core", - "tracing-subscriber 0.3.22", -] - -[[package]] -name = "opentelemetry-http" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a6d09a73194e6b66df7c8f1b680f156d916a1a942abf2de06823dd02b7855d" -dependencies = [ - "async-trait", - "bytes", - "http 1.4.0", - "opentelemetry", - "reqwest", -] - -[[package]] -name = "opentelemetry-otlp" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf" -dependencies = [ - "http 1.4.0", - "opentelemetry", - "opentelemetry-http", - "opentelemetry-proto", - "opentelemetry_sdk", - "prost 0.14.3", - "thiserror 2.0.18", - "tokio", - "tonic", -] - -[[package]] -name = "opentelemetry-proto" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7175df06de5eaee9909d4805a3d07e28bb752c34cab57fa9cff549da596b30f" -dependencies = [ - "opentelemetry", - "opentelemetry_sdk", - "prost 0.14.3", - "tonic", - "tonic-prost", -] - -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e62e29dfe041afb8ed2a6c9737ab57db4907285d999ef8ad3a59092a36bdc846" - -[[package]] -name = "opentelemetry_sdk" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ae4f5991976fd48df6d843de219ca6d31b01daaab2dad5af2badeded372bd" -dependencies = [ - "futures-channel", - "futures-executor", - "futures-util", - "opentelemetry", - "percent-encoding", - "rand 0.9.2", - "thiserror 2.0.18", - "tokio", - "tokio-stream", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "ordered-float" version = "2.10.1" @@ -5052,45 +1458,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "overwatch" -version = "0.1.0" -source = "git+https://github.com/logos-co/Overwatch?rev=f5a9902#f5a99022f389d65adbd55e51f1e3f9eead62432a" -dependencies = [ - "async-trait", - "futures", - "overwatch-derive", - "thiserror 2.0.18", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", -] - -[[package]] -name = "overwatch-derive" -version = "0.1.0" -source = "git+https://github.com/logos-co/Overwatch?rev=f5a9902#f5a99022f389d65adbd55e51f1e3f9eead62432a" -dependencies = [ - "convert_case", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "owo-colors" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" - -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - [[package]] name = "parking_lot" version = "0.12.5" @@ -5123,12 +1490,6 @@ dependencies = [ "regex", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pem" version = "3.0.6" @@ -5214,7 +1575,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", - "rand 0.8.5", + "rand", ] [[package]] @@ -5258,42 +1619,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" -[[package]] -name = "polling" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix", - "windows-sys 0.61.2", -] - -[[package]] -name = "portable-atomic" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" - [[package]] name = "potential_utf" version = "0.1.4" @@ -5318,61 +1649,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "proc-macro-crate" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "proc-macro-error2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" -dependencies = [ - "proc-macro-error-attr2", - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "proc-macro2" version = "1.0.106" @@ -5382,29 +1658,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prometheus-client" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504ee9ff529add891127c4827eb481bd69dc0ebc72e9a682e187db4caa60c3ca" -dependencies = [ - "dtoa", - "itoa", - "parking_lot", - "prometheus-client-derive-encode", -] - -[[package]] -name = "prometheus-client-derive-encode" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "prometheus-http-query" version = "0.8.3" @@ -5419,153 +1672,6 @@ dependencies = [ "url", ] -[[package]] -name = "proptest" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566cb3fdacef14c0737f9546df7cfeadbfbc9fef10991038bf5015d0c80532" -dependencies = [ - "bitflags 2.10.0", - "num-traits", - "rand 0.9.2", - "rand_chacha 0.9.0", - "rand_xorshift", - "unarray", -] - -[[package]] -name = "prost" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" -dependencies = [ - "bytes", - "prost-derive 0.13.5", -] - -[[package]] -name = "prost" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" -dependencies = [ - "bytes", - "prost-derive 0.14.3", -] - -[[package]] -name = "prost-derive" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" -dependencies = [ - "anyhow", - "itertools 0.14.0", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "prost-derive" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" -dependencies = [ - "anyhow", - "itertools 0.14.0", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "prost-types" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" -dependencies = [ - "prost 0.13.5", -] - -[[package]] -name = "quick-protobuf" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" -dependencies = [ - "byteorder", -] - -[[package]] -name = "quick-protobuf-codec" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15a0580ab32b169745d7a39db2ba969226ca16738931be152a3209b409de2474" -dependencies = [ - "asynchronous-codec", - "bytes", - "quick-protobuf", - "thiserror 1.0.69", - "unsigned-varint 0.8.0", -] - -[[package]] -name = "quinn" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" -dependencies = [ - "bytes", - "cfg_aliases", - "futures-io", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls 0.23.36", - "socket2 0.6.2", - "thiserror 2.0.18", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" -dependencies = [ - "bytes", - "getrandom 0.3.4", - "lru-slab", - "rand 0.9.2", - "ring", - "rustc-hash", - "rustls 0.23.36", - "rustls-pki-types", - "slab", - "thiserror 2.0.18", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2 0.6.2", - "tracing", - "windows-sys 0.60.2", -] - [[package]] name = "quote" version = "1.0.44" @@ -5588,18 +1694,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand_chacha", + "rand_core", ] [[package]] @@ -5609,17 +1705,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.5", + "rand_core", ] [[package]] @@ -5631,55 +1717,13 @@ dependencies = [ "getrandom 0.2.17", ] -[[package]] -name = "rand_core" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" -dependencies = [ - "getrandom 0.3.4", -] - -[[package]] -name = "rand_xorshift" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" -dependencies = [ - "rand_core 0.9.5", -] - -[[package]] -name = "rcgen" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" -dependencies = [ - "pem", - "ring", - "rustls-pki-types", - "time", - "yasna", -] - [[package]] name = "redox_syscall" version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.10.0", -] - -[[package]] -name = "redox_users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 2.0.18", + "bitflags", ] [[package]] @@ -5719,14 +1763,11 @@ checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64 0.22.1", "bytes", - "futures-channel", "futures-core", - "futures-util", "http 1.4.0", "http-body 1.0.1", "http-body-util", "hyper 1.8.1", - "hyper-rustls 0.27.7", "hyper-tls", "hyper-util", "js-sys", @@ -5734,8 +1775,6 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite", - "quinn", - "rustls 0.23.36", "rustls-pki-types", "serde", "serde_json", @@ -5743,33 +1782,13 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-native-tls", - "tokio-rustls 0.26.4", - "tokio-util", "tower 0.5.3", "tower-http 0.6.8", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", - "webpki-roots", -] - -[[package]] -name = "resolv-conf" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", ] [[package]] @@ -5786,152 +1805,13 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rocksdb" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddb7af00d2b17dbd07d82c0063e25411959748ff03e8d4f96134c2ff41fce34f" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "rpds" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e75f485e819d4d3015e6c0d55d02a4fd3db47c1993d9e603e0361fba2bffb34" -dependencies = [ - "archery", - "serde", -] - -[[package]] -name = "rs-merkle-tree" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a3ef170810c387d31b64c0b59734abb0839dac2a8d137909e271bfdec9b1e0" -dependencies = [ - "ark-bn254 0.5.0", - "ark-ff 0.5.0", - "byteorder", - "futures", - "light-poseidon", - "quote", - "rand 0.9.2", - "syn 1.0.109", - "thiserror 2.0.18", - "tiny-keccak", - "tokio", -] - -[[package]] -name = "rtnetlink" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a552eb82d19f38c3beed3f786bd23aa434ceb9ac43ab44419ca6d67a7e186c0" -dependencies = [ - "futures", - "log", - "netlink-packet-core 0.7.0", - "netlink-packet-route 0.17.1", - "netlink-packet-utils", - "netlink-proto", - "netlink-sys", - "nix 0.26.4", - "thiserror 1.0.69", - "tokio", -] - -[[package]] -name = "runner-examples" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "lb-ext", - "lb-workloads", - "testing-framework-core", - "testing-framework-runner-compose", - "testing-framework-runner-k8s", - "testing-framework-runner-local", - "testing_framework", - "tokio", - "tracing", - "tracing-subscriber 0.3.22", -] - -[[package]] -name = "rust-embed" -version = "8.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04113cb9355a377d83f06ef1f0a45b8ab8cd7d8b1288160717d66df5c7988d27" -dependencies = [ - "rust-embed-impl", - "rust-embed-utils", - "walkdir", -] - -[[package]] -name = "rust-embed-impl" -version = "8.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0902e4c7c8e997159ab384e6d0fc91c221375f6894346ae107f47dd0f3ccaa" -dependencies = [ - "proc-macro2", - "quote", - "rust-embed-utils", - "syn 2.0.114", - "walkdir", -] - -[[package]] -name = "rust-embed-utils" -version = "8.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bcdef0be6fe7f6fa333b1073c949729274b05f123a0ad7efcb8efd878e5c3b1" -dependencies = [ - "sha2", - "walkdir", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" - -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom 7.1.3", -] - [[package]] name = "rustix" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ - "bitflags 2.10.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -5946,24 +1826,10 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", - "rustls-webpki 0.101.7", + "rustls-webpki", "sct", ] -[[package]] -name = "rustls" -version = "0.23.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" -dependencies = [ - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki 0.103.10", - "subtle", - "zeroize", -] - [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -5991,7 +1857,6 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ - "web-time", "zeroize", ] @@ -6005,34 +1870,12 @@ dependencies = [ "untrusted", ] -[[package]] -name = "rustls-webpki" -version = "0.103.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "rw-stream-sink" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" -dependencies = [ - "futures", - "pin-project", - "static_assertions", -] - [[package]] name = "ryu" version = "1.0.22" @@ -6073,20 +1916,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array 0.14.7", - "pkcs8", - "subtle", - "zeroize", -] - [[package]] name = "secrecy" version = "0.8.0" @@ -6103,7 +1932,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.10.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -6120,12 +1949,6 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" - [[package]] name = "serde" version = "1.0.228" @@ -6136,15 +1959,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-big-array" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f" -dependencies = [ - "serde", -] - [[package]] name = "serde-value" version = "0.7.0" @@ -6175,16 +1989,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "serde_ignored" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115dffd5f3853e06e746965a20dcbae6ee747ae30b543d91b0e089668bb07798" -dependencies = [ - "serde", - "serde_core", -] - [[package]] name = "serde_json" version = "1.0.149" @@ -6221,33 +2025,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_with" -version = "3.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "serde_core", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "serde_yaml" version = "0.9.34+deprecated" @@ -6272,15 +2049,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - [[package]] name = "shlex" version = "1.3.0" @@ -6297,22 +2065,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core 0.6.4", -] - -[[package]] -name = "simd-adler32" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" - [[package]] name = "siphasher" version = "1.0.2" @@ -6341,22 +2093,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - -[[package]] -name = "sntpc" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f778a0f82b3cf5d75f858eceee38e84d5292f1d03415e88cc4ec45ca6ba8a2" -dependencies = [ - "cfg-if", - "tokio", -] - [[package]] name = "socket2" version = "0.5.10" @@ -6377,61 +2113,18 @@ dependencies = [ "windows-sys 0.60.2", ] -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "stable_deref_trait" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "strum" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - [[package]] name = "syn" version = "1.0.109" @@ -6474,54 +2167,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys 0.5.0", -] - -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.10.0", - "core-foundation", - "system-configuration-sys 0.6.0", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tagptr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" - [[package]] name = "tempfile" version = "3.24.0" @@ -6549,7 +2194,7 @@ dependencies = [ "percent-encoding", "pest", "pest_derive", - "rand 0.8.5", + "rand", "regex", "serde", "serde_json", @@ -6561,32 +2206,29 @@ dependencies = [ name = "testing-framework-core" version = "0.1.0" dependencies = [ + "anyhow", "async-trait", "cfgsync-adapter", "cfgsync-artifacts", + "cfgsync-core", "futures", "parking_lot", "prometheus-http-query", - "rand 0.8.5", + "rand", "reqwest", + "serde", + "serde_yaml", "thiserror 2.0.18", "tokio", "tracing", ] -[[package]] -name = "testing-framework-env" -version = "0.1.0" - [[package]] name = "testing-framework-runner-compose" version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "logos-blockchain-groth16", - "logos-blockchain-key-management-system-service", - "logos-blockchain-zksign", "reqwest", "serde", "serde_json", @@ -6610,6 +2252,9 @@ dependencies = [ "k8s-openapi", "kube", "reqwest", + "serde", + "serde_yaml", + "tempfile", "testing-framework-core", "thiserror 2.0.18", "tokio", @@ -6632,47 +2277,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "testing_framework" -version = "0.1.0" -source = "git+https://github.com/logos-blockchain/logos-blockchain.git?rev=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667#5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" -dependencies = [ - "anyhow", - "async-trait", - "futures", - "hex", - "logos-blockchain-blend-service", - "logos-blockchain-chain-leader-service", - "logos-blockchain-chain-network-service", - "logos-blockchain-chain-service", - "logos-blockchain-common-http-client", - "logos-blockchain-core", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-cryptarchia-sync", - "logos-blockchain-groth16", - "logos-blockchain-http-api-common", - "logos-blockchain-key-management-system-service", - "logos-blockchain-ledger", - "logos-blockchain-libp2p", - "logos-blockchain-network-service", - "logos-blockchain-node", - "logos-blockchain-time-service", - "logos-blockchain-utils", - "num-bigint", - "rand 0.8.5", - "reqwest", - "serde", - "serde_json", - "serde_yaml", - "testing-framework-core", - "testing-framework-env", - "testing-framework-runner-local", - "thiserror 2.0.18", - "time", - "tokio", - "tracing", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -6713,15 +2317,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "thread_local" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" -dependencies = [ - "cfg-if", -] - [[package]] name = "time" version = "0.3.47" @@ -6729,7 +2324,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", - "itoa", "num-conv", "powerfmt", "serde_core", @@ -6753,15 +2347,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tinystr" version = "0.8.2" @@ -6772,21 +2357,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.49.0" @@ -6796,7 +2366,6 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.6.2", @@ -6842,7 +2411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand 0.8.5", + "rand", "tokio", ] @@ -6852,32 +2421,10 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.12", + "rustls", "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" -dependencies = [ - "rustls 0.23.36", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util", -] - [[package]] name = "tokio-util" version = "0.7.18" @@ -6892,73 +2439,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml_datetime" -version = "0.7.5+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" -dependencies = [ - "serde_core", -] - -[[package]] -name = "toml_edit" -version = "0.23.10+spec-1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" -dependencies = [ - "indexmap", - "toml_datetime", - "toml_parser", - "winnow", -] - -[[package]] -name = "toml_parser" -version = "1.0.6+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" -dependencies = [ - "winnow", -] - -[[package]] -name = "tonic" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f32a6f80051a4111560201420c7885d0082ba9efe2ab61875c587bb6b18b9a0" -dependencies = [ - "async-trait", - "base64 0.22.1", - "bytes", - "http 1.4.0", - "http-body 1.0.1", - "http-body-util", - "hyper 1.8.1", - "hyper-timeout 0.5.2", - "hyper-util", - "percent-encoding", - "pin-project", - "sync_wrapper", - "tokio", - "tokio-stream", - "tower 0.5.3", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic-prost" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f86539c0089bfd09b1f8c0ab0239d80392af74c21bc9e0f15e1b4aca4c1647f" -dependencies = [ - "bytes", - "prost 0.14.3", - "tonic", -] - [[package]] name = "tower" version = "0.4.13" @@ -6984,15 +2464,11 @@ checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", - "indexmap", "pin-project-lite", - "slab", "sync_wrapper", "tokio", - "tokio-util", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -7002,7 +2478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "base64 0.21.7", - "bitflags 2.10.0", + "bitflags", "bytes", "futures-core", "futures-util", @@ -7016,31 +2492,13 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower-http" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" -dependencies = [ - "bitflags 2.10.0", - "bytes", - "http 1.4.0", - "http-body 1.0.1", - "http-body-util", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower-http" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.10.0", + "bitflags", "bytes", "futures-util", "http 1.4.0", @@ -7076,18 +2534,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-appender" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" -dependencies = [ - "crossbeam-channel", - "thiserror 2.0.18", - "time", - "tracing-subscriber 0.3.22", -] - [[package]] name = "tracing-attributes" version = "0.1.31" @@ -7106,128 +2552,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", - "valuable", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "tracing-gelf" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c0170f1bf67b749d4377c2da1d99d6e722600051ee53870cfb6f618611e29e" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "hostname", - "serde_json", - "thiserror 1.0.69", - "tokio", - "tokio-util", - "tracing-core", - "tracing-futures", - "tracing-subscriber 0.3.22", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-loki" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3beec919fbdf99d719de8eda6adae3281f8a5b71ae40431f44dc7423053d34" -dependencies = [ - "loki-api", - "reqwest", - "serde", - "serde_json", - "snap", - "tokio", - "tokio-stream", - "tracing", - "tracing-core", - "tracing-log", - "tracing-serde", - "tracing-subscriber 0.3.22", - "url", -] - -[[package]] -name = "tracing-opentelemetry" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac28f2d093c6c477eaa76b23525478f38de514fa9aeb1285738d4b97a9552fc" -dependencies = [ - "js-sys", - "opentelemetry", - "smallvec", - "tracing", - "tracing-core", - "tracing-subscriber 0.3.22", - "web-time", -] - -[[package]] -name = "tracing-serde" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" -dependencies = [ - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex-automata", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "triomphe" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd69c5aa8f924c7519d6372789a74eac5b94fb0f8fcf0d4a97eb0bfc3e785f39" - [[package]] name = "try-lock" version = "0.2.5" @@ -7246,30 +2572,6 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" -[[package]] -name = "uint" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicase" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" - [[package]] name = "unicode-ident" version = "1.0.22" @@ -7288,18 +2590,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "unsigned-varint" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" - -[[package]] -name = "unsigned-varint" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" - [[package]] name = "untrusted" version = "0.9.0" @@ -7331,54 +2621,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "utoipa" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23" -dependencies = [ - "indexmap", - "serde", - "serde_json", - "utoipa-gen", -] - -[[package]] -name = "utoipa-gen" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c24e8ab68ff9ee746aad22d39b5535601e6416d1b0feeabf78be986a5c4392" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "utoipa-swagger-ui" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943e0ff606c6d57d410fd5663a4d7c074ab2c5f14ab903b9514565e59fa1189e" -dependencies = [ - "axum", - "mime_guess", - "regex", - "reqwest", - "rust-embed", - "serde", - "serde_json", - "utoipa", - "utoipa-swagger-ui-vendored", - "zip", -] - -[[package]] -name = "utoipa-swagger-ui-vendored" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2eebbbfe4093922c2b6734d7c679ebfebd704a0d7e56dfcb0d05818ce28977d" - [[package]] name = "uuid" version = "1.20.0" @@ -7390,12 +2632,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "valuable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" - [[package]] name = "vcpkg" version = "0.2.15" @@ -7501,19 +2737,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-streams" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.85" @@ -7524,47 +2747,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "widestring" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.11" @@ -7574,45 +2756,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbedf6db9096bc2364adce0ae0aa636dcd89f3c3f2cd67947062aaf0ca2a10ec" -dependencies = [ - "windows_aarch64_msvc 0.32.0", - "windows_i686_gnu 0.32.0", - "windows_i686_msvc 0.32.0", - "windows_x86_64_gnu 0.32.0", - "windows_x86_64_msvc 0.32.0", -] - -[[package]] -name = "windows" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc5cf48f83140dcaab716eeaea345f9e93d0018fb81162753a3f76c3397b538" -dependencies = [ - "windows-core 0.53.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcc5b895a6377f1ab9fa55acedab1fd5ac0db66ad1e6c7f47e28a22e446a5dd" -dependencies = [ - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.62.2" @@ -7622,7 +2765,7 @@ dependencies = [ "windows-implement", "windows-interface", "windows-link", - "windows-result 0.4.1", + "windows-result", "windows-strings", ] @@ -7654,15 +2797,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-result" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.4.1" @@ -7681,15 +2815,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -7717,21 +2842,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -7765,12 +2875,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -7783,18 +2887,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -7807,18 +2899,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -7843,18 +2923,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -7867,18 +2935,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -7891,12 +2947,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -7909,18 +2959,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -7933,25 +2971,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" -[[package]] -name = "winnow" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wit-bindgen" version = "0.51.0" @@ -7964,59 +2983,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" -[[package]] -name = "x25519-dalek" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" -dependencies = [ - "curve25519-dalek", - "rand_core 0.6.4", - "serde", - "zeroize", -] - -[[package]] -name = "x509-parser" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569f339c0c402346d4a75a9e39cf8dad310e287eef1ff56d4c68e5067f53460" -dependencies = [ - "asn1-rs", - "data-encoding", - "der-parser", - "lazy_static", - "nom 7.1.3", - "oid-registry", - "rusticata-macros", - "thiserror 2.0.18", - "time", -] - -[[package]] -name = "xml-rs" -version = "0.8.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" - -[[package]] -name = "xmltree" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" -dependencies = [ - "xml-rs", -] - -[[package]] -name = "yasna" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" -dependencies = [ - "time", -] - [[package]] name = "yoke" version = "0.8.1" @@ -8086,20 +3052,6 @@ name = "zeroize" version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] [[package]] name = "zerotrie" @@ -8134,22 +3086,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "zip" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164" -dependencies = [ - "arbitrary", - "crc32fast", - "crossbeam-utils", - "displaydoc", - "flate2", - "indexmap", - "num_enum", - "thiserror 1.0.69", -] - [[package]] name = "zmij" version = "1.0.19" diff --git a/Cargo.toml b/Cargo.toml index a1f960d..d24851f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,10 +4,6 @@ members = [ "cfgsync/artifacts", "cfgsync/core", "cfgsync/runtime", - "logos/examples", - "logos/runtime/env", - "logos/runtime/ext", - "logos/runtime/workloads", "testing-framework/core", "testing-framework/deployers/compose", "testing-framework/deployers/k8s", @@ -36,63 +32,16 @@ all = "allow" cfgsync-adapter = { default-features = false, path = "cfgsync/adapter" } cfgsync-artifacts = { default-features = false, path = "cfgsync/artifacts" } cfgsync-core = { default-features = false, path = "cfgsync/core" } -lb-ext = { default-features = false, path = "logos/runtime/ext" } -lb-framework = { default-features = false, package = "testing_framework", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -lb-workloads = { default-features = false, path = "logos/runtime/workloads" } testing-framework-core = { default-features = false, path = "testing-framework/core" } -testing-framework-env = { default-features = false, path = "logos/runtime/env" } testing-framework-runner-compose = { default-features = false, path = "testing-framework/deployers/compose" } testing-framework-runner-k8s = { default-features = false, path = "testing-framework/deployers/k8s" } testing-framework-runner-local = { default-features = false, path = "testing-framework/deployers/local" } -testing-framework-workflows = { default-features = false, package = "lb-workloads", path = "logos/runtime/workloads" } - -# Logos dependencies (from logos-blockchain master @ deccbb2d2) -broadcast-service = { default-features = false, package = "logos-blockchain-chain-broadcast-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -cfgsync_runtime = { default-features = false, package = "cfgsync-runtime", path = "cfgsync/runtime" } -chain-leader = { default-features = false, features = [ - "pol-dev-mode", -], package = "logos-blockchain-chain-leader-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -chain-network = { default-features = false, package = "logos-blockchain-chain-network-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -chain-service = { default-features = false, package = "logos-blockchain-chain-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -common-http-client = { default-features = false, package = "logos-blockchain-common-http-client", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -cryptarchia-engine = { default-features = false, package = "logos-blockchain-cryptarchia-engine", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -cryptarchia-sync = { default-features = false, package = "logos-blockchain-cryptarchia-sync", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -groth16 = { default-features = false, package = "logos-blockchain-groth16", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -key-management-system-service = { default-features = false, package = "logos-blockchain-key-management-system-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-api = { default-features = false, package = "logos-blockchain-api-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-blend-message = { default-features = false, package = "logos-blockchain-blend-message", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-blend-service = { default-features = false, package = "logos-blockchain-blend-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-core = { default-features = false, package = "logos-blockchain-core", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-http-api-common = { default-features = false, package = "logos-blockchain-http-api-common", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-ledger = { default-features = false, package = "logos-blockchain-ledger", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-libp2p = { default-features = false, package = "logos-blockchain-libp2p", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-network = { default-features = false, package = "logos-blockchain-network-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-node = { default-features = false, features = [ - "testing", -], package = "logos-blockchain-node", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-sdp = { default-features = false, package = "logos-blockchain-sdp-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-time = { default-features = false, package = "logos-blockchain-time-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-tracing = { default-features = false, package = "logos-blockchain-tracing", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-tracing-service = { default-features = false, package = "logos-blockchain-tracing-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-utils = { default-features = false, package = "logos-blockchain-utils", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -nomos-wallet = { default-features = false, package = "logos-blockchain-wallet-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -poc = { default-features = false, package = "logos-blockchain-poc", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -pol = { default-features = false, package = "logos-blockchain-pol", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -tx-service = { default-features = false, package = "logos-blockchain-tx-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -wallet = { default-features = false, package = "logos-blockchain-wallet", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -zksign = { default-features = false, package = "logos-blockchain-zksign", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -# lb_* aliases (nomos-node repo naming) -lb_http_api_common = { default-features = false, package = "logos-blockchain-http-api-common", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -lb_tracing = { default-features = false, package = "logos-blockchain-tracing", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } -lb_tracing_service = { default-features = false, package = "logos-blockchain-tracing-service", git = "https://github.com/logos-blockchain/logos-blockchain.git", rev = "5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667" } # External crates async-trait = { default-features = false, version = "0.1" } bytes = { default-features = false, version = "1.3" } hex = { default-features = false, version = "0.4.3" } libp2p = { default-features = false, version = "0.55" } num-bigint = { default-features = false, version = "0.4" } -overwatch = { default-features = false, git = "https://github.com/logos-co/Overwatch" } -overwatch-derive = { default-features = false, git = "https://github.com/logos-co/Overwatch" } parking_lot = { default-features = false, version = "0.12" } rand = { default-features = false, features = ["std", "std_rng"], version = "0.8" } reqwest = { default-features = false, version = "0.12" } @@ -107,13 +56,3 @@ time = { default-features = false, version = "0.3" } tokio = { default-features = false, version = "1" } tracing = { default-features = false, version = "0.1" } uuid = { default-features = false, version = "1", features = ["v4"] } - -[patch."https://github.com/logos-blockchain/logos-blockchain-testing.git"] -testing-framework-core = { path = "testing-framework/core" } -testing-framework-env = { path = "logos/runtime/env" } -testing-framework-runner-local = { path = "testing-framework/deployers/local" } - -[patch."https://github.com/logos-blockchain/logos-blockchain.git"] -testing-framework-core = { path = "testing-framework/core" } -testing-framework-env = { path = "logos/runtime/env" } -testing-framework-runner-local = { path = "testing-framework/deployers/local" } diff --git a/logos/README.md b/logos/README.md deleted file mode 100644 index a893e0a..0000000 --- a/logos/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Logos Testing Framework Extension - -This directory contains the **Logos-specific extension layer** that plugs into the generic -`testing-framework` core. The goal is to keep all Nomos logic in one place with a clear -structure so it can be reviewed and moved into the `logos-blockchain-node` repo cleanly. - -## Layout - -- `runtime/env` - Logos implementation of the core `Application` trait and runtime wiring. - -- `runtime/ext` - Logos extension glue for compose/k8s/cfgsync integration and scenario helpers. - -- `runtime/workloads` - Logos workloads and expectations (e.g., transaction workload, consensus liveness). - -- `runtime/cfgsync` - Logos cfgsync server/client and config bundling. - -- `infra/assets/stack` - Docker stack assets, scripts, and monitoring bundles. - -- `infra/helm/logos-runner` - Helm chart used by the k8s deployer. - -## Extension Boundary - -The **core** (`testing-framework/*`) remains Logos-agnostic. All app assumptions should -live under `logos/runtime/*` and expose only the minimal surface needed by the core. - -If you need to introduce new core capabilities, add them to the core and keep the Logos -implementation in `logos/runtime/*`. diff --git a/logos/examples/Cargo.toml b/logos/examples/Cargo.toml deleted file mode 100644 index 94769a6..0000000 --- a/logos/examples/Cargo.toml +++ /dev/null @@ -1,31 +0,0 @@ -[package] -categories.workspace = true -description.workspace = true -edition.workspace = true -keywords.workspace = true -license.workspace = true -name = "runner-examples" -readme.workspace = true -repository.workspace = true -version = "0.1.0" - -[dependencies] -anyhow = "1" -lb-ext = { workspace = true } -lb-framework = { workspace = true } -lb-workloads = { workspace = true } -testing-framework-core = { workspace = true } -testing-framework-runner-compose = { workspace = true } -testing-framework-runner-k8s = { workspace = true } -testing-framework-runner-local = { workspace = true } -tokio = { features = ["macros", "net", "rt-multi-thread", "time"], workspace = true } -tracing = { workspace = true } -tracing-subscriber = { features = ["env-filter", "fmt"], version = "0.3" } - -[dev-dependencies] -async-trait = { workspace = true } - -[features] - -[lints] -workspace = true diff --git a/logos/examples/doc-snippets/Cargo.toml b/logos/examples/doc-snippets/Cargo.toml deleted file mode 100644 index 147f5c9..0000000 --- a/logos/examples/doc-snippets/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -categories.workspace = true -description.workspace = true -edition.workspace = true -keywords.workspace = true -license.workspace = true -name = "doc-snippets" -publish = false -readme.workspace = true -repository.workspace = true -version.workspace = true - -[dependencies] -anyhow = "1" -async-trait = { workspace = true } -testing-framework-core = { workspace = true } -testing-framework-runner-compose = { workspace = true } -testing-framework-runner-k8s = { workspace = true } -testing-framework-runner-local = { workspace = true } -testing-framework-workflows = { workspace = true } - -[lints] -workspace = true diff --git a/logos/examples/doc-snippets/src/architecture_overview_builder_api.rs b/logos/examples/doc-snippets/src/architecture_overview_builder_api.rs deleted file mode 100644 index cb1c407..0000000 --- a/logos/examples/doc-snippets/src/architecture_overview_builder_api.rs +++ /dev/null @@ -1,15 +0,0 @@ -use std::time::Duration; - -use testing_framework_core::scenario::{Scenario, ScenarioBuilder}; -use testing_framework_workflows::ScenarioBuilderExt; - -use crate::SnippetResult; - -pub fn scenario_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) - .wallets(50) - .transactions_with(|txs| txs.rate(5).users(20)) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(90)) - .build() -} diff --git a/logos/examples/doc-snippets/src/chaos_workloads_random_restart.rs b/logos/examples/doc-snippets/src/chaos_workloads_random_restart.rs deleted file mode 100644 index 78ff50a..0000000 --- a/logos/examples/doc-snippets/src/chaos_workloads_random_restart.rs +++ /dev/null @@ -1,20 +0,0 @@ -use std::time::Duration; - -use testing_framework_core::scenario::{NodeControlCapability, Scenario, ScenarioBuilder}; -use testing_framework_workflows::{ScenarioBuilderExt, workloads::chaos::RandomRestartWorkload}; - -use crate::SnippetResult; - -pub fn random_restart_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().nodes(2)) - .with_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 nodes - )) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(150)) - .build() -} diff --git a/logos/examples/doc-snippets/src/custom_workload_example_expectation.rs b/logos/examples/doc-snippets/src/custom_workload_example_expectation.rs deleted file mode 100644 index 12f253f..0000000 --- a/logos/examples/doc-snippets/src/custom_workload_example_expectation.rs +++ /dev/null @@ -1,35 +0,0 @@ -use async_trait::async_trait; -use testing_framework_core::scenario::{DynError, Expectation, RunContext}; - -pub struct ReachabilityExpectation { - target_idx: usize, -} - -impl ReachabilityExpectation { - pub fn new(target_idx: usize) -> Self { - Self { target_idx } - } -} - -#[async_trait] -impl Expectation for ReachabilityExpectation { - fn name(&self) -> &str { - "target_reachable" - } - - async fn evaluate(&mut self, ctx: &RunContext) -> Result<(), DynError> { - let nodes = ctx.node_clients().node_clients(); - let client = nodes.get(self.target_idx).ok_or_else(|| { - Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - "missing target client", - )) as DynError - })?; - - client - .consensus_info() - .await - .map(|_| ()) - .map_err(|e| e.into()) - } -} diff --git a/logos/examples/doc-snippets/src/custom_workload_example_workload.rs b/logos/examples/doc-snippets/src/custom_workload_example_workload.rs deleted file mode 100644 index d9bffe8..0000000 --- a/logos/examples/doc-snippets/src/custom_workload_example_workload.rs +++ /dev/null @@ -1,61 +0,0 @@ -use async_trait::async_trait; -use testing_framework_core::{ - scenario::{DynError, Expectation, RunContext, RunMetrics, Workload}, - topology::generation::GeneratedTopology, -}; - -pub struct ReachabilityWorkload { - target_idx: usize, -} - -impl ReachabilityWorkload { - pub fn new(target_idx: usize) -> Self { - Self { target_idx } - } -} - -#[async_trait] -impl Workload for ReachabilityWorkload { - fn name(&self) -> &str { - "reachability_workload" - } - - fn expectations(&self) -> Vec> { - vec![Box::new( - crate::custom_workload_example_expectation::ReachabilityExpectation::new( - self.target_idx, - ), - )] - } - - fn init( - &mut self, - topology: &GeneratedTopology, - _run_metrics: &RunMetrics, - ) -> Result<(), DynError> { - if topology.nodes().get(self.target_idx).is_none() { - return Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - "no node at requested index", - ))); - } - Ok(()) - } - - async fn start(&self, ctx: &RunContext) -> Result<(), DynError> { - let nodes = ctx.node_clients().node_clients(); - let client = nodes.get(self.target_idx).ok_or_else(|| { - Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - "missing target client", - )) as DynError - })?; - - // Lightweight API call to prove reachability. - client - .consensus_info() - .await - .map(|_| ()) - .map_err(|e| e.into()) - } -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_build.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_build.rs deleted file mode 100644 index f8c9c50..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_build.rs +++ /dev/null @@ -1,8 +0,0 @@ -use testing_framework_core::scenario::{Scenario, ScenarioBuilder}; -use testing_framework_workflows::ScenarioBuilderExt; - -use crate::SnippetResult; - -pub fn build_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().nodes(1)).build() // Construct the final Scenario -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_build_complete_example.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_build_complete_example.rs deleted file mode 100644 index 7d02bc8..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_build_complete_example.rs +++ /dev/null @@ -1,24 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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().nodes(3)) - .wallets(50) - .transactions_with(|txs| { - txs.rate(5) // 5 transactions per block - .users(20) - }) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(90)) - .build()?; - - let deployer = LocalDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_deployers.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_deployers.rs deleted file mode 100644 index 827c83f..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_deployers.rs +++ /dev/null @@ -1,14 +0,0 @@ -use testing_framework_runner_compose::ComposeDeployer; -use testing_framework_runner_k8s::K8sDeployer; -use testing_framework_runner_local::LocalDeployer; - -pub fn deployers() { - // Local processes - let _deployer = LocalDeployer::default(); - - // Docker Compose - let _deployer = ComposeDeployer::default(); - - // Kubernetes - let _deployer = K8sDeployer::default(); -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_expectations.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_expectations.rs deleted file mode 100644 index 7d224da..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_expectations.rs +++ /dev/null @@ -1,10 +0,0 @@ -use testing_framework_core::scenario::{Scenario, ScenarioBuilder}; -use testing_framework_workflows::ScenarioBuilderExt; - -use crate::SnippetResult; - -pub fn expectations_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().nodes(1)) - .expect_consensus_liveness() // Assert blocks are produced continuously - .build() -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_imports.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_imports.rs deleted file mode 100644 index 9108f22..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_imports.rs +++ /dev/null @@ -1,7 +0,0 @@ -use std::time::Duration; - -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -use testing_framework_runner_compose::ComposeDeployer; -use testing_framework_runner_k8s::K8sDeployer; -use testing_framework_runner_local::LocalDeployer; -use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_run_duration.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_run_duration.rs deleted file mode 100644 index d22ae46..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_run_duration.rs +++ /dev/null @@ -1,12 +0,0 @@ -use std::time::Duration; - -use testing_framework_core::scenario::{Scenario, ScenarioBuilder}; -use testing_framework_workflows::ScenarioBuilderExt; - -use crate::SnippetResult; - -pub fn run_duration_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().nodes(1)) - .with_run_duration(Duration::from_secs(120)) // Run for 120 seconds - .build() -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_topology.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_topology.rs deleted file mode 100644 index 00df6a3..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_topology.rs +++ /dev/null @@ -1,8 +0,0 @@ -use testing_framework_core::scenario::{Builder, ScenarioBuilder}; - -pub fn topology() -> Builder<()> { - ScenarioBuilder::topology_with(|t| { - t.network_star() // Star topology (all connect to seed node) - .nodes(3) // Number of node nodes - }) -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_transactions_workload.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_transactions_workload.rs deleted file mode 100644 index c0427e4..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_transactions_workload.rs +++ /dev/null @@ -1,14 +0,0 @@ -use testing_framework_core::scenario::{Scenario, ScenarioBuilder}; -use testing_framework_workflows::ScenarioBuilderExt; - -use crate::SnippetResult; - -pub fn transactions_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().nodes(1)) - .wallets(50) - .transactions_with(|txs| { - txs.rate(5) // 5 transactions per block - .users(20) // Use 20 of the seeded wallets - }) // Finish transaction workload config - .build() -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_wallets.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_wallets.rs deleted file mode 100644 index 4e1fe38..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_wallets.rs +++ /dev/null @@ -1,10 +0,0 @@ -use testing_framework_core::scenario::{Scenario, ScenarioBuilder}; -use testing_framework_workflows::ScenarioBuilderExt; - -use crate::SnippetResult; - -pub fn wallets_plan() -> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().nodes(1)) - .wallets(50) // Seed 50 funded wallet accounts - .build() -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_workload_chaos.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_workload_chaos.rs deleted file mode 100644 index 58b2172..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_workload_chaos.rs +++ /dev/null @@ -1,20 +0,0 @@ -use std::time::Duration; - -use testing_framework_core::scenario::{NodeControlCapability, ScenarioBuilder}; -use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; - -use crate::SnippetResult; - -pub fn chaos_plan() --> SnippetResult> { - ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) - .with_node_control() // Enable node control capability - .chaos_with(|c| { - c.restart() // Random restart chaos - .min_delay(Duration::from_secs(30)) // Min time between restarts - .max_delay(Duration::from_secs(60)) // Max time between restarts - .target_cooldown(Duration::from_secs(45)) // Cooldown after restart - .apply() // Required for chaos configuration - }) - .build() -} diff --git a/logos/examples/doc-snippets/src/dsl_cheat_sheet_workload_execution.rs b/logos/examples/doc-snippets/src/dsl_cheat_sheet_workload_execution.rs deleted file mode 100644 index 27c0b10..0000000 --- a/logos/examples/doc-snippets/src/dsl_cheat_sheet_workload_execution.rs +++ /dev/null @@ -1,16 +0,0 @@ -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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().nodes(1)) - .expect_consensus_liveness() - .build()?; - - let deployer = LocalDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/examples_advanced_aggressive_chaos_test.rs b/logos/examples/doc-snippets/src/examples_advanced_aggressive_chaos_test.rs deleted file mode 100644 index b3f18a3..0000000 --- a/logos/examples/doc-snippets/src/examples_advanced_aggressive_chaos_test.rs +++ /dev/null @@ -1,29 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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().nodes(4)) - .with_node_control() - .wallets(50) - .transactions_with(|txs| txs.rate(10).users(20)) - .chaos_with(|c| { - c.restart() - .min_delay(Duration::from_secs(10)) - .max_delay(Duration::from_secs(20)) - .target_cooldown(Duration::from_secs(15)) - .apply() - }) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(180)) - .build()?; - - let deployer = ComposeDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/examples_advanced_load_progression_test.rs b/logos/examples/doc-snippets/src/examples_advanced_load_progression_test.rs deleted file mode 100644 index 9c217e8..0000000 --- a/logos/examples/doc-snippets/src/examples_advanced_load_progression_test.rs +++ /dev/null @@ -1,25 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -use testing_framework_runner_compose::ComposeDeployer; -use testing_framework_workflows::ScenarioBuilderExt; - -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().nodes(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?; - let _handle = runner.run(&mut plan).await?; - } - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/examples_advanced_sustained_load_test.rs b/logos/examples/doc-snippets/src/examples_advanced_sustained_load_test.rs deleted file mode 100644 index 21ffe8a..0000000 --- a/logos/examples/doc-snippets/src/examples_advanced_sustained_load_test.rs +++ /dev/null @@ -1,21 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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().nodes(4)) - .wallets(100) - .transactions_with(|txs| txs.rate(15).users(50)) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(300)) - .build()?; - - let deployer = ComposeDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/examples_chaos_resilience.rs b/logos/examples/doc-snippets/src/examples_chaos_resilience.rs deleted file mode 100644 index ba8fc49..0000000 --- a/logos/examples/doc-snippets/src/examples_chaos_resilience.rs +++ /dev/null @@ -1,29 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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().nodes(4)) - .with_node_control() - .wallets(20) - .transactions_with(|txs| txs.rate(3).users(10)) - .chaos_with(|c| { - c.restart() - .min_delay(Duration::from_secs(20)) - .max_delay(Duration::from_secs(40)) - .target_cooldown(Duration::from_secs(30)) - .apply() - }) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(120)) - .build()?; - - let deployer = ComposeDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/examples_da_and_transactions.rs b/logos/examples/doc-snippets/src/examples_da_and_transactions.rs deleted file mode 100644 index 93301de..0000000 --- a/logos/examples/doc-snippets/src/examples_da_and_transactions.rs +++ /dev/null @@ -1,21 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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().nodes(3)) - .wallets(30) - .transactions_with(|txs| txs.rate(5).users(15)) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(90)) - .build()?; - - let deployer = LocalDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/examples_simple_consensus.rs b/logos/examples/doc-snippets/src/examples_simple_consensus.rs deleted file mode 100644 index 1978747..0000000 --- a/logos/examples/doc-snippets/src/examples_simple_consensus.rs +++ /dev/null @@ -1,19 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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().nodes(3)) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(30)) - .build()?; - - let deployer = LocalDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/examples_transaction_workload.rs b/logos/examples/doc-snippets/src/examples_transaction_workload.rs deleted file mode 100644 index 4c0a013..0000000 --- a/logos/examples/doc-snippets/src/examples_transaction_workload.rs +++ /dev/null @@ -1,21 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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().nodes(2)) - .wallets(20) - .transactions_with(|txs| txs.rate(5).users(10)) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(60)) - .build()?; - - let deployer = LocalDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/internal_crate_reference_add_deployer.rs b/logos/examples/doc-snippets/src/internal_crate_reference_add_deployer.rs deleted file mode 100644 index 48f784e..0000000 --- a/logos/examples/doc-snippets/src/internal_crate_reference_add_deployer.rs +++ /dev/null @@ -1,19 +0,0 @@ -use async_trait::async_trait; -use testing_framework_core::scenario::{Deployer, Runner, Scenario}; - -#[derive(Debug)] -pub struct YourError; - -pub struct YourDeployer; - -#[async_trait] -impl Deployer for YourDeployer { - type Error = YourError; - - async fn deploy(&self, _scenario: &Scenario<()>) -> Result { - // Provision infrastructure - // Wait for readiness - // Return Runner - todo!() - } -} diff --git a/logos/examples/doc-snippets/src/internal_crate_reference_add_expectation_builder_ext.rs b/logos/examples/doc-snippets/src/internal_crate_reference_add_expectation_builder_ext.rs deleted file mode 100644 index e61b2f2..0000000 --- a/logos/examples/doc-snippets/src/internal_crate_reference_add_expectation_builder_ext.rs +++ /dev/null @@ -1,20 +0,0 @@ -use testing_framework_core::scenario::ScenarioBuilder; - -use crate::SnippetResult; - -pub trait YourExpectationDslExt: Sized { - fn expect_your_condition(self) -> Self; -} - -impl YourExpectationDslExt for testing_framework_core::scenario::Builder { - fn expect_your_condition(self) -> Self { - self - } -} - -pub fn use_in_examples() -> SnippetResult<()> { - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) - .expect_your_condition() - .build()?; - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/internal_crate_reference_add_expectation_trait.rs b/logos/examples/doc-snippets/src/internal_crate_reference_add_expectation_trait.rs deleted file mode 100644 index 6fa1ac7..0000000 --- a/logos/examples/doc-snippets/src/internal_crate_reference_add_expectation_trait.rs +++ /dev/null @@ -1,16 +0,0 @@ -use async_trait::async_trait; -use testing_framework_core::scenario::{DynError, Expectation, RunContext}; - -pub struct YourExpectation; - -#[async_trait] -impl Expectation for YourExpectation { - fn name(&self) -> &'static str { - "your_expectation" - } - - async fn evaluate(&mut self, _ctx: &RunContext) -> Result<(), DynError> { - // implementation - Ok(()) - } -} diff --git a/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_builder_ext.rs b/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_builder_ext.rs deleted file mode 100644 index 39e20f5..0000000 --- a/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_builder_ext.rs +++ /dev/null @@ -1,11 +0,0 @@ -pub struct YourWorkloadBuilder; - -impl YourWorkloadBuilder { - pub fn some_config(self) -> Self { - self - } -} - -pub trait ScenarioBuilderExt: Sized { - fn your_workload(self) -> YourWorkloadBuilder; -} diff --git a/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_trait.rs b/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_trait.rs deleted file mode 100644 index 03daab8..0000000 --- a/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_trait.rs +++ /dev/null @@ -1,16 +0,0 @@ -use async_trait::async_trait; -use testing_framework_core::scenario::{DynError, RunContext, Workload}; - -pub struct YourWorkload; - -#[async_trait] -impl Workload for YourWorkload { - fn name(&self) -> &'static str { - "your_workload" - } - - async fn start(&self, _ctx: &RunContext) -> Result<(), DynError> { - // implementation - Ok(()) - } -} diff --git a/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_use_in_examples.rs b/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_use_in_examples.rs deleted file mode 100644 index d61d169..0000000 --- a/logos/examples/doc-snippets/src/internal_crate_reference_add_workload_use_in_examples.rs +++ /dev/null @@ -1,34 +0,0 @@ -use testing_framework_core::scenario::ScenarioBuilder; - -use crate::SnippetResult; - -pub struct YourWorkloadBuilder; - -impl YourWorkloadBuilder { - pub fn some_config(self) -> Self { - self - } -} - -pub trait YourWorkloadDslExt: Sized { - fn your_workload_with(self, configurator: F) -> Self - where - F: FnOnce(YourWorkloadBuilder) -> YourWorkloadBuilder; -} - -impl YourWorkloadDslExt for testing_framework_core::scenario::Builder { - fn your_workload_with(self, configurator: F) -> Self - where - F: FnOnce(YourWorkloadBuilder) -> YourWorkloadBuilder, - { - let _ = configurator(YourWorkloadBuilder); - self - } -} - -pub fn use_in_examples() -> SnippetResult<()> { - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) - .your_workload_with(|w| w.some_config()) - .build()?; - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/lib.rs b/logos/examples/doc-snippets/src/lib.rs deleted file mode 100644 index 7ba4807..0000000 --- a/logos/examples/doc-snippets/src/lib.rs +++ /dev/null @@ -1,47 +0,0 @@ -#![allow(dead_code, unused_imports, unused_variables)] - -pub type SnippetResult = Result; - -mod architecture_overview_builder_api; -mod chaos_workloads_random_restart; -mod custom_workload_example_expectation; -mod custom_workload_example_workload; -mod dsl_cheat_sheet_build; -mod dsl_cheat_sheet_build_complete_example; -mod dsl_cheat_sheet_deployers; -mod dsl_cheat_sheet_expectations; -mod dsl_cheat_sheet_imports; -mod dsl_cheat_sheet_run_duration; -mod dsl_cheat_sheet_topology; -mod dsl_cheat_sheet_transactions_workload; -mod dsl_cheat_sheet_wallets; -mod dsl_cheat_sheet_workload_chaos; -mod dsl_cheat_sheet_workload_execution; -mod examples_advanced_aggressive_chaos_test; -mod examples_advanced_load_progression_test; -mod examples_advanced_sustained_load_test; -mod examples_chaos_resilience; -mod examples_da_and_transactions; -mod examples_simple_consensus; -mod examples_transaction_workload; -mod internal_crate_reference_add_deployer; -mod internal_crate_reference_add_expectation_builder_ext; -mod internal_crate_reference_add_expectation_trait; -mod internal_crate_reference_add_workload_builder_ext; -mod internal_crate_reference_add_workload_trait; -mod internal_crate_reference_add_workload_use_in_examples; -mod node_control_accessing_control; -mod node_control_trait; -mod quickstart_adjust_topology; -mod quickstart_core_api_pattern; -mod quickstart_step_1_topology; -mod quickstart_step_2_wallets; -mod quickstart_step_3_workloads; -mod quickstart_step_4_expectation; -mod quickstart_step_5_run_duration; -mod quickstart_step_6_deploy_and_execute; -mod quickstart_swap_deployer_compose; -mod testing_philosophy_declarative_over_imperative; -mod testing_philosophy_determinism_first; -mod testing_philosophy_minimum_run_windows; -mod testing_philosophy_protocol_time_not_wall_time; diff --git a/logos/examples/doc-snippets/src/manual_cluster_external_driver_example.rs b/logos/examples/doc-snippets/src/manual_cluster_external_driver_example.rs deleted file mode 100644 index 2010f23..0000000 --- a/logos/examples/doc-snippets/src/manual_cluster_external_driver_example.rs +++ /dev/null @@ -1,59 +0,0 @@ -use std::time::Duration; -use anyhow::Result; -use testing_framework_core::{ - scenario::{PeerSelection, StartNodeOptions}, - topology::config::TopologyConfig, -}; -use testing_framework_runner_local::LocalDeployer; -use tokio::time::sleep; - -#[allow(dead_code)] -async fn external_driver_example() -> Result<()> { - // Step 1: Create cluster with capacity for 3 nodes - let config = TopologyConfig::with_node_numbers(3); - let deployer = LocalDeployer::new(); - let cluster = deployer.manual_cluster(config)?; - - // Step 2: External driver decides to start 2 nodes initially - println!("Starting initial topology..."); - let node_a = cluster.start_node("a").await?.api; - let node_b = cluster - .start_node_with( - "b", - StartNodeOptions { - peers: PeerSelection::Named(vec!["node-a".to_owned()]), - }, - ) - .await? - .api; - - cluster.wait_network_ready().await?; - - // Step 3: External driver runs some protocol operations - let info = node_a.consensus_info().await?; - println!("Initial cluster height: {}", info.height); - - // Step 4: Later, external driver decides to add third node - println!("External driver adding third node..."); - let node_c = cluster - .start_node_with( - "c", - StartNodeOptions { - peers: PeerSelection::Named(vec!["node-a".to_owned()]), - }, - ) - .await? - .api; - - cluster.wait_network_ready().await?; - - // Step 5: External driver validates final state - let heights = vec![ - node_a.consensus_info().await?.height, - node_b.consensus_info().await?.height, - node_c.consensus_info().await?.height, - ]; - println!("Final heights: {:?}", heights); - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/manual_cluster_validation_patterns.rs b/logos/examples/doc-snippets/src/manual_cluster_validation_patterns.rs deleted file mode 100644 index 076e6bb..0000000 --- a/logos/examples/doc-snippets/src/manual_cluster_validation_patterns.rs +++ /dev/null @@ -1,60 +0,0 @@ -use std::time::Duration; -use testing_framework_core::nodes::ApiClient; -use tokio::time::sleep; - -#[allow(dead_code)] -async fn height_convergence( - node_a: &ApiClient, - node_b: &ApiClient, - node_c: &ApiClient, -) -> anyhow::Result<()> { - let start = tokio::time::Instant::now(); - loop { - let heights: Vec = vec![ - node_a.consensus_info().await?.height, - node_b.consensus_info().await?.height, - node_c.consensus_info().await?.height, - ]; - - let max_diff = heights.iter().max().unwrap() - heights.iter().min().unwrap(); - if max_diff <= 5 { - println!("Converged: heights={:?}", heights); - break; - } - - if start.elapsed() > Duration::from_secs(60) { - return Err(anyhow::anyhow!("Convergence timeout: heights={:?}", heights)); - } - - sleep(Duration::from_secs(2)).await; - } - Ok(()) -} - -#[allow(dead_code)] -async fn peer_count_verification(node: &ApiClient) -> anyhow::Result<()> { - let info = node.network_info().await?; - assert_eq!( - info.n_peers, 3, - "Expected 3 peers, found {}", - info.n_peers - ); - Ok(()) -} - -#[allow(dead_code)] -async fn block_production(node_a: &ApiClient) -> anyhow::Result<()> { - // Verify node is producing blocks - let initial_height = node_a.consensus_info().await?.height; - - sleep(Duration::from_secs(10)).await; - - let current_height = node_a.consensus_info().await?.height; - assert!( - current_height > initial_height, - "Node should have produced blocks: initial={}, current={}", - initial_height, - current_height - ); - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/node_control_accessing_control.rs b/logos/examples/doc-snippets/src/node_control_accessing_control.rs deleted file mode 100644 index f4404f3..0000000 --- a/logos/examples/doc-snippets/src/node_control_accessing_control.rs +++ /dev/null @@ -1,19 +0,0 @@ -use async_trait::async_trait; -use testing_framework_core::scenario::{DynError, RunContext, Workload}; - -struct RestartWorkload; - -#[async_trait] -impl Workload for RestartWorkload { - fn name(&self) -> &str { - "restart_workload" - } - - async fn start(&self, ctx: &RunContext) -> Result<(), DynError> { - if let Some(control) = ctx.node_control() { - // Restart the first node by name if supported. - control.restart_node("node-0").await?; - } - Ok(()) - } -} diff --git a/logos/examples/doc-snippets/src/node_control_trait.rs b/logos/examples/doc-snippets/src/node_control_trait.rs deleted file mode 100644 index 6064b80..0000000 --- a/logos/examples/doc-snippets/src/node_control_trait.rs +++ /dev/null @@ -1,7 +0,0 @@ -use async_trait::async_trait; -use testing_framework_core::scenario::DynError; - -#[async_trait] -pub trait NodeControlHandle: Send + Sync { - async fn restart_node(&self, name: &str) -> Result<(), DynError>; -} diff --git a/logos/examples/doc-snippets/src/quickstart_adjust_topology.rs b/logos/examples/doc-snippets/src/quickstart_adjust_topology.rs deleted file mode 100644 index 7002a04..0000000 --- a/logos/examples/doc-snippets/src/quickstart_adjust_topology.rs +++ /dev/null @@ -1,17 +0,0 @@ -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -use testing_framework_runner_local::LocalDeployer; - -pub async fn run_with_env_overrides() -> Result<()> { - // Uses LOGOS_BLOCKCHAIN_DEMO_* env vars (for example - // LOGOS_BLOCKCHAIN_DEMO_NODES) - let mut plan = ScenarioBuilder::with_node_counts(3) - .with_run_duration(std::time::Duration::from_secs(120)) - .build()?; - - let deployer = LocalDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/quickstart_core_api_pattern.rs b/logos/examples/doc-snippets/src/quickstart_core_api_pattern.rs deleted file mode 100644 index eded1f3..0000000 --- a/logos/examples/doc-snippets/src/quickstart_core_api_pattern.rs +++ /dev/null @@ -1,26 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -use testing_framework_runner_local::LocalDeployer; -use testing_framework_workflows::ScenarioBuilderExt; - -pub async fn run_local_demo() -> Result<()> { - // Define the scenario (2 node, tx workload) - let mut plan = ScenarioBuilder::topology_with(|t| t.network_star().nodes(2)) - .wallets(1_000) - .transactions_with(|txs| { - txs.rate(5) // 5 transactions per block - .users(500) // use 500 of the seeded wallets - }) - .expect_consensus_liveness() - .with_run_duration(Duration::from_secs(60)) - .build()?; - - // Deploy and run - let deployer = LocalDeployer::default(); - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/quickstart_step_1_topology.rs b/logos/examples/doc-snippets/src/quickstart_step_1_topology.rs deleted file mode 100644 index 2a2bbf7..0000000 --- a/logos/examples/doc-snippets/src/quickstart_step_1_topology.rs +++ /dev/null @@ -1,8 +0,0 @@ -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 - .nodes(2) // 2 node nodes - }) -} diff --git a/logos/examples/doc-snippets/src/quickstart_step_2_wallets.rs b/logos/examples/doc-snippets/src/quickstart_step_2_wallets.rs deleted file mode 100644 index 31db8b6..0000000 --- a/logos/examples/doc-snippets/src/quickstart_step_2_wallets.rs +++ /dev/null @@ -1,6 +0,0 @@ -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).wallets(1_000) // Seed 1,000 funded wallet accounts -} diff --git a/logos/examples/doc-snippets/src/quickstart_step_3_workloads.rs b/logos/examples/doc-snippets/src/quickstart_step_3_workloads.rs deleted file mode 100644 index 70deda3..0000000 --- a/logos/examples/doc-snippets/src/quickstart_step_3_workloads.rs +++ /dev/null @@ -1,11 +0,0 @@ -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) - .wallets(1_000) - .transactions_with(|txs| { - txs.rate(5) // 5 transactions per block - .users(500) // Use 500 of the 1,000 wallets - }) -} diff --git a/logos/examples/doc-snippets/src/quickstart_step_4_expectation.rs b/logos/examples/doc-snippets/src/quickstart_step_4_expectation.rs deleted file mode 100644 index 6186c5f..0000000 --- a/logos/examples/doc-snippets/src/quickstart_step_4_expectation.rs +++ /dev/null @@ -1,6 +0,0 @@ -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).expect_consensus_liveness() // This says what success means: blocks must be produced continuously. -} diff --git a/logos/examples/doc-snippets/src/quickstart_step_5_run_duration.rs b/logos/examples/doc-snippets/src/quickstart_step_5_run_duration.rs deleted file mode 100644 index d1b7907..0000000 --- a/logos/examples/doc-snippets/src/quickstart_step_5_run_duration.rs +++ /dev/null @@ -1,7 +0,0 @@ -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).with_run_duration(Duration::from_secs(60)) -} diff --git a/logos/examples/doc-snippets/src/quickstart_step_6_deploy_and_execute.rs b/logos/examples/doc-snippets/src/quickstart_step_6_deploy_and_execute.rs deleted file mode 100644 index 226e942..0000000 --- a/logos/examples/doc-snippets/src/quickstart_step_6_deploy_and_execute.rs +++ /dev/null @@ -1,13 +0,0 @@ -use anyhow::Result; -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).build()?; - - let deployer = LocalDeployer::default(); // Use local process deployer - let runner = deployer.deploy(&plan).await?; // Provision infrastructure - let _handle = runner.run(&mut plan).await?; // Execute workloads & expectations - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/quickstart_swap_deployer_compose.rs b/logos/examples/doc-snippets/src/quickstart_swap_deployer_compose.rs deleted file mode 100644 index a1bf4e6..0000000 --- a/logos/examples/doc-snippets/src/quickstart_swap_deployer_compose.rs +++ /dev/null @@ -1,14 +0,0 @@ -use anyhow::Result; -use testing_framework_core::scenario::{Deployer, ScenarioBuilder}; -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).build()?; - - let deployer = ComposeDeployer::default(); // Use Docker Compose - let runner = deployer.deploy(&plan).await?; - let _handle = runner.run(&mut plan).await?; - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/testing_philosophy_declarative_over_imperative.rs b/logos/examples/doc-snippets/src/testing_philosophy_declarative_over_imperative.rs deleted file mode 100644 index 1827017..0000000 --- a/logos/examples/doc-snippets/src/testing_philosophy_declarative_over_imperative.rs +++ /dev/null @@ -1,20 +0,0 @@ -use testing_framework_core::scenario::ScenarioBuilder; -use testing_framework_workflows::ScenarioBuilderExt; - -use crate::SnippetResult; - -pub fn declarative_over_imperative() -> SnippetResult<()> { - // Good: declarative - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().nodes(2)) - .transactions_with(|txs| { - txs.rate(5) // 5 transactions per block - }) - .expect_consensus_liveness() - .build()?; - - // Bad: imperative (framework doesn't work this way) - // spawn_node(); - // loop { submit_tx(); check_block(); } - - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/testing_philosophy_determinism_first.rs b/logos/examples/doc-snippets/src/testing_philosophy_determinism_first.rs deleted file mode 100644 index 1053c08..0000000 --- a/logos/examples/doc-snippets/src/testing_philosophy_determinism_first.rs +++ /dev/null @@ -1,33 +0,0 @@ -use std::time::Duration; - -use testing_framework_core::scenario::ScenarioBuilder; -use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt}; - -use crate::SnippetResult; - -pub fn determinism_first() -> SnippetResult<()> { - // Separate: functional test (deterministic) - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().nodes(2)) - .transactions_with(|txs| { - txs.rate(5) // 5 transactions per block - }) - .expect_consensus_liveness() - .build()?; - - // Separate: chaos test (introduces randomness) - let _chaos_plan = ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) - .with_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/logos/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs b/logos/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs deleted file mode 100644 index 4c1cf09..0000000 --- a/logos/examples/doc-snippets/src/testing_philosophy_minimum_run_windows.rs +++ /dev/null @@ -1,22 +0,0 @@ -use std::time::Duration; - -use testing_framework_core::scenario::ScenarioBuilder; -use testing_framework_workflows::ScenarioBuilderExt; - -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) - .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) - .with_run_duration(Duration::from_secs(60)) - .expect_consensus_liveness() - .build()?; - Ok(()) -} diff --git a/logos/examples/doc-snippets/src/testing_philosophy_protocol_time_not_wall_time.rs b/logos/examples/doc-snippets/src/testing_philosophy_protocol_time_not_wall_time.rs deleted file mode 100644 index cc66dc1..0000000 --- a/logos/examples/doc-snippets/src/testing_philosophy_protocol_time_not_wall_time.rs +++ /dev/null @@ -1,23 +0,0 @@ -use std::time::Duration; - -use testing_framework_core::scenario::ScenarioBuilder; -use testing_framework_workflows::ScenarioBuilderExt; - -use crate::SnippetResult; - -pub fn protocol_time_not_wall_time() -> SnippetResult<()> { - // Good: protocol-oriented thinking - let _plan = ScenarioBuilder::topology_with(|t| t.network_star().nodes(2)) - .transactions_with(|txs| { - txs.rate(5) // 5 transactions per block - }) - .with_run_duration(Duration::from_secs(60)) // Let framework calculate expected blocks - .expect_consensus_liveness() // "Did we produce the expected blocks?" - .build()?; - - // Bad: wall-clock assumptions - // "I expect exactly 30 blocks in 60 seconds" - // This breaks on slow CI where slot timing might drift - - Ok(()) -} diff --git a/logos/examples/src/bin/compose_runner.rs b/logos/examples/src/bin/compose_runner.rs deleted file mode 100644 index 2254ca8..0000000 --- a/logos/examples/src/bin/compose_runner.rs +++ /dev/null @@ -1,83 +0,0 @@ -use std::{process, time::Duration}; - -use anyhow::{Context as _, Result}; -use lb_ext::{ - CoreBuilderExt as _, LbcComposeDeployer as ComposeDeployer, LbcExtEnv, ScenarioBuilder, - ScenarioBuilderExt as _, configs::network::Libp2pNetworkLayout, -}; -use runner_examples::{DeployerKind, demo, read_env_any, read_topology_seed_or_default}; -use testing_framework_core::scenario::{Deployer as _, Runner}; -use testing_framework_runner_compose::ComposeRunnerError; -use tracing::{info, warn}; - -#[tokio::main] -async fn main() { - runner_examples::defaults::init_node_log_dir_defaults(DeployerKind::Compose); - - tracing_subscriber::fmt::init(); - - let nodes = read_env_any(&["LOGOS_BLOCKCHAIN_DEMO_NODES"], demo::DEFAULT_NODES); - - let run_secs = read_env_any(&["LOGOS_BLOCKCHAIN_DEMO_RUN_SECS"], demo::DEFAULT_RUN_SECS); - - info!(nodes, run_secs, "starting compose runner demo"); - - if let Err(err) = run_compose_case(nodes, Duration::from_secs(run_secs)).await { - warn!("compose runner demo failed: {err:#}"); - process::exit(1); - } -} - -async fn run_compose_case(nodes: usize, run_duration: Duration) -> Result<()> { - info!( - nodes, - duration_secs = run_duration.as_secs(), - "building scenario plan" - ); - - let seed = read_topology_seed_or_default(); - - let scenario = ScenarioBuilder::deployment_with(|t| { - t.with_network_layout(Libp2pNetworkLayout::Star) - .with_node_count(nodes) - }) - .with_node_control() - .with_run_duration(run_duration) - .with_deployment_seed(seed) - .initialize_wallet( - demo::DEFAULT_TOTAL_WALLETS as u64 * 100, - demo::DEFAULT_TOTAL_WALLETS, - ) - .transactions_with(|txs| { - txs.rate(demo::DEFAULT_MIXED_TXS_PER_BLOCK) - .users(demo::DEFAULT_TRANSACTION_WALLETS) - }) - .expect_consensus_liveness(); - - let mut plan = scenario.build()?; - - let deployer = ComposeDeployer::new(); - info!("deploying compose stack"); - - let runner: Runner = match deployer.deploy(&plan).await { - Ok(runner) => runner, - Err(ComposeRunnerError::DockerUnavailable) => { - warn!("Docker is unavailable; cannot run compose demo"); - return Ok(()); - } - Err(err) => return Err(anyhow::Error::new(err)).context("deploying compose stack failed"), - }; - - if !runner.context().telemetry().is_configured() { - warn!( - "metrics querying is disabled; set LOGOS_BLOCKCHAIN_METRICS_QUERY_URL to enable PromQL queries" - ); - } - - info!("running scenario"); - runner - .run(&mut plan) - .await - .context("running compose scenario failed")?; - Ok(()) -} diff --git a/logos/examples/src/bin/k8s_runner.rs b/logos/examples/src/bin/k8s_runner.rs deleted file mode 100644 index 8e2dba6..0000000 --- a/logos/examples/src/bin/k8s_runner.rs +++ /dev/null @@ -1,80 +0,0 @@ -use std::{process, time::Duration}; - -use anyhow::{Context as _, Result}; -use lb_ext::{ - CoreBuilderExt as _, LbcExtEnv, LbcK8sDeployer as K8sDeployer, ScenarioBuilder, - ScenarioBuilderExt as _, configs::network::Libp2pNetworkLayout, -}; -use runner_examples::{demo, read_env_any, read_topology_seed_or_default}; -use testing_framework_core::scenario::{Deployer as _, Runner}; -use testing_framework_runner_k8s::K8sRunnerError; -use tracing::{info, warn}; - -#[tokio::main] -async fn main() { - tracing_subscriber::fmt::init(); - - let nodes = read_env_any(&["LOGOS_BLOCKCHAIN_DEMO_NODES"], demo::DEFAULT_NODES); - let run_secs = read_env_any(&["LOGOS_BLOCKCHAIN_DEMO_RUN_SECS"], demo::DEFAULT_RUN_SECS); - info!(nodes, run_secs, "starting k8s runner demo"); - - if let Err(err) = run_k8s_case(nodes, Duration::from_secs(run_secs)).await { - warn!("k8s runner demo failed: {err:#}"); - process::exit(1); - } -} - -async fn run_k8s_case(nodes: usize, run_duration: Duration) -> Result<()> { - info!( - nodes, - duration_secs = run_duration.as_secs(), - "building scenario plan" - ); - - let seed = read_topology_seed_or_default(); - - let scenario = ScenarioBuilder::deployment_with(|t| { - t.with_network_layout(Libp2pNetworkLayout::Star) - .with_node_count(nodes) - }) - .with_observability() - .with_run_duration(run_duration) - .with_deployment_seed(seed) - .initialize_wallet( - demo::DEFAULT_TOTAL_WALLETS as u64 * 100, - demo::DEFAULT_TOTAL_WALLETS, - ) - .transactions_with(|txs| { - txs.rate(demo::DEFAULT_MIXED_TXS_PER_BLOCK) - .users(demo::DEFAULT_TRANSACTION_WALLETS) - }) - .expect_consensus_liveness(); - - let mut plan = scenario.build()?; - - let deployer = K8sDeployer::new(); - info!("deploying k8s stack"); - - let runner: Runner = match deployer.deploy(&plan).await { - Ok(runner) => runner, - Err(K8sRunnerError::ClientInit { source }) => { - warn!("Kubernetes cluster unavailable ({source}); skipping"); - return Ok(()); - } - Err(err) => return Err(anyhow::Error::new(err)).context("deploying k8s stack failed"), - }; - - if !runner.context().telemetry().is_configured() { - warn!( - "metrics querying is disabled; set LOGOS_BLOCKCHAIN_METRICS_QUERY_URL to enable PromQL queries" - ); - } - - info!("running scenario"); - runner - .run(&mut plan) - .await - .context("running k8s scenario failed")?; - - Ok(()) -} diff --git a/logos/examples/src/bin/local_runner.rs b/logos/examples/src/bin/local_runner.rs deleted file mode 100644 index ad03b7e..0000000 --- a/logos/examples/src/bin/local_runner.rs +++ /dev/null @@ -1,72 +0,0 @@ -use std::{process, time::Duration}; - -use anyhow::{Context as _, Result}; -use lb_framework::{ - CoreBuilderExt as _, LbcEnv, LbcLocalDeployer, ScenarioBuilder, ScenarioBuilderExt as _, - configs::network::Libp2pNetworkLayout, -}; -use runner_examples::{DeployerKind, demo, read_env_any, read_topology_seed_or_default}; -use testing_framework_core::scenario::{Deployer as _, Runner}; -use tracing::{info, warn}; - -#[tokio::main] -async fn main() { - runner_examples::defaults::init_node_log_dir_defaults(DeployerKind::Local); - - tracing_subscriber::fmt::init(); - - let nodes = read_env_any(&["LOGOS_BLOCKCHAIN_DEMO_NODES"], demo::DEFAULT_NODES); - let run_secs = read_env_any(&["LOGOS_BLOCKCHAIN_DEMO_RUN_SECS"], demo::DEFAULT_RUN_SECS); - - info!(nodes, run_secs, "starting local runner demo"); - - if let Err(err) = run_local_case(nodes, Duration::from_secs(run_secs)).await { - warn!("local runner demo failed: {err:#}"); - process::exit(1); - } -} - -async fn run_local_case(nodes: usize, run_duration: Duration) -> Result<()> { - info!( - nodes, - duration_secs = run_duration.as_secs(), - "building scenario plan" - ); - - let seed = read_topology_seed_or_default(); - - let scenario = ScenarioBuilder::deployment_with(|t| { - t.with_network_layout(Libp2pNetworkLayout::Star) - .with_node_count(nodes) - }) - .with_run_duration(run_duration) - .with_deployment_seed(seed) - .initialize_wallet( - demo::DEFAULT_TOTAL_WALLETS as u64 * 100, - demo::DEFAULT_TOTAL_WALLETS, - ) - .transactions_with(|txs| { - txs.rate(demo::DEFAULT_MIXED_TXS_PER_BLOCK) - .users(demo::DEFAULT_TRANSACTION_WALLETS) - }) - .expect_consensus_liveness(); - - let mut plan = scenario.build()?; - - let deployer = LbcLocalDeployer::default(); - info!("deploying local nodes"); - - let runner: Runner = deployer - .deploy(&plan) - .await - .context("deploying local nodes failed")?; - info!("running scenario"); - - runner - .run(&mut plan) - .await - .context("running local scenario failed")?; - info!("scenario complete"); - - Ok(()) -} diff --git a/logos/examples/src/defaults.rs b/logos/examples/src/defaults.rs deleted file mode 100644 index 6ab66f4..0000000 --- a/logos/examples/src/defaults.rs +++ /dev/null @@ -1,62 +0,0 @@ -use std::{ - env, fs, - path::{Path, PathBuf}, -}; - -use tracing_subscriber::{EnvFilter, fmt}; - -use crate::DeployerKind; - -const DEFAULT_NODE_LOG_DIR_REL: &str = ".tmp/node-logs"; -const DEFAULT_CONTAINER_NODE_LOG_DIR: &str = "/tmp/node-logs"; - -fn set_default_env(key: &str, value: &str) { - if env::var_os(key).is_none() { - // SAFETY: Used as an early-run default. Prefer setting env vars in the - // shell for multi-threaded runs. - unsafe { - env::set_var(key, value); - } - } -} - -pub fn init_logging_defaults() { - set_default_env("TF_KEEP_LOGS", "1"); - set_default_env("LOGOS_BLOCKCHAIN_LOG_LEVEL", "info"); - set_default_env("RUST_LOG", "info"); -} - -pub fn init_node_log_dir_defaults(deployer: DeployerKind) { - if env::var_os("LOGOS_BLOCKCHAIN_LOG_DIR").is_some() { - return; - } - - let host_dir = repo_root().join(DEFAULT_NODE_LOG_DIR_REL); - let _ = fs::create_dir_all(&host_dir); - - match deployer { - DeployerKind::Local => { - set_default_env("LOGOS_BLOCKCHAIN_LOG_DIR", &host_dir.display().to_string()) - } - DeployerKind::Compose => { - set_default_env("LOGOS_BLOCKCHAIN_LOG_DIR", DEFAULT_CONTAINER_NODE_LOG_DIR) - } - } -} - -pub fn init_tracing() { - let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); - let _ = fmt().with_env_filter(filter).with_target(true).try_init(); -} - -fn repo_root() -> PathBuf { - env::var("CARGO_WORKSPACE_DIR") - .map(PathBuf::from) - .ok() - .or_else(|| { - Path::new(env!("CARGO_MANIFEST_DIR")) - .parent() - .map(Path::to_path_buf) - }) - .unwrap_or_else(|| PathBuf::from(env!("CARGO_MANIFEST_DIR"))) -} diff --git a/logos/examples/src/demo.rs b/logos/examples/src/demo.rs deleted file mode 100644 index 27420f9..0000000 --- a/logos/examples/src/demo.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub const DEFAULT_NODES: usize = 2; -pub const DEFAULT_RUN_SECS: u64 = 60; - -pub const DEFAULT_TOTAL_WALLETS: usize = 200; -pub const DEFAULT_TRANSACTION_WALLETS: usize = 20; -pub const DEFAULT_MIXED_TXS_PER_BLOCK: u64 = 3; diff --git a/logos/examples/src/env.rs b/logos/examples/src/env.rs deleted file mode 100644 index 729fc58..0000000 --- a/logos/examples/src/env.rs +++ /dev/null @@ -1,41 +0,0 @@ -use std::{ - env, - str::{self, FromStr}, -}; - -use testing_framework_core::topology::DeploymentSeed; - -const DEFAULT_TOPOLOGY_SEED: [u8; 32] = { - let mut bytes = [0u8; 32]; - bytes[31] = 1; - bytes -}; - -pub fn read_env_any(keys: &[&str], default: T) -> T -where - T: FromStr + Copy, -{ - keys.iter() - .find_map(|key| env::var(key).ok().and_then(|raw| raw.parse::().ok())) - .unwrap_or(default) -} - -pub fn read_topology_seed() -> Option { - let raw = env::var("LOGOS_BLOCKCHAIN_TOPOLOGY_SEED").ok()?; - let raw = raw.strip_prefix("0x").unwrap_or(&raw); - if raw.len() != 64 { - return None; - } - - let mut bytes = [0u8; 32]; - for (idx, chunk) in raw.as_bytes().chunks(2).enumerate() { - let chunk = str::from_utf8(chunk).ok()?; - bytes[idx] = u8::from_str_radix(chunk, 16).ok()?; - } - - Some(DeploymentSeed::new(bytes)) -} - -pub fn read_topology_seed_or_default() -> DeploymentSeed { - read_topology_seed().unwrap_or_else(|| DeploymentSeed::new(DEFAULT_TOPOLOGY_SEED)) -} diff --git a/logos/examples/src/lib.rs b/logos/examples/src/lib.rs deleted file mode 100644 index 89fae9a..0000000 --- a/logos/examples/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -pub mod defaults; -pub mod demo; -pub mod env; - -pub use env::{read_env_any, read_topology_seed, read_topology_seed_or_default}; -pub use lb_framework::ScenarioBuilderExt as NodeScenarioBuilderExt; -pub use lb_workloads::{ChaosBuilderExt, ScenarioBuilderExt}; - -#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] -pub enum DeployerKind { - #[default] - Local, - Compose, -} diff --git a/logos/examples/tests/compose_attach_node_control.rs b/logos/examples/tests/compose_attach_node_control.rs deleted file mode 100644 index 5c36326..0000000 --- a/logos/examples/tests/compose_attach_node_control.rs +++ /dev/null @@ -1,55 +0,0 @@ -use std::time::Duration; - -use anyhow::{Error, Result, anyhow}; -use lb_ext::{CoreBuilderExt as _, LbcComposeDeployer, LbcExtEnv, ScenarioBuilder}; -use testing_framework_core::scenario::{Deployer as _, Runner}; -use testing_framework_runner_compose::{ComposeDeploymentMetadata, ComposeRunnerError}; - -#[tokio::test] -#[ignore = "requires Docker and mutates compose runtime state"] -async fn compose_attach_mode_queries_node_api_opt_in() -> Result<()> { - let managed = ScenarioBuilder::deployment_with(|d| d.with_node_count(1)) - .with_run_duration(Duration::from_secs(5)) - .build()?; - - let managed_deployer = LbcComposeDeployer::default(); - let (_managed_runner, metadata): (Runner, ComposeDeploymentMetadata) = - match managed_deployer.deploy_with_metadata(&managed).await { - Ok(result) => result, - Err(ComposeRunnerError::DockerUnavailable) => return Ok(()), - Err(error) => return Err(Error::new(error)), - }; - - let attached = ScenarioBuilder::deployment_with(|d| d.with_node_count(1)) - .with_run_duration(Duration::from_secs(5)) - .with_existing_cluster_from(&metadata) - .map_err(|err| anyhow!("{err}"))? - .build()?; - - let attached_deployer = LbcComposeDeployer::default(); - let attached_runner: Runner = match attached_deployer.deploy(&attached).await { - Ok(runner) => runner, - Err(ComposeRunnerError::DockerUnavailable) => return Ok(()), - Err(error) => return Err(Error::new(error)), - }; - - attached_runner - .wait_network_ready() - .await - .map_err(|err| anyhow!("compose attached runner readiness failed: {err}"))?; - - if attached_runner.context().node_clients().is_empty() { - return Err(anyhow!("compose attach resolved no node clients")); - } - - for node_client in attached_runner.context().node_clients().snapshot() { - node_client.consensus_info().await.map_err(|err| { - anyhow!( - "attached node api query failed at {}: {err}", - node_client.base_url() - ) - })?; - } - - Ok(()) -} diff --git a/logos/examples/tests/deployer_parity.rs b/logos/examples/tests/deployer_parity.rs deleted file mode 100644 index 4f03cfb..0000000 --- a/logos/examples/tests/deployer_parity.rs +++ /dev/null @@ -1,120 +0,0 @@ -use std::{env, time::Duration}; - -use anyhow::Result; -use lb_ext::{ - CoreBuilderExt as _, LbcComposeDeployer, LbcExtEnv, LbcK8sDeployer, - ScenarioBuilder as ExtScenarioBuilder, ScenarioBuilderExt as _, -}; -use lb_framework::{ - CoreBuilderExt as _, LbcEnv, LbcLocalDeployer, ScenarioBuilder as LocalScenarioBuilder, - ScenarioBuilderExt as _, configs::network::NetworkLayout, -}; -use testing_framework_core::{ - scenario::{Deployer as _, Runner}, - topology::DeploymentDescriptor, -}; - -#[derive(Clone, Copy)] -struct ScenarioSpec { - nodes: usize, - run_secs: u64, - tx_rate: u64, - tx_users: usize, - total_wallets: usize, -} - -fn shared_spec() -> ScenarioSpec { - ScenarioSpec { - nodes: 2, - run_secs: 30, - tx_rate: 5, - tx_users: 500, - total_wallets: 1000, - } -} - -fn build_local_scenario( - spec: ScenarioSpec, -) -> Result> { - LocalScenarioBuilder::deployment_with(|d| { - d.with_network_layout(NetworkLayout::Star) - .with_node_count(spec.nodes) - }) - .with_run_duration(Duration::from_secs(spec.run_secs)) - .initialize_wallet(spec.total_wallets as u64 * 100, spec.total_wallets) - .transactions_with(|txs| txs.rate(spec.tx_rate).users(spec.tx_users)) - .expect_consensus_liveness() - .build() - .map_err(Into::into) -} - -fn build_ext_scenario( - spec: ScenarioSpec, -) -> Result> { - ExtScenarioBuilder::deployment_with(|d| { - d.with_network_layout(NetworkLayout::Star) - .with_node_count(spec.nodes) - }) - .with_run_duration(Duration::from_secs(spec.run_secs)) - .initialize_wallet(spec.total_wallets as u64 * 100, spec.total_wallets) - .transactions_with(|txs| txs.rate(spec.tx_rate).users(spec.tx_users)) - .expect_consensus_liveness() - .build() - .map_err(Into::into) -} - -#[test] -fn parity_builds_have_same_shape() -> Result<()> { - let spec = shared_spec(); - let local = build_local_scenario(spec)?; - let ext = build_ext_scenario(spec)?; - - assert_eq!( - local.deployment().node_count(), - ext.deployment().node_count() - ); - assert_eq!(local.duration(), ext.duration()); - assert_eq!(local.workloads().len(), ext.workloads().len()); - assert_eq!(local.expectations().len(), ext.expectations().len()); - - Ok(()) -} - -#[tokio::test] -async fn local_parity_smoke_opt_in() -> Result<()> { - if env::var("TF_RUN_LOCAL_PARITY").is_err() { - return Ok(()); - } - - let mut scenario = build_local_scenario(shared_spec())?; - let deployer = LbcLocalDeployer::default(); - let runner: Runner = deployer.deploy(&scenario).await?; - runner.run(&mut scenario).await?; - Ok(()) -} - -#[tokio::test] -async fn compose_parity_smoke_opt_in() -> Result<()> { - if env::var("TF_RUN_COMPOSE_PARITY").is_err() { - return Ok(()); - } - - let mut scenario = build_ext_scenario(shared_spec())?; - let deployer = LbcComposeDeployer::default(); - let runner: Runner = deployer.deploy(&scenario).await?; - runner.run(&mut scenario).await?; - Ok(()) -} - -#[tokio::test] -async fn k8s_parity_smoke_opt_in() -> Result<()> { - if env::var("TF_RUN_K8S_PARITY").is_err() { - return Ok(()); - } - - let mut scenario = build_ext_scenario(shared_spec())?; - let deployer = LbcK8sDeployer::default(); - let runner: Runner = deployer.deploy(&scenario).await?; - runner.run(&mut scenario).await?; - Ok(()) -} diff --git a/logos/examples/tests/dynamic_join.rs b/logos/examples/tests/dynamic_join.rs deleted file mode 100644 index 93a3f3c..0000000 --- a/logos/examples/tests/dynamic_join.rs +++ /dev/null @@ -1,152 +0,0 @@ -use std::time::Duration; - -use anyhow::Result; -use async_trait::async_trait; -use lb_framework::{ - CoreBuilderExt as _, LbcEnv, LbcLocalDeployer, ScenarioBuilder, - configs::network::Libp2pNetworkLayout, -}; -use testing_framework_core::scenario::{ - Deployer, DynError, PeerSelection, RunContext, StartNodeOptions, Workload, -}; -use tokio::time::{sleep, timeout}; -use tracing_subscriber::fmt::try_init; - -const START_DELAY: Duration = Duration::from_secs(5); -const READY_TIMEOUT: Duration = Duration::from_secs(60); -const READY_POLL_INTERVAL: Duration = Duration::from_secs(2); - -struct JoinNodeWorkload { - name: String, -} - -impl JoinNodeWorkload { - fn new(name: impl Into) -> Self { - Self { name: name.into() } - } -} - -#[async_trait] -impl Workload for JoinNodeWorkload { - fn name(&self) -> &str { - "dynamic_join" - } - - async fn start(&self, ctx: &RunContext) -> Result<(), DynError> { - let handle = ctx - .node_control() - .ok_or_else(|| "dynamic join workload requires node control".to_owned())?; - - sleep(START_DELAY).await; - - let node = handle.start_node(&self.name).await?; - let client = node.client; - - timeout(READY_TIMEOUT, async { - loop { - match client.consensus_info().await { - Ok(info) if info.height > 0 => break, - Ok(_) | Err(_) => sleep(READY_POLL_INTERVAL).await, - } - } - }) - .await - .map_err(|_| "dynamic join node did not become ready in time")?; - - sleep(ctx.run_duration()).await; - Ok(()) - } -} - -struct JoinNodeWithPeersWorkload { - name: String, - peers: Vec, -} - -impl JoinNodeWithPeersWorkload { - fn new(name: impl Into, peers: Vec) -> Self { - Self { - name: name.into(), - peers, - } - } -} - -#[async_trait] -impl Workload for JoinNodeWithPeersWorkload { - fn name(&self) -> &str { - "dynamic_join_with_peers" - } - - async fn start(&self, ctx: &RunContext) -> Result<(), DynError> { - let handle = ctx - .node_control() - .ok_or_else(|| "dynamic join workload requires node control".to_owned())?; - - sleep(START_DELAY).await; - - let mut options = StartNodeOptions::::default(); - options.peers = PeerSelection::Named(self.peers.clone()); - let node = handle.start_node_with(&self.name, options).await?; - let client = node.client; - - timeout(READY_TIMEOUT, async { - loop { - match client.consensus_info().await { - Ok(info) if info.height > 0 => break, - Ok(_) | Err(_) => sleep(READY_POLL_INTERVAL).await, - } - } - }) - .await - .map_err(|_| "dynamic join node did not become ready in time")?; - - sleep(ctx.run_duration()).await; - Ok(()) - } -} - -#[tokio::test] -#[ignore = "run manually with `cargo test -p runner-examples -- --ignored`"] -async fn dynamic_join_reaches_consensus_liveness() -> Result<()> { - let _ = try_init(); - - let mut scenario = ScenarioBuilder::deployment_with(|t| { - t.with_network_layout(Libp2pNetworkLayout::Star) - .with_node_count(2) - }) - .with_node_control() - .with_workload(JoinNodeWorkload::new("joiner")) - .with_expectation(lb_framework::workloads::ConsensusLiveness::::default()) - .with_run_duration(Duration::from_secs(60)) - .build()?; - - let deployer = LbcLocalDeployer::default(); - let runner = deployer.deploy(&scenario).await?; - let _handle = runner.run(&mut scenario).await?; - - Ok(()) -} - -#[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::deployment_with(|t| { - t.with_network_layout(Libp2pNetworkLayout::Star) - .with_node_count(2) - }) - .with_node_control() - .with_workload(JoinNodeWithPeersWorkload::new( - "joiner", - vec!["node-0".to_string()], - )) - .with_expectation(lb_framework::workloads::ConsensusLiveness::::default()) - .with_run_duration(Duration::from_secs(60)) - .build()?; - - let deployer = LbcLocalDeployer::default(); - let runner = deployer.deploy(&scenario).await?; - let _handle = runner.run(&mut scenario).await?; - - Ok(()) -} diff --git a/logos/examples/tests/expectation_fail_fast_capture.rs b/logos/examples/tests/expectation_fail_fast_capture.rs deleted file mode 100644 index 0b0be89..0000000 --- a/logos/examples/tests/expectation_fail_fast_capture.rs +++ /dev/null @@ -1,65 +0,0 @@ -use std::time::Duration; - -use anyhow::{Result, anyhow}; -use async_trait::async_trait; -use lb_framework::{CoreBuilderExt as _, LbcEnv, LbcLocalDeployer, ScenarioBuilder}; -use testing_framework_core::scenario::{ - Deployer, DynError, Expectation, RunContext, ScenarioError, -}; -use tracing_subscriber::fmt::try_init; - -const FAIL_AFTER_CHECKS: usize = 2; - -struct FailFastDuringCaptureExpectation { - checks: usize, -} - -impl Default for FailFastDuringCaptureExpectation { - fn default() -> Self { - Self { checks: 0 } - } -} - -#[async_trait] -impl Expectation for FailFastDuringCaptureExpectation { - fn name(&self) -> &str { - "fail_fast_during_capture" - } - - async fn check_during_capture(&mut self, _ctx: &RunContext) -> Result<(), DynError> { - self.checks += 1; - if self.checks >= FAIL_AFTER_CHECKS { - return Err(format!( - "intentional fail-fast trigger after {} capture checks", - self.checks - ) - .into()); - } - - Ok(()) - } - - async fn evaluate(&mut self, _ctx: &RunContext) -> Result<(), DynError> { - Ok(()) - } -} - -#[tokio::test] -#[ignore = "requires local node binary and open ports"] -async fn expectation_can_fail_fast_during_capture() -> Result<()> { - let _ = try_init(); - - let mut scenario = ScenarioBuilder::deployment_with(|topology| topology.with_node_count(1)) - .with_run_duration(Duration::from_secs(30)) - .with_expectation(FailFastDuringCaptureExpectation::default()) - .build()?; - - let deployer = LbcLocalDeployer::default(); - let runner = deployer.deploy(&scenario).await?; - - match runner.run(&mut scenario).await { - Err(ScenarioError::ExpectationFailedDuringCapture(_)) => Ok(()), - Err(other) => Err(anyhow!("unexpected scenario error: {other}")), - Ok(_) => Err(anyhow!("expected fail-fast capture error, run succeeded")), - } -} diff --git a/logos/examples/tests/external_sources_local.rs b/logos/examples/tests/external_sources_local.rs deleted file mode 100644 index fbf36f2..0000000 --- a/logos/examples/tests/external_sources_local.rs +++ /dev/null @@ -1,283 +0,0 @@ -use std::{collections::HashSet, time::Duration}; - -use anyhow::Result; -use lb_ext::{LbcExtEnv, ScenarioBuilder}; -use lb_framework::{ - DeploymentBuilder, LbcEnv, LbcLocalDeployer, LbcManualCluster, NodeHttpClient, TopologyConfig, - configs::build_node_run_config, -}; -use testing_framework_core::scenario::{ - Deployer as _, ExternalNodeSource, PeerSelection, StartNodeOptions, -}; -use testing_framework_runner_local::ProcessDeployer; -use tokio::time::sleep; - -struct SeedCluster { - _cluster: LbcManualCluster, - node_a: NodeHttpClient, - node_b: NodeHttpClient, - bootstrap_peer_addresses: Vec, -} - -impl SeedCluster { - fn external_sources(&self) -> [ExternalNodeSource; 2] { - [ - ExternalNodeSource::new("external-a".to_owned(), self.node_a.base_url().to_string()), - ExternalNodeSource::new("external-b".to_owned(), self.node_b.base_url().to_string()), - ] - } -} - -#[tokio::test] -#[ignore = "run manually with `cargo test -p runner-examples --test external_sources_local -- --ignored`"] -async fn managed_local_plus_external_sources_are_orchestrated() -> Result<()> { - let seed_cluster = start_seed_cluster().await?; - let second_cluster_bootstrap_peers = - parse_peer_addresses(&seed_cluster.bootstrap_peer_addresses)?; - - let second_topology = DeploymentBuilder::new(TopologyConfig::with_node_numbers(2)).build()?; - let second_cluster = LbcLocalDeployer::new().manual_cluster_from_descriptors(second_topology); - let second_c = second_cluster - .start_node_with( - "c", - StartNodeOptions::::default() - .with_peers(PeerSelection::None) - .create_patch({ - let peers = second_cluster_bootstrap_peers.clone(); - move |mut run_config| { - run_config - .user - .network - .backend - .initial_peers - .extend(peers.clone()); - Ok(run_config) - } - }), - ) - .await? - .client; - - let second_d = second_cluster - .start_node_with( - "d", - StartNodeOptions::::default() - .with_peers(PeerSelection::Named(vec!["node-c".to_owned()])) - .create_patch({ - let peers = second_cluster_bootstrap_peers.clone(); - move |mut run_config| { - run_config - .user - .network - .backend - .initial_peers - .extend(peers.clone()); - Ok(run_config) - } - }), - ) - .await? - .client; - - second_cluster.wait_network_ready().await?; - - wait_until_has_peers(&second_c, Duration::from_secs(30)).await?; - wait_until_has_peers(&second_d, Duration::from_secs(30)).await?; - - second_cluster.add_external_clients([seed_cluster.node_a.clone(), seed_cluster.node_b.clone()]); - let orchestrated = second_cluster.node_clients(); - - assert_eq!( - orchestrated.len(), - 4, - "expected 2 managed + 2 external clients" - ); - - let expected_endpoints: HashSet = [ - seed_cluster.node_a.base_url().to_string(), - seed_cluster.node_b.base_url().to_string(), - second_c.base_url().to_string(), - second_d.base_url().to_string(), - ] - .into_iter() - .collect(); - - let actual_endpoints: HashSet = orchestrated - .snapshot() - .into_iter() - .map(|client| client.base_url().to_string()) - .collect(); - - assert_eq!(actual_endpoints, expected_endpoints); - - for client in orchestrated.snapshot() { - let _ = client.consensus_info().await?; - } - - Ok(()) -} - -#[tokio::test] -#[ignore = "run manually with `cargo test -p runner-examples --test external_sources_local -- --ignored`"] -async fn scenario_managed_plus_external_sources_are_orchestrated() -> Result<()> { - let seed_cluster = start_seed_cluster().await?; - - let base_builder = DeploymentBuilder::new(TopologyConfig::with_node_numbers(2)); - let base_descriptors = base_builder.clone().build()?; - let mut deployment_builder = base_builder; - let parsed_peers = parse_peer_addresses(&seed_cluster.bootstrap_peer_addresses)?; - - for node in base_descriptors.nodes() { - let mut run_config = build_node_run_config( - &base_descriptors, - node, - base_descriptors.config().node_config_override(node.index()), - ) - .map_err(|error| anyhow::anyhow!(error.to_string()))?; - run_config - .user - .network - .backend - .initial_peers - .extend(parsed_peers.clone()); - deployment_builder = deployment_builder.with_node_config_override(node.index(), run_config); - } - - let mut scenario = ScenarioBuilder::new(Box::new(deployment_builder)) - .with_run_duration(Duration::from_secs(5)) - .with_external_nodes(seed_cluster.external_sources().to_vec()) - .build()?; - - let deployer = ProcessDeployer::::default(); - let runner = deployer.deploy(&scenario).await?; - let run_handle = runner.run(&mut scenario).await?; - - let clients = run_handle.context().node_clients().snapshot(); - - assert_eq!(clients.len(), 4, "expected 2 managed + 2 external clients"); - - let first_a_endpoint = seed_cluster.node_a.base_url().to_string(); - let first_b_endpoint = seed_cluster.node_b.base_url().to_string(); - - for client in clients.iter().filter(|client| { - let endpoint = client.base_url().to_string(); - endpoint != first_a_endpoint && endpoint != first_b_endpoint - }) { - wait_until_has_peers(client, Duration::from_secs(30)).await?; - } - - let expected_endpoints: HashSet = [ - seed_cluster.node_a.base_url().to_string(), - seed_cluster.node_b.base_url().to_string(), - ] - .into_iter() - .collect(); - - let actual_endpoints: HashSet = clients - .iter() - .map(|client| client.base_url().to_string()) - .collect(); - - assert!( - expected_endpoints.is_subset(&actual_endpoints), - "scenario context should include external endpoints" - ); - - for client in clients { - let _ = client.consensus_info().await?; - } - - Ok(()) -} - -async fn start_seed_cluster() -> Result { - let topology = DeploymentBuilder::new(TopologyConfig::with_node_numbers(2)).build()?; - let cluster = LbcLocalDeployer::new().manual_cluster_from_descriptors(topology); - let node_a = cluster - .start_node_with("a", node_start_options(PeerSelection::None)) - .await? - .client; - let node_b = cluster - .start_node_with( - "b", - node_start_options(PeerSelection::Named(vec!["node-a".to_owned()])), - ) - .await? - .client; - cluster.wait_network_ready().await?; - let bootstrap_peer_addresses = collect_loopback_peer_addresses(&node_a, &node_b).await?; - - Ok(SeedCluster { - _cluster: cluster, - node_a, - node_b, - bootstrap_peer_addresses, - }) -} - -fn node_start_options(peers: PeerSelection) -> StartNodeOptions { - let mut options = StartNodeOptions::::default(); - options.peers = peers; - options -} - -async fn collect_loopback_peer_addresses( - node_a: &lb_framework::NodeHttpClient, - node_b: &lb_framework::NodeHttpClient, -) -> Result> { - let mut peers = Vec::new(); - - for info in [node_a.network_info().await?, node_b.network_info().await?] { - let addresses: Vec = info - .listen_addresses - .into_iter() - .map(|addr| addr.to_string()) - .collect(); - - let mut loopback: Vec = addresses - .iter() - .filter(|addr| addr.contains("/127.0.0.1/")) - .cloned() - .collect(); - - if loopback.is_empty() { - loopback = addresses; - } - - peers.extend(loopback); - } - - Ok(peers) -} - -fn parse_peer_addresses(addresses: &[String]) -> Result> -where - T: std::str::FromStr, - T::Err: std::error::Error + Send + Sync + 'static, -{ - addresses - .iter() - .map(|address| address.parse::().map_err(Into::into)) - .collect() -} - -async fn wait_until_has_peers(client: &NodeHttpClient, timeout: Duration) -> Result<()> { - let start = tokio::time::Instant::now(); - loop { - if let Ok(network_info) = client.network_info().await { - if network_info.n_peers > 0 { - return Ok(()); - } - } - - if start.elapsed() >= timeout { - anyhow::bail!( - "node {} did not report non-zero peer count within {:?}", - client.base_url(), - timeout - ); - } - - sleep(Duration::from_millis(500)).await; - } -} diff --git a/logos/examples/tests/k8s_attach_node_control.rs b/logos/examples/tests/k8s_attach_node_control.rs deleted file mode 100644 index 66785f8..0000000 --- a/logos/examples/tests/k8s_attach_node_control.rs +++ /dev/null @@ -1,55 +0,0 @@ -use std::time::Duration; - -use anyhow::{Error, Result, anyhow}; -use lb_ext::{CoreBuilderExt as _, LbcExtEnv, LbcK8sDeployer, ScenarioBuilder}; -use testing_framework_core::scenario::{Deployer as _, Runner}; -use testing_framework_runner_k8s::{K8sDeploymentMetadata, K8sRunnerError}; - -#[tokio::test] -#[ignore = "requires k8s cluster access and mutates k8s runtime state"] -async fn k8s_attach_mode_queries_node_api_opt_in() -> Result<()> { - let managed = ScenarioBuilder::deployment_with(|d| d.with_node_count(1)) - .with_run_duration(Duration::from_secs(5)) - .build()?; - - let managed_deployer = LbcK8sDeployer::default(); - let (_managed_runner, metadata): (Runner, K8sDeploymentMetadata) = - match managed_deployer.deploy_with_metadata(&managed).await { - Ok(result) => result, - Err(K8sRunnerError::ClientInit { .. }) => return Ok(()), - Err(error) => return Err(Error::new(error)), - }; - - let attached = ScenarioBuilder::deployment_with(|d| d.with_node_count(1)) - .with_run_duration(Duration::from_secs(5)) - .with_existing_cluster_from(&metadata) - .map_err(|err| anyhow!("{err}"))? - .build()?; - - let attached_deployer = LbcK8sDeployer::default(); - let attached_runner: Runner = match attached_deployer.deploy(&attached).await { - Ok(runner) => runner, - Err(K8sRunnerError::ClientInit { .. }) => return Ok(()), - Err(error) => return Err(Error::new(error)), - }; - - attached_runner - .wait_network_ready() - .await - .map_err(|err| anyhow!("k8s attached runner readiness failed: {err}"))?; - - if attached_runner.context().node_clients().is_empty() { - return Err(anyhow!("k8s attach resolved no node clients")); - } - - for node_client in attached_runner.context().node_clients().snapshot() { - node_client.consensus_info().await.map_err(|err| { - anyhow!( - "attached node api query failed at {}: {err}", - node_client.base_url() - ) - })?; - } - - Ok(()) -} diff --git a/logos/examples/tests/local_deployer_restart.rs b/logos/examples/tests/local_deployer_restart.rs deleted file mode 100644 index 078a1c0..0000000 --- a/logos/examples/tests/local_deployer_restart.rs +++ /dev/null @@ -1,90 +0,0 @@ -use std::time::Duration; - -use anyhow::{Result, anyhow}; -use lb_framework::{ - CoreBuilderExt as _, DeploymentBuilder, LbcLocalDeployer, ScenarioBuilder, TopologyConfig, -}; -use testing_framework_core::scenario::Deployer; -use tracing_subscriber::fmt::try_init; - -#[tokio::test] -#[ignore = "requires local node binary and open ports"] -async fn local_restart_node() -> Result<()> { - let _ = try_init(); - let mut scenario = ScenarioBuilder::deployment_with(|t| t.with_node_count(1)) - .with_node_control() - .with_run_duration(Duration::from_secs(1)) - .build()?; - - let deployer = LbcLocalDeployer::default(); - let runner = deployer.deploy(&scenario).await?; - let context = runner.context(); - - let control = context - .node_control() - .ok_or_else(|| anyhow!("node control not available"))?; - - let node_name = "node-0"; - let old_pid = control - .node_pid(node_name) - .ok_or_else(|| anyhow!("missing node pid"))?; - - control - .restart_node(node_name) - .await - .map_err(|error| anyhow!("failed to restart {node_name}: {error}"))?; - - let new_pid = control - .node_pid(node_name) - .ok_or_else(|| anyhow!("missing node pid"))?; - assert_ne!(old_pid, new_pid, "expected a new process after restart"); - - control - .stop_node(node_name) - .await - .map_err(|error| anyhow!("failed to stop {node_name}: {error}"))?; - assert!( - control.node_pid(node_name).is_none(), - "expected node pid to be absent after stop" - ); - - let _handle = runner.run(&mut scenario).await?; - - Ok(()) -} - -#[tokio::test] -#[ignore = "requires local node binary and open ports"] -async fn manual_cluster_restart_node() -> Result<()> { - let _ = try_init(); - let deployer = LbcLocalDeployer::default(); - let descriptors = DeploymentBuilder::new(TopologyConfig::with_node_numbers(1)).build()?; - let cluster = deployer.manual_cluster_from_descriptors(descriptors); - - let node_name = cluster.start_node("a").await?.name; - - let old_pid = cluster - .node_pid(&node_name) - .ok_or_else(|| anyhow!("missing node pid"))?; - - cluster - .restart_node(&node_name) - .await - .map_err(|error| anyhow!("failed to restart {node_name}: {error}"))?; - - let new_pid = cluster - .node_pid(&node_name) - .ok_or_else(|| anyhow!("missing node pid"))?; - assert_ne!(old_pid, new_pid, "expected a new process after restart"); - - cluster - .stop_node(&node_name) - .await - .map_err(|error| anyhow!("failed to stop {node_name}: {error}"))?; - assert!( - cluster.node_pid(&node_name).is_none(), - "expected node pid to be absent after stop" - ); - - Ok(()) -} diff --git a/logos/examples/tests/manual_cluster.rs b/logos/examples/tests/manual_cluster.rs deleted file mode 100644 index eeb9b27..0000000 --- a/logos/examples/tests/manual_cluster.rs +++ /dev/null @@ -1,78 +0,0 @@ -use std::time::Duration; - -use anyhow::{Result, anyhow}; -use lb_framework::{DeploymentBuilder, LbcEnv, LbcLocalDeployer, NodeHttpClient, TopologyConfig}; -use testing_framework_core::scenario::{PeerSelection, StartNodeOptions}; -use tokio::time::sleep; -use tracing_subscriber::fmt::try_init; - -const MAX_HEIGHT_DIFF: u64 = 5; -const CONVERGENCE_TIMEOUT: Duration = Duration::from_secs(60); -const CONVERGENCE_POLL: Duration = Duration::from_secs(2); - -#[tokio::test] -#[ignore = "run manually with `cargo test -p runner-examples -- --ignored manual_cluster_two_clusters_merge`"] -async fn manual_cluster_two_clusters_merge() -> Result<()> { - let _ = try_init(); - // 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); - let deployer = LbcLocalDeployer::new(); - let descriptors = DeploymentBuilder::new(config).build()?; - let cluster = deployer.manual_cluster_from_descriptors(descriptors); - // Nodes are stopped automatically when the cluster is dropped. - - println!("starting node a"); - - let node_a = cluster - .start_node_with("a", node_start_options(PeerSelection::None)) - .await? - .client; - - println!("waiting briefly before starting c"); - sleep(Duration::from_secs(30)).await; - - println!("starting node c -> a"); - let node_c = cluster - .start_node_with( - "c", - node_start_options(PeerSelection::Named(vec!["node-a".to_owned()])), - ) - .await? - .client; - - println!("waiting for network readiness: cluster a,c"); - cluster.wait_network_ready().await?; - - wait_for_convergence(&node_a, &node_c).await -} - -async fn wait_for_convergence(node_a: &NodeHttpClient, node_c: &NodeHttpClient) -> Result<()> { - let start = tokio::time::Instant::now(); - - loop { - let a_height = node_a.consensus_info().await?.height; - let c_height = node_c.consensus_info().await?.height; - let diff = a_height.abs_diff(c_height); - - if diff <= MAX_HEIGHT_DIFF { - println!("final heights: node-a={a_height}, node-c={c_height}, diff={diff}"); - return Ok(()); - } - - if start.elapsed() >= CONVERGENCE_TIMEOUT { - return Err(anyhow!( - "height diff too large after timeout: {diff} > {MAX_HEIGHT_DIFF} (node-a={a_height}, node-c={c_height})" - )); - } - - sleep(CONVERGENCE_POLL).await; - } -} - -fn node_start_options(peers: PeerSelection) -> StartNodeOptions { - let mut options = StartNodeOptions::::default(); - options.peers = peers; - options -} diff --git a/logos/examples/tests/node_config_override.rs b/logos/examples/tests/node_config_override.rs deleted file mode 100644 index 5761eae..0000000 --- a/logos/examples/tests/node_config_override.rs +++ /dev/null @@ -1,128 +0,0 @@ -use std::{ - net::{SocketAddr, TcpListener}, - time::Duration, -}; - -use anyhow::Result; -use lb_framework::{ - DeploymentBuilder, LbcEnv, LbcLocalDeployer, NodeHttpClient, ScenarioBuilder, TopologyConfig, - configs::build_node_run_config, -}; -use testing_framework_core::scenario::{Deployer, PeerSelection, StartNodeOptions}; -use tracing_subscriber::fmt::try_init; - -#[tokio::test] -#[ignore = "run manually with `cargo test -p runner-examples -- --ignored manual_cluster_api_port_override`"] -async fn manual_cluster_api_port_override() -> Result<()> { - let _ = try_init(); - // Required env vars (set on the command line when running this test): - // - `POL_PROOF_DEV_MODE=true` - // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` - // - `LOGOS_BLOCKCHAIN_CIRCUITS=...` - // - `RUST_LOG=info` (optional) - - let api_port = random_api_port(); - - let deployer = LbcLocalDeployer::new(); - let descriptors = DeploymentBuilder::new(TopologyConfig::with_node_numbers(1)).build()?; - let cluster = deployer.manual_cluster_from_descriptors(descriptors.clone()); - - let node = cluster - .start_node_with( - "override-api", - StartNodeOptions::::default() - .with_peers(PeerSelection::None) - .create_patch(move |mut run_config| { - println!("overriding API port to {api_port}"); - let current_addr = run_config.user.api.backend.listen_address; - run_config.user.api.backend.listen_address = - SocketAddr::new(current_addr.ip(), api_port); - Ok(run_config) - }), - ) - .await? - .client; - - cluster.wait_network_ready().await?; - - wait_until_consensus_ready(&node).await?; - - assert_eq!(resolved_port(&node), api_port); - - Ok(()) -} - -#[tokio::test] -#[ignore = "run manually with `cargo test -p runner-examples -- --ignored scenario_builder_api_port_override`"] -async fn scenario_builder_api_port_override() -> Result<()> { - let _ = try_init(); - // Required env vars (set on the command line when running this test): - // - `POL_PROOF_DEV_MODE=true` - // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` - // - `LOGOS_BLOCKCHAIN_CIRCUITS=...` - // - `RUST_LOG=info` (optional) - let api_port = random_api_port(); - - let base_builder = DeploymentBuilder::new(TopologyConfig::with_node_numbers(1)); - let base_descriptors = base_builder.clone().build()?; - let base_node = base_descriptors.nodes().first().expect("node 0 descriptor"); - let mut run_config = build_node_run_config( - &base_descriptors, - base_node, - base_descriptors - .config() - .node_config_override(base_node.index()), - ) - .expect("build run config"); - println!("overriding API port to {api_port}"); - let current_addr = run_config.user.api.backend.listen_address; - run_config.user.api.backend.listen_address = SocketAddr::new(current_addr.ip(), api_port); - - let mut scenario = ScenarioBuilder::new(Box::new( - base_builder.with_node_config_override(0, run_config), - )) - .with_run_duration(Duration::from_secs(1)) - .build()?; - - let deployer = LbcLocalDeployer::default(); - let runner = deployer.deploy(&scenario).await?; - let handle = runner.run(&mut scenario).await?; - - let client = handle - .context() - .random_node_client() - .ok_or_else(|| anyhow::anyhow!("scenario did not expose any node clients"))?; - - client - .consensus_info() - .await - .expect("consensus_info should succeed"); - - assert_eq!(resolved_port(&client), api_port); - - Ok(()) -} - -fn random_api_port() -> u16 { - let listener = TcpListener::bind("127.0.0.1:0").expect("bind random API port"); - listener.local_addr().expect("read API port").port() -} - -fn resolved_port(client: &NodeHttpClient) -> u16 { - client.base_url().port().unwrap_or_default() -} - -async fn wait_until_consensus_ready(client: &NodeHttpClient) -> Result<()> { - const RETRIES: usize = 120; - const DELAY_MS: u64 = 500; - - for _ in 0..RETRIES { - if client.consensus_info().await.is_ok() { - return Ok(()); - } - - tokio::time::sleep(Duration::from_millis(DELAY_MS)).await; - } - - anyhow::bail!("consensus_info did not become ready in time") -} diff --git a/logos/examples/tests/orphan_manual_cluster.rs b/logos/examples/tests/orphan_manual_cluster.rs deleted file mode 100644 index 66b244c..0000000 --- a/logos/examples/tests/orphan_manual_cluster.rs +++ /dev/null @@ -1,111 +0,0 @@ -use std::time::Duration; - -use anyhow::{Result, anyhow}; -use lb_framework::{ - DeploymentBuilder, LbcEnv, LbcLocalDeployer, NodeHttpClient, TopologyConfig, - configs::network::NetworkLayout, -}; -use lb_workloads::{start_node_with_timeout, wait_for_min_height}; -use testing_framework_core::scenario::StartNodeOptions; -use tokio::time::{sleep, timeout}; -use tracing_subscriber::fmt::try_init; - -const MIN_HEIGHT: u64 = 5; -const INITIAL_READY_TIMEOUT: Duration = Duration::from_secs(500); -const CATCH_UP_TIMEOUT: Duration = Duration::from_secs(300); -const START_NODE_TIMEOUT: Duration = Duration::from_secs(90); -const TEST_TIMEOUT: Duration = Duration::from_secs(600); -const POLL_INTERVAL: Duration = Duration::from_secs(1); - -#[tokio::test] -#[ignore = "run manually with `cargo test -p runner-examples -- --ignored orphan_manual_cluster`"] -async fn orphan_manual_cluster() -> Result<()> { - let _ = try_init(); - // Required env vars (set on the command line when running this test): - // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` - // - `NOMOS_KZGRS_PARAMS_PATH=...` (path to KZG params directory/file) - // - `RUST_LOG=info` (optional; better visibility) - - let config = TopologyConfig::with_node_numbers(3); - timeout(TEST_TIMEOUT, run_orphan_flow(config)) - .await - .map_err(|_| anyhow!("test timeout exceeded"))??; - - Ok(()) -} - -async fn run_orphan_flow(config: TopologyConfig) -> Result<()> { - let builder = DeploymentBuilder::new(config).with_network_layout(NetworkLayout::Full); - let deployer = LbcLocalDeployer::new(); - let descriptors = builder.build()?; - let cluster = deployer.manual_cluster_from_descriptors(descriptors); - - let node_a = start_node_with_timeout( - &cluster, - "a", - StartNodeOptions::::default(), - START_NODE_TIMEOUT, - ) - .await? - .client; - - let node_b = start_node_with_timeout( - &cluster, - "b", - StartNodeOptions::::default(), - START_NODE_TIMEOUT, - ) - .await? - .client; - - wait_for_min_height( - &[node_a.clone(), node_b.clone()], - MIN_HEIGHT, - INITIAL_READY_TIMEOUT, - POLL_INTERVAL, - ) - .await?; - - let behind_node = start_node_with_timeout( - &cluster, - "c", - StartNodeOptions::::default(), - START_NODE_TIMEOUT, - ) - .await? - .client; - - wait_for_catch_up(&node_a, &node_b, &behind_node).await -} - -async fn wait_for_catch_up( - node_a: &NodeHttpClient, - node_b: &NodeHttpClient, - behind_node: &NodeHttpClient, -) -> Result<()> { - timeout(CATCH_UP_TIMEOUT, async { - loop { - let node_a_height = node_height(node_a, "node-a").await?; - let node_b_height = node_height(node_b, "node-b").await?; - let behind_height = node_height(behind_node, "node-c").await?; - - let initial_min_height = node_a_height.min(node_b_height); - if behind_height >= initial_min_height.saturating_sub(1) { - return Ok::<(), anyhow::Error>(()); - } - - sleep(POLL_INTERVAL).await; - } - }) - .await - .map_err(|_| anyhow!("timeout waiting for behind node to catch up"))? -} - -async fn node_height(node: &NodeHttpClient, name: &str) -> Result { - let info = node - .consensus_info() - .await - .map_err(|error| anyhow!("{name} consensus_info failed: {error}"))?; - - Ok(info.height) -} diff --git a/logos/infra/assets/stack/Dockerfile.base b/logos/infra/assets/stack/Dockerfile.base deleted file mode 100644 index 08335af..0000000 --- a/logos/infra/assets/stack/Dockerfile.base +++ /dev/null @@ -1,106 +0,0 @@ -# syntax=docker/dockerfile:1 -# check=skip=SecretsUsedInArgOrEnv -# Ignore warnings about sensitive information as this is test data. - -ARG VERSION -ARG LOGOS_BLOCKCHAIN_NODE_REV -ARG LOGOS_BLOCKCHAIN_NODE_USE_LOCAL_CONTEXT - -# =========================== -# BUILD IMAGE -# =========================== - -FROM rust:1.91.0-slim-bookworm AS builder - -ARG VERSION -ARG LOGOS_BLOCKCHAIN_NODE_REV -ARG LOGOS_BLOCKCHAIN_FORCE_BUILD -ARG LOGOS_BLOCKCHAIN_NODE_USE_LOCAL_CONTEXT - -LABEL maintainer="augustinas@status.im" \ - source="https://github.com/logos-co/nomos-node" \ - description="Logos testnet build image" - -WORKDIR /workspace -COPY . . - -# Reduce debug artifact size. -ENV CARGO_PROFILE_DEV_DEBUG=0 -ENV LOGOS_BLOCKCHAIN_NODE_REV=${LOGOS_BLOCKCHAIN_NODE_REV} -ENV LOGOS_BLOCKCHAIN_FORCE_BUILD=${LOGOS_BLOCKCHAIN_FORCE_BUILD} -ENV LOGOS_BLOCKCHAIN_NODE_USE_LOCAL_CONTEXT=${LOGOS_BLOCKCHAIN_NODE_USE_LOCAL_CONTEXT} - -# Install dependencies needed for building RocksDB and for circuit tooling. -RUN apt-get update && apt-get install -yq \ - git gcc g++ clang make cmake m4 xz-utils libgmp-dev libssl-dev pkg-config ca-certificates curl wget file \ - && rm -rf /var/lib/apt/lists/* - -RUN chmod +x \ - /workspace/logos/infra/assets/stack/scripts/docker/prepare_binaries.sh \ - /workspace/logos/infra/assets/stack/scripts/docker/build_cfgsync.sh \ - /workspace/logos/infra/assets/stack/scripts/setup-logos-blockchain-circuits.sh \ - || true - -RUN /workspace/logos/infra/assets/stack/scripts/setup-logos-blockchain-circuits.sh "${VERSION}" /opt/circuits - -ENV LOGOS_BLOCKCHAIN_CIRCUITS=/opt/circuits - -RUN /workspace/scripts/build/build-rapidsnark.sh /opt/circuits - -RUN --mount=type=bind,from=nomos_node,source=.,target=/nomos-node-local,ro \ - if [ "${LOGOS_BLOCKCHAIN_NODE_USE_LOCAL_CONTEXT}" = "1" ]; then \ - rm -rf /nomos-node && mkdir -p /nomos-node && cp -a /nomos-node-local/. /nomos-node/ ; \ - if grep -q 'file:///Users/.*nomos-node' /workspace/Cargo.toml; then \ - sed -i "s#git = \\\"file:///Users/[^\\\"]*nomos-node\\\"#path = \\\"/nomos-node\\\"#g" /workspace/Cargo.toml; \ - fi; \ - # Local checkout may reference ../nomos-testing paths; remap them to /workspace in container. - if [ -f /nomos-node/Cargo.toml ]; then \ - sed -i 's#\.\./nomos-testing/#../workspace/#g' /nomos-node/Cargo.toml; \ - fi; \ - if [ -f /nomos-node/tests/Cargo.toml ]; then \ - sed -i 's#\.\./\.\./nomos-testing/#../../workspace/#g' /nomos-node/tests/Cargo.toml; \ - fi; \ - else \ - if grep -q 'file:///Users/.*nomos-node' /workspace/Cargo.toml; then \ - sed -i "s#git = \\\"file:///Users/[^\\\"]*nomos-node\\\"#git = \\\"https://github.com/logos-co/nomos-node.git\\\", rev = \\\"${LOGOS_BLOCKCHAIN_NODE_REV}\\\"#g" /workspace/Cargo.toml; \ - fi; \ - rm -rf /nomos-node; \ - git clone https://github.com/logos-co/nomos-node.git /nomos-node; \ - cd /nomos-node; \ - git fetch origin "${LOGOS_BLOCKCHAIN_NODE_REV}"; \ - git checkout "${LOGOS_BLOCKCHAIN_NODE_REV}"; \ - fi - -RUN /workspace/logos/infra/assets/stack/scripts/docker/prepare_binaries.sh - -# Strip host-local patches to avoid unresolved absolute paths inside containers. -RUN sed -i '/^\[patch\."https:\/\/github.com\/logos-co\/nomos-node"\]/,/^$/d' /workspace/Cargo.toml - -RUN /workspace/logos/infra/assets/stack/scripts/docker/build_cfgsync.sh - -# =========================== -# BASE RUNTIME IMAGE -# =========================== - -FROM ubuntu:24.04 AS base - -LABEL maintainer="augustinas@status.im" \ - source="https://github.com/logos-co/nomos-node" \ - description="Logos base runtime image (testing)" - -RUN apt-get update && apt-get install -yq \ - libstdc++6 \ - libgmp10 \ - libgomp1 \ - libssl3 \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* - -COPY --from=builder /workspace/artifacts/logos-blockchain-node /usr/bin/logos-blockchain-node -COPY --from=builder /workspace/artifacts/cfgsync-server /usr/bin/cfgsync-server -COPY --from=builder /workspace/artifacts/cfgsync-client /usr/bin/cfgsync-client -COPY --from=builder /opt/circuits /opt/circuits - -ENV LOGOS_BLOCKCHAIN_CIRCUITS=/opt/circuits - -EXPOSE 3000 8080 9000 60000 diff --git a/logos/infra/assets/stack/Dockerfile.runtime b/logos/infra/assets/stack/Dockerfile.runtime deleted file mode 100644 index 403b8e5..0000000 --- a/logos/infra/assets/stack/Dockerfile.runtime +++ /dev/null @@ -1,9 +0,0 @@ -# syntax=docker/dockerfile:1 - -ARG BASE_IMAGE=logos-blockchain-testing:base - -FROM ${BASE_IMAGE} - -LABEL description="Logos runtime image for compose/k8s testing" - -ENTRYPOINT ["/usr/bin/logos-blockchain-node"] diff --git a/logos/infra/assets/stack/Dockerfile.testnet b/logos/infra/assets/stack/Dockerfile.testnet deleted file mode 100644 index 007b0fd..0000000 --- a/logos/infra/assets/stack/Dockerfile.testnet +++ /dev/null @@ -1,9 +0,0 @@ -# syntax=docker/dockerfile:1 - -ARG BASE_IMAGE=logos-blockchain-testing:base - -FROM ${BASE_IMAGE} - -LABEL description="Logos testnet image (publishable)" - -ENTRYPOINT ["/usr/bin/logos-blockchain-node"] diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards.yml b/logos/infra/assets/stack/monitoring/grafana/dashboards.yml deleted file mode 100644 index 95a6604..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards.yml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: 1 -providers: - - name: 'default' - orgId: 1 - folder: '' - type: 'file' - options: - path: '/var/lib/grafana/dashboards' diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/api-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/api-dashboard.json deleted file mode 100644 index 1f3dfe8..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/api-dashboard.json +++ /dev/null @@ -1,468 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "reqps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "rate(http_requests_total[5m])", - "legendFormat": "Requests/sec - {{method}} {{endpoint}}", - "refId": "A" - } - ], - "title": "HTTP Request Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "http_requests_total", - "legendFormat": "Total Requests - {{job}}", - "refId": "A" - } - ], - "title": "Total HTTP Requests \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))", - "legendFormat": "95th percentile - {{method}} {{endpoint}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.50, rate(http_request_duration_seconds_bucket[5m]))", - "legendFormat": "50th percentile - {{method}} {{endpoint}}", - "refId": "B" - } - ], - "title": "HTTP Request Duration \u2014 p95 latency", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "percent" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(http_requests_failed_total[5m]) / rate(http_requests_total[5m]) * 100", - "legendFormat": "Error Rate % - {{method}} {{endpoint}}", - "refId": "A" - } - ], - "title": "HTTP Error Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "reqps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(http_requests_total[5m])", - "legendFormat": "Total - {{method}} {{endpoint}}", - "refId": "A" - }, - { - "expr": "rate(http_request_duration_seconds_count[5m])", - "legendFormat": "OK (200) - {{method}} {{endpoint}}", - "refId": "B" - }, - { - "expr": "rate(http_requests_failed_total[5m])", - "legendFormat": "Failed (!=200) - {{method}} {{endpoint}}", - "refId": "C" - } - ], - "title": "HTTP Outcomes \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "reqps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "topk(10, rate(http_requests_total[5m]))", - "legendFormat": "{{method}} {{endpoint}}", - "refId": "A" - } - ], - "title": "Top API Endpoints \u2014 events/sec", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "api", - "http" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "HTTP API Dashboard", - "uid": "api-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/api-detailed-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/api-detailed-dashboard.json deleted file mode 100644 index 589c033..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/api-detailed-dashboard.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "reqps" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(http_requests_total[5m])", - "legendFormat": "{{method}} {{endpoint}} - {{job}}", - "refId": "A" - } - ], - "title": "HTTP Request Rates by Endpoint \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))", - "legendFormat": "p95 {{method}} {{endpoint}} - {{job}}", - "refId": "A" - } - ], - "title": "HTTP Request Duration by Endpoint \u2014 p95 latency", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "sum by (endpoint) (http_requests_total)", - "legendFormat": "{{endpoint}}", - "refId": "A" - } - ], - "title": "Total Requests by Endpoint \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "reqps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "sum by (method) (rate(http_requests_total[5m]))", - "legendFormat": "{{method}}", - "refId": "A" - } - ], - "title": "Request Rate by HTTP Method \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "reqps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "topk(10, sum by (endpoint) (rate(http_requests_total[5m])))", - "legendFormat": "{{endpoint}}", - "refId": "A" - } - ], - "title": "Top 10 Endpoints by Request Rate \u2014 events/sec", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "api", - "http", - "endpoints" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "API Endpoints Detailed Dashboard", - "uid": "api-detailed-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/blend-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/blend-dashboard.json deleted file mode 100644 index e847545..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/blend-dashboard.json +++ /dev/null @@ -1,696 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "msgps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(blend_messages_sent_total[5m])", - "legendFormat": "Sent/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(blend_messages_received_total[5m])", - "legendFormat": "Received/sec - {{job}}", - "refId": "B" - } - ], - "title": "Message Flow Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "pktps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(blend_mix_packets_processed_total[5m])", - "legendFormat": "Mix Packets/sec - {{job}}", - "refId": "A" - } - ], - "title": "Mix Packet Processing Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 8 - }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "blend_messages_sent_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Messages Sent \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 8 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "blend_messages_received_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Messages Received \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 8 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "blend_mix_packets_processed_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Mix Packets Processed \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 8 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "blend_peers_connected", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Connected Peers \u2014 peer count", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "blend_peers_connected", - "legendFormat": "Connected Peers - {{job}}", - "refId": "A" - } - ], - "title": "Peer Connectivity Over Time \u2014 current", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "msgps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 32 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(blend_outbound_messages_failed_total[5m])", - "legendFormat": "Failed/sec - {{job}}", - "refId": "A" - } - ], - "title": "Failed Message Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 40 - }, - "id": 9, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(blend_inbound_messages_failed_total[5m])", - "legendFormat": "Failed Inbound/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(blend_outbound_messages_failed_total[5m])", - "legendFormat": "Failed Outbound/sec - {{job}}", - "refId": "B" - } - ], - "title": "Blend Error Events \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 40 - }, - "id": 10, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "pending_outbound_messages", - "legendFormat": "Pending Outbound - {{job}}", - "refId": "A" - } - ], - "title": "Pending Outbound Messages \u2014 queue depth", - "type": "stat" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "blend", - "privacy", - "mixnet" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Blend Network Dashboard", - "uid": "blend-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/consensus-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/consensus-dashboard.json deleted file mode 100644 index 5ce397f..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/consensus-dashboard.json +++ /dev/null @@ -1,1965 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_tip_height", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Tip Height \u2014 height", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_finalized_height", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Finalized Height (LIB) \u2014 height", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_current_epoch", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Current Epoch \u2014 epoch", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_current_slot", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Current Slot \u2014 slot", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "consensus_tip_height", - "legendFormat": "Tip Height - {{job}}", - "refId": "A" - }, - { - "expr": "consensus_finalized_height", - "legendFormat": "Finalized Height - {{job}}", - "refId": "B" - } - ], - "title": "Block Heights Over Time \u2014 height", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_blocks_imported_total[5m])", - "legendFormat": "Block Import Rate - {{job}}", - "refId": "A" - } - ], - "title": "Block Import Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "consensus_peers_connected", - "legendFormat": "Connected Peers - {{job}}", - "refId": "A" - }, - { - "expr": "consensus_connections", - "legendFormat": "Total Connections - {{job}}", - "refId": "B" - } - ], - "title": "Network Connectivity \u2014 conn count", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 8, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_forks_count", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Active Forks \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 24 - }, - "id": 9, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "increase(consensus_block_transactions_total[5m]) / clamp_min(increase(consensus_blocks_imported_total[5m]), 1)", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Txs per Block (avg, 5m) \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 24 - }, - "id": 10, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_block_transactions_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Txs Processed \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 24 - }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "sum(consensus_block_transactions_total)", - "legendFormat": "Network Total", - "refId": "A" - }, - { - "expr": "quantile(0.5, consensus_block_transactions_total)", - "legendFormat": "Median per Node", - "refId": "B" - } - ], - "title": "Network Tx Totals \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 24 - }, - "id": 11, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "increase(consensus_block_transactions_total[5m]) / clamp_min(increase(consensus_blocks_imported_total[5m]), 1)", - "legendFormat": "Txs per Block - {{job}}", - "refId": "A" - } - ], - "title": "Transactions per Block (avg, 5m) \u2014 current", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "tps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 32 - }, - "id": 12, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_block_transactions_total[5m])", - "legendFormat": "Transaction Throughput - {{job}}", - "refId": "A" - } - ], - "title": "Transaction Throughput (TPS) \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 40 - }, - "id": 13, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(time_broadcast_errors_total[5m])", - "legendFormat": "Time Broadcast Errors/sec - {{job}}", - "refId": "A" - } - ], - "title": "Consensus Timing Health (Broadcast) \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 40 - }, - "id": 14, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "time_current_epoch", - "legendFormat": "Current Epoch - {{job}}", - "refId": "A" - }, - { - "expr": "time_current_slot", - "legendFormat": "Current Slot - {{job}}", - "refId": "B" - } - ], - "title": "Current Epoch & Slot \u2014 slot", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 48 - }, - "id": 15, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(chainsync_requests_total{result=\"ok\"}[5m])", - "legendFormat": "ChainSync OK/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(chainsync_requests_total{result=\"err\"}[5m])", - "legendFormat": "ChainSync Err/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(network_dial_failures_total[5m])", - "legendFormat": "Dial Failures/sec - {{job}}", - "refId": "C" - } - ], - "title": "Network (ChainSync & Dials) \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 48 - }, - "id": 16, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "rate(chainsync_requests_total{result=\"err\"}[5m])", - "legendFormat": "ChainSync Errors/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(network_dial_failures_total[5m])", - "legendFormat": "Dial Failures/sec - {{job}}", - "refId": "B" - } - ], - "title": "Network Errors \u2014 events/sec", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 56 - }, - "id": 17, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(orphan_blocks_enqueued_total[5m])", - "legendFormat": "Enqueued/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(orphan_blocks_removed_total[5m])", - "legendFormat": "Removed/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(orphan_blocks_received_total[5m])", - "legendFormat": "Received/sec - {{job}}", - "refId": "C" - } - ], - "title": "Orphan Block Processing \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 56 - }, - "id": 18, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "orphan_blocks_pending", - "legendFormat": "Pending Orphans - {{job}}", - "refId": "A" - } - ], - "title": "Orphan Block Queue Status \u2014 queue depth", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 64 - }, - "id": 21, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "time() - on() (consensus_tip_height * time() / consensus_tip_height)", - "legendFormat": "Time Since Last Block", - "refId": "A" - } - ], - "title": "\u23f1\ufe0f Block Production Timing \u2014 time since last", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 72 - }, - "id": 22, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_proposals_received_total[5m])", - "legendFormat": "received - {{origin}} - {{job}}", - "refId": "A" - }, - { - "expr": "rate(consensus_proposals_created_total[5m])", - "legendFormat": "created - {{origin}} - {{job}}", - "refId": "B" - }, - { - "expr": "rate(consensus_proposals_create_failed_total[5m])", - "legendFormat": "create_failed - {{origin}} - {{reason}} - {{job}}", - "refId": "C" - } - ], - "title": "Consensus Proposals \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 72 - }, - "id": 23, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_proposals_ignored_total[5m])", - "legendFormat": "ignored - {{reason}} - {{origin}} - {{job}}", - "refId": "A" - } - ], - "title": "Proposal Ignored \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 80 - }, - "id": 24, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_apply_block_failed_total[5m])", - "legendFormat": "{{reason}} - {{job}}", - "refId": "A" - } - ], - "title": "Apply Block Failures \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 80 - }, - "id": 25, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_block_blob_validation_failed_total[5m])", - "legendFormat": "{{mode}} - {{reason}} - {{job}}", - "refId": "A" - } - ], - "title": "Blob Validation Failures \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 88 - }, - "id": 26, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_proposal_reconstruct_failed_total[5m])", - "legendFormat": "{{origin}} - {{reason}} - {{job}}", - "refId": "A" - } - ], - "title": "Proposal Reconstruct Failures \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 88 - }, - "id": 27, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(consensus_proposal_missing_txs_bucket[5m]))", - "legendFormat": "p95 missing_txs - {{job}}", - "refId": "A" - } - ], - "title": "Proposal Missing Txs (p95) \u2014 count", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 96 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "rate(chainsync_download_blocks_blocks_sum[5m]) / clamp_min(rate(chainsync_download_blocks_blocks_count[5m]), 1)", - "legendFormat": "avg blocks/request - {{job}}", - "refId": "A" - } - ], - "title": "ChainSync Download Size \u2014 avg blocks/request", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 96 - }, - "id": 29, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(chainsync_download_blocks_seconds_bucket[5m]))", - "legendFormat": "p95 - {{job}}", - "refId": "A" - } - ], - "title": "ChainSync Download Duration (p95) \u2014 seconds", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 104 - }, - "id": 30, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(orphan_blocks_queue_full_total[5m])", - "legendFormat": "orphan_queue_full - {{job}}", - "refId": "A" - }, - { - "expr": "rate(orphan_blocks_parent_fetch_failed_total[5m])", - "legendFormat": "orphan_parent_fetch_failed - {{job}}", - "refId": "B" - } - ], - "title": "Orphan Handling Issues \u2014 events/sec", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "consensus", - "cryptarchia" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Consensus Dashboard", - "uid": "consensus-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/da-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/da-dashboard.json deleted file mode 100644 index 77d8817..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/da-dashboard.json +++ /dev/null @@ -1,980 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "reqps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(da_samples_verified_total[5m])", - "legendFormat": "Verified/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(da_samples_failed_total[5m])", - "legendFormat": "Failed/sec - {{job}}", - "refId": "B" - } - ], - "title": "Sample Verification Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "reqps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(da_blob_requests_total[5m])", - "legendFormat": "Requests/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(da_blob_responses_total[5m])", - "legendFormat": "Responses/sec - {{job}}", - "refId": "B" - } - ], - "title": "Blob Request/Response Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 8 - }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "da_samples_verified_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Samples Verified \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 8 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "da_blob_requests_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Blob Requests \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 8 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "da_blob_responses_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Blob Responses \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(da_dispersal_requests_total[5m])", - "legendFormat": "Dispersal Requests/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(da_dispersal_requests_failed_total[5m])", - "legendFormat": "Dispersal Failures/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(da_verifier_share_failed_total[5m])", - "legendFormat": "Verifier Share Failures/sec - {{job}}", - "refId": "C" - } - ], - "title": "DA Dispersal & Verification \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "percent" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(da_samples_verified_total[5m]) / (rate(da_samples_verified_total[5m]) + rate(da_samples_failed_total[5m])) * 100", - "legendFormat": "Success Rate % - {{job}}", - "refId": "A" - } - ], - "title": "Sampling Success Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 24 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(da_behaviour_events_received_total[5m])", - "legendFormat": "{{event}} - {{job}}", - "refId": "A" - } - ], - "title": "DA Behaviour Events \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "bytes" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 24 - }, - "id": 9, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(da_behaviour_share_size_bytes_bucket[5m]))", - "legendFormat": "p95 bytes - {{event}} - {{job}}", - "refId": "A" - } - ], - "title": "DA Behaviour Share Size (p95) \u2014 bytes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "bytes" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 32 - }, - "id": 10, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(da_dispersal_payload_bytes_bucket[5m]))", - "legendFormat": "p95 bytes - {{job}}", - "refId": "A" - } - ], - "title": "DA Dispersal Payload Size (p95) \u2014 bytes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 32 - }, - "id": 11, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(da_dispersal_retry_success_total[5m])", - "legendFormat": "retry_success/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(da_dispersal_retry_failed_total[5m])", - "legendFormat": "retry_failed/sec - {{job}}", - "refId": "B" - } - ], - "title": "DA Dispersal Retries \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 40 - }, - "id": 12, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(da_verifier_share_handle_duration_seconds_bucket[5m]))", - "legendFormat": "share p95 - {{job}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, rate(da_verifier_tx_handle_duration_seconds_bucket[5m]))", - "legendFormat": "tx p95 - {{job}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.95, rate(da_verifier_prune_duration_seconds_bucket[5m]))", - "legendFormat": "prune p95 - {{job}}", - "refId": "C" - } - ], - "title": "DA Verifier Latency (p95) \u2014 seconds", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 40 - }, - "id": 13, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(da_verifier_share_requests_total[5m])", - "legendFormat": "share requests/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(da_verifier_share_failed_total[5m])", - "legendFormat": "share failures/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(da_verifier_tx_requests_total[5m])", - "legendFormat": "tx requests/sec - {{job}}", - "refId": "C" - }, - { - "expr": "rate(da_verifier_tx_failed_total[5m])", - "legendFormat": "tx failures/sec - {{job}}", - "refId": "D" - }, - { - "expr": "rate(da_verifier_prune_runs_total[5m])", - "legendFormat": "prune runs/sec - {{job}}", - "refId": "E" - }, - { - "expr": "rate(da_verifier_prune_failed_total[5m])", - "legendFormat": "prune failures/sec - {{job}}", - "refId": "F" - } - ], - "title": "DA Verifier Activity \u2014 events/sec", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "data-availability", - "da", - "sampling" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Data Availability Dashboard", - "uid": "da-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/issues-diagnostics-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/issues-diagnostics-dashboard.json deleted file mode 100644 index 6590256..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/issues-diagnostics-dashboard.json +++ /dev/null @@ -1,822 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "red", - "value": 10 - } - ] - }, - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "rate(da_samples_failed_total[5m]) * 60", - "legendFormat": "DA Samples Failed/min", - "refId": "A" - }, - { - "expr": "rate(storage_request_failed_total[5m]) * 60", - "legendFormat": "Storage Failures/min", - "refId": "B" - }, - { - "expr": "rate(http_requests_failed_total[5m]) * 60", - "legendFormat": "HTTP Failures/min", - "refId": "C" - }, - { - "expr": "rate(blend_outbound_messages_failed_total[5m]) * 60", - "legendFormat": "Blend Msg Failures/min", - "refId": "D" - }, - { - "expr": "rate(orphan_blocks_fetch_failed_total[5m]) * 60", - "legendFormat": "Orphan Block Fetch Failures/min", - "refId": "E" - }, - { - "expr": "rate(time_broadcast_errors_total[5m]) * 60", - "legendFormat": "Time Broadcast Errors/min", - "refId": "F" - } - ], - "title": "\ud83d\udea8 Critical Failure Rates (per minute) \u2014 events/sec", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "percent" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(da_samples_failed_total[5m]) / (rate(da_samples_verified_total[5m]) + rate(da_samples_failed_total[5m])) * 100", - "legendFormat": "DA Sample Failure Rate % - {{job}}", - "refId": "A" - }, - { - "expr": "rate(storage_request_failed_total[5m]) / (rate(storage_request_failed_total[5m]) + rate(storage_request_duration_seconds_count[5m])) * 100", - "legendFormat": "Storage Failure Rate % - {{job}}", - "refId": "B" - }, - { - "expr": "rate(http_requests_failed_total[5m]) / rate(http_requests_total[5m]) * 100", - "legendFormat": "HTTP Failure Rate % - {{job}}", - "refId": "C" - } - ], - "title": "\ud83d\udcca Failure Rates (Percentage) \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(kms_register_failures_total[5m])", - "legendFormat": "KMS Registration Failures - {{job}}", - "refId": "A" - }, - { - "expr": "rate(kms_sign_failures_total[5m])", - "legendFormat": "KMS Signing Failures - {{job}}", - "refId": "B" - }, - { - "expr": "rate(kms_execute_failures_total[5m])", - "legendFormat": "KMS Execute Failures - {{job}}", - "refId": "C" - } - ], - "title": "\ud83d\udd10 KMS Failures \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(sdp_declaration_tx_failures_total[5m])", - "legendFormat": "SDP Declaration TX Failures - {{job}}", - "refId": "A" - }, - { - "expr": "rate(sdp_declaration_mempool_failures_total[5m])", - "legendFormat": "SDP Declaration Mempool Failures - {{job}}", - "refId": "B" - }, - { - "expr": "rate(sdp_activity_tx_failures_total[5m])", - "legendFormat": "SDP Activity TX Failures - {{job}}", - "refId": "C" - }, - { - "expr": "rate(sdp_withdrawal_validation_failures_total[5m])", - "legendFormat": "SDP Withdrawal Validation Failures - {{job}}", - "refId": "D" - } - ], - "title": "\ud83d\udccb SDP (Service Provider) Failures \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(time_broadcast_errors_total[5m])", - "legendFormat": "Time Broadcast Errors - {{job}}", - "refId": "A" - } - ], - "title": "\u23f0 Time Broadcast Errors \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 24 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(network_dial_failures_total[5m])", - "legendFormat": "Dial Failures - {{job}}", - "refId": "A" - }, - { - "expr": "rate(chainsync_requests_total{result=\"err\"}[5m])", - "legendFormat": "ChainSync Errors - {{job}}", - "refId": "B" - }, - { - "expr": "rate(sdp_subscription_errors_total[5m])", - "legendFormat": "SDP Subscription Errors - {{job}}", - "refId": "C" - } - ], - "title": "\ud83c\udf10 Network/Subscription Errors \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 0.1 - }, - { - "color": "red", - "value": 1 - } - ] - }, - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 24 - }, - "id": 7, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_tip_height - consensus_finalized_height", - "legendFormat": "Unfinalized Blocks - {{job}}", - "refId": "A" - }, - { - "expr": "orphan_blocks_pending", - "legendFormat": "Pending Orphan Blocks - {{job}}", - "refId": "B" - }, - { - "expr": "mempool_transactions_pending", - "legendFormat": "Pending Mempool Txs - {{job}}", - "refId": "C" - } - ], - "title": "\u26a0\ufe0f Potential Bottlenecks \u2014 finalization gap", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "topk(10, rate(storage_request_failed_total[5m]))", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "\ud83d\uddc4\ufe0f Top Storage Failures \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 40 - }, - "id": 9, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(consensus_proposal_reconstruct_seconds_bucket[5m]))", - "legendFormat": "Reconstruct p95 - {{job}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, rate(consensus_apply_block_seconds_bucket[5m]))", - "legendFormat": "Apply block p95 - {{job}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.95, rate(consensus_block_blob_validation_seconds_bucket[5m]))", - "legendFormat": "Blob validation p95 {{mode}} - {{job}}", - "refId": "C" - }, - { - "expr": "histogram_quantile(0.95, rate(chainsync_request_tip_seconds_bucket[5m]))", - "legendFormat": "ChainSync tip p95 - {{job}}", - "refId": "D" - }, - { - "expr": "histogram_quantile(0.95, rate(chainsync_download_blocks_seconds_bucket[5m]))", - "legendFormat": "ChainSync blocks p95 - {{job}}", - "refId": "E" - }, - { - "expr": "histogram_quantile(0.95, rate(orphan_blocks_parent_fetch_seconds_bucket[5m]))", - "legendFormat": "Orphan parent fetch p95 - {{job}}", - "refId": "F" - } - ], - "title": "\u23f1\ufe0f Consensus Pipeline Latency (p95) \u2014 p95 latency", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "diagnostics", - "errors", - "issues", - "alerting" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "\ud83d\udea8 Issues & Diagnostics Dashboard", - "uid": "issues-diagnostics-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/kms-wallet-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/kms-wallet-dashboard.json deleted file mode 100644 index 833c4cf..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/kms-wallet-dashboard.json +++ /dev/null @@ -1,328 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(kms_register_requests_total[5m])", - "legendFormat": "register requests/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(kms_register_success_total[5m])", - "legendFormat": "register success/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(kms_register_failures_total[5m])", - "legendFormat": "register failures/sec - {{job}}", - "refId": "C" - } - ], - "title": "KMS Register \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(kms_public_key_requests_total[5m])", - "legendFormat": "public_key requests/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(kms_execute_requests_total[5m])", - "legendFormat": "execute requests/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(kms_execute_failures_total[5m])", - "legendFormat": "execute failures/sec - {{job}}", - "refId": "C" - } - ], - "title": "KMS Public Key & Execute \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(kms_sign_requests_total[5m])", - "legendFormat": "sign requests/sec - {{strategy}} - {{job}}", - "refId": "A" - }, - { - "expr": "rate(kms_sign_success_total[5m])", - "legendFormat": "sign success/sec - {{strategy}} - {{job}}", - "refId": "B" - }, - { - "expr": "rate(kms_sign_failures_total[5m])", - "legendFormat": "sign failures/sec - {{strategy}} - {{job}}", - "refId": "C" - } - ], - "title": "KMS Sign \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 24 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(wallet_requests_total[5m])", - "legendFormat": "wallet requests/sec - {{kind}} - {{job}}", - "refId": "A" - }, - { - "expr": "rate(wallet_response_send_failed_total[5m])", - "legendFormat": "wallet response send failed/sec - {{kind}} - {{job}}", - "refId": "B" - } - ], - "title": "Wallet Requests \u2014 events/sec", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "kms", - "wallet" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "KMS & Wallet Dashboard", - "uid": "kms-wallet-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/mempool-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/mempool-dashboard.json deleted file mode 100644 index 43afe5e..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/mempool-dashboard.json +++ /dev/null @@ -1,567 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "mempool_transactions_pending", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Pending Transactions \u2014 queue depth", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 0 - }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "mempool_transactions_added_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Added \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 0 - }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "mempool_transactions_removed_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Total Removed \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "mempool_transactions_pending", - "legendFormat": "Pending - {{job}}", - "refId": "A" - } - ], - "title": "Pending Transactions Over Time \u2014 queue depth", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "tps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(mempool_transactions_added_total[5m])", - "legendFormat": "Added/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(mempool_transactions_removed_total[5m])", - "legendFormat": "Removed/sec - {{job}}", - "refId": "B" - } - ], - "title": "Transaction Processing Rate \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "mempool_transactions_added_total", - "legendFormat": "Added - {{job}}", - "refId": "A" - }, - { - "expr": "mempool_transactions_removed_total", - "legendFormat": "Removed - {{job}}", - "refId": "B" - } - ], - "title": "Cumulative Transaction Counts \u2014 current", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "percent" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(mempool_transactions_removed_total[5m]) / rate(mempool_transactions_added_total[5m]) * 100", - "legendFormat": "Processing Efficiency % - {{job}}", - "refId": "A" - } - ], - "title": "Mempool Processing Efficiency \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 24 - }, - "id": 8, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "tx_mempool_pending_items", - "legendFormat": "TX Service Pending - {{job}}", - "refId": "A" - } - ], - "title": "TX Service Mempool Metrics \u2014 current", - "type": "stat" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "mempool", - "transactions" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Mempool Dashboard", - "uid": "mempool-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/overview-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/overview-dashboard.json deleted file mode 100644 index 0809b52..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/overview-dashboard.json +++ /dev/null @@ -1,1026 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_tip_height", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Chain Tip \u2014 height", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_current_epoch", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Current Epoch \u2014 epoch", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "consensus_peers_connected", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Consensus Peers \u2014 peer count", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "blend_peers_connected", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Blend Peers \u2014 peer count", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 4, - "x": 16, - "y": 0 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "mempool_transactions_pending", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "Pending Txs \u2014 queue depth", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "da_samples_verified_total", - "legendFormat": "{{job}}", - "refId": "A" - } - ], - "title": "DA Samples \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "consensus_tip_height", - "legendFormat": "Tip Height - {{job}}", - "refId": "A" - }, - { - "expr": "consensus_finalized_height", - "legendFormat": "Finalized Height - {{job}}", - "refId": "B" - } - ], - "title": "Consensus Heights \u2014 height", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_blocks_imported_total[5m])", - "legendFormat": "Blocks/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(da_samples_verified_total[5m])", - "legendFormat": "DA Samples/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(mempool_transactions_added_total[5m])", - "legendFormat": "Txs/sec - {{job}}", - "refId": "C" - } - ], - "title": "Processing Rates \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 15, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "sum(consensus_block_transactions_total)", - "legendFormat": "Network Total", - "refId": "A" - }, - { - "expr": "avg(consensus_block_transactions_total)", - "legendFormat": "Average per Node", - "refId": "B" - }, - { - "expr": "quantile(0.5, consensus_block_transactions_total)", - "legendFormat": "Median (outlier-resistant)", - "refId": "C" - } - ], - "title": "Network Transaction Totals \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "msgps" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 9, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(blend_messages_sent_total[5m])", - "legendFormat": "Sent/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(blend_messages_received_total[5m])", - "legendFormat": "Received/sec - {{job}}", - "refId": "B" - } - ], - "title": "Blend Message Flow \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 10, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "consensus_peers_connected", - "legendFormat": "Consensus - {{job}}", - "refId": "A" - }, - { - "expr": "blend_peers_connected", - "legendFormat": "Blend - {{job}}", - "refId": "B" - } - ], - "title": "Network Connectivity \u2014 current", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 24 - }, - "id": 11, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "time_current_epoch", - "legendFormat": "Epoch - {{job}}", - "refId": "A" - } - ], - "title": "Current Epoch \u2014 epoch", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 24 - }, - "id": 12, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "time_current_slot", - "legendFormat": "Slot - {{job}}", - "refId": "A" - } - ], - "title": "Current Slot \u2014 slot", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 24 - }, - "id": 13, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(consensus_blocks_imported_total[5m])", - "legendFormat": "Blocks Imported/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(kms_sign_requests_total[5m])", - "legendFormat": "KMS Signs/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(chainsync_requests_total[5m])", - "legendFormat": "ChainSync Requests/sec - {{job}}", - "refId": "C" - } - ], - "title": "Service Activity Rates \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [ - { - "options": { - "0": { - "color": "green", - "index": 0, - "text": "HEALTHY" - } - }, - "type": "value" - }, - { - "options": { - "from": 0.01, - "result": { - "color": "red", - "index": 1, - "text": "ISSUES" - }, - "to": null - }, - "type": "range" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 0.01 - } - ] - }, - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 40 - }, - "id": 16, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "clamp_max(rate(da_samples_failed_total[5m]) + rate(storage_request_failed_total[5m]) + rate(kms_register_failures_total[5m]) + rate(kms_sign_failures_total[5m]) + rate(time_broadcast_errors_total[5m]) + rate(network_dial_failures_total[5m]) + rate(chainsync_requests_total{result=\"err\"}[5m]) + rate(sdp_declaration_tx_failures_total[5m]), 1)", - "legendFormat": "System Health Status", - "refId": "A" - } - ], - "title": "\ud83d\udea6 Overall System Health \u2014 events/sec", - "type": "stat" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "overview", - "summary" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Logos Overview Dashboard", - "uid": "overview-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/sdp-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/sdp-dashboard.json deleted file mode 100644 index b3bea92..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/sdp-dashboard.json +++ /dev/null @@ -1,347 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(sdp_subscriptions_total[5m])", - "legendFormat": "subscriptions/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(sdp_subscription_errors_total[5m])", - "legendFormat": "subscription errors/sec - {{job}}", - "refId": "B" - } - ], - "title": "SDP Subscriptions \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(sdp_activity_posts_total[5m])", - "legendFormat": "activity posts/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(sdp_activity_success_total[5m])", - "legendFormat": "activity success/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(sdp_activity_tx_failures_total[5m])", - "legendFormat": "activity tx failures/sec - {{job}}", - "refId": "C" - }, - { - "expr": "rate(sdp_activity_mempool_failures_total[5m])", - "legendFormat": "activity mempool failures/sec - {{job}}", - "refId": "D" - } - ], - "title": "SDP Activity \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(sdp_declarations_total[5m])", - "legendFormat": "declarations/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(sdp_declaration_success_total[5m])", - "legendFormat": "declaration success/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(sdp_declaration_tx_failures_total[5m])", - "legendFormat": "declaration tx failures/sec - {{job}}", - "refId": "C" - }, - { - "expr": "rate(sdp_declaration_mempool_failures_total[5m])", - "legendFormat": "declaration mempool failures/sec - {{job}}", - "refId": "D" - } - ], - "title": "SDP Declarations \u2014 events/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 24 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(sdp_withdrawals_total[5m])", - "legendFormat": "withdrawals/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(sdp_withdrawal_success_total[5m])", - "legendFormat": "withdrawal success/sec - {{job}}", - "refId": "B" - }, - { - "expr": "rate(sdp_withdrawal_validation_failures_total[5m])", - "legendFormat": "withdrawal validation failures/sec - {{job}}", - "refId": "C" - }, - { - "expr": "rate(sdp_withdrawal_tx_failures_total[5m])", - "legendFormat": "withdrawal tx failures/sec - {{job}}", - "refId": "D" - }, - { - "expr": "rate(sdp_withdrawal_mempool_failures_total[5m])", - "legendFormat": "withdrawal mempool failures/sec - {{job}}", - "refId": "E" - } - ], - "title": "SDP Withdrawals \u2014 events/sec", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "sdp" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "SDP Dashboard", - "uid": "sdp-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/storage-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/storage-dashboard.json deleted file mode 100644 index d3e64dc..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/storage-dashboard.json +++ /dev/null @@ -1,453 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(storage_request_duration_seconds_count[5m])", - "legendFormat": "OK Requests/sec - {{job}}", - "refId": "A" - } - ], - "title": "Storage OK Request Rate \u2014 req/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(storage_request_failed_total[5m])", - "legendFormat": "Failed Requests/sec - {{job}}", - "refId": "A" - } - ], - "title": "Storage Failed Request Rate \u2014 req/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.95, rate(storage_request_duration_seconds_bucket[5m]))", - "legendFormat": "p95 latency - {{job}}", - "refId": "A" - } - ], - "title": "Storage Request Latency (p95) \u2014 seconds", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.50, rate(storage_request_duration_seconds_bucket[5m]))", - "legendFormat": "p50 latency - {{job}}", - "refId": "A" - } - ], - "title": "Storage Request Latency (p50) \u2014 seconds", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "storage_request_duration_seconds_count", - "legendFormat": "OK Total - {{job}}", - "refId": "A" - } - ], - "title": "Storage OK Requests Total \u2014 current", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "storage_request_failed_total", - "legendFormat": "Failed Total - {{job}}", - "refId": "A" - } - ], - "title": "Storage Failed Requests Total \u2014 current", - "type": "stat" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "storage", - "rocksdb" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Storage Dashboard", - "uid": "storage-dashboard", - "version": 1, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/dashboards/storage-detailed-dashboard.json b/logos/infra/assets/stack/monitoring/grafana/dashboards/storage-detailed-dashboard.json deleted file mode 100644 index bec1751..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/dashboards/storage-detailed-dashboard.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "ops" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(storage_request_duration_seconds_count[5m])", - "legendFormat": "OK Requests/sec - {{job}}", - "refId": "A" - }, - { - "expr": "rate(storage_request_failed_total[5m])", - "legendFormat": "Failed Requests/sec - {{job}}", - "refId": "B" - } - ], - "title": "Storage Request Rates \u2014 req/sec", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "s" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "histogram_quantile(0.50, rate(storage_request_duration_seconds_bucket[5m]))", - "legendFormat": "p50 latency - {{job}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, rate(storage_request_duration_seconds_bucket[5m]))", - "legendFormat": "p95 latency - {{job}}", - "refId": "B" - } - ], - "title": "Storage Request Latency \u2014 seconds", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "drawStyle": "line", - "fillOpacity": 10, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "pointSize": 5, - "showPoints": "auto", - "spanNulls": false - }, - "mappings": [], - "unit": "percent" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "expr": "rate(storage_request_failed_total[5m]) / (rate(storage_request_failed_total[5m]) + rate(storage_request_duration_seconds_count[5m])) * 100", - "legendFormat": "Failure % - {{job}}", - "refId": "A" - } - ], - "title": "Storage Failure Rate \u2014 percent", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "unit": "short" - } - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "fields": "" - }, - "textMode": "auto" - }, - "targets": [ - { - "expr": "storage_request_duration_seconds_count", - "legendFormat": "OK Total - {{job}}", - "refId": "A" - }, - { - "expr": "storage_request_failed_total", - "legendFormat": "Failed Total - {{job}}", - "refId": "B" - } - ], - "title": "Storage Totals \u2014 current", - "type": "stat" - } - ], - "refresh": "5s", - "schemaVersion": 40, - "tags": [ - "nomos", - "storage", - "rocksdb" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Storage Detailed Dashboard", - "uid": "storage-detailed-dashboard", - "version": 2, - "weekStart": "" -} diff --git a/logos/infra/assets/stack/monitoring/grafana/datasources.yaml b/logos/infra/assets/stack/monitoring/grafana/datasources.yaml deleted file mode 100644 index 2d99f84..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/datasources.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: 1 - -datasources: - - name: Prometheus - type: prometheus - access: proxy - org_id: 1 - url: http://prometheus:9090 - is_default: true - version: 1 - editable: true diff --git a/logos/infra/assets/stack/monitoring/grafana/grafana.ini b/logos/infra/assets/stack/monitoring/grafana/grafana.ini deleted file mode 100644 index 3c60e13..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/grafana.ini +++ /dev/null @@ -1,51 +0,0 @@ -instance_name = nomos dashboard - -;[dashboards.json] -;enabled = true -;path = /home/git/grafana/grafana-dashboards/dashboards - - -#################################### Auth ########################## -[auth] -disable_login_form = false - -#################################### Anonymous Auth ########################## -[auth.anonymous] -# enable anonymous access -enabled = true - -# specify organization name that should be used for unauthenticated users -;org_name = Public - -# specify role for unauthenticated users -; org_role = Admin -org_role = Viewer - -;[security] -;admin_user = ocr -;admin_password = ocr - -;[users] -# disable user signup / registration -;allow_sign_up = false - -# Set to true to automatically assign new users to the default organization (id 1) -;auto_assign_org = true - -# Default role new users will be automatically assigned (if disabled above is set to true) -;auto_assign_org_role = Viewer - -#################################### SMTP / Emailing ########################## -;[smtp] -;enabled = false -;host = localhost:25 -;user = -;password = -;cert_file = -;key_file = -;skip_verify = false -;from_address = admin@grafana.localhost - -;[emails] -;welcome_email_on_sign_up = false - diff --git a/logos/infra/assets/stack/monitoring/grafana/plugins.env b/logos/infra/assets/stack/monitoring/grafana/plugins.env deleted file mode 100644 index 2a4b487..0000000 --- a/logos/infra/assets/stack/monitoring/grafana/plugins.env +++ /dev/null @@ -1 +0,0 @@ -GF_INSTALL_PLUGINS=grafana-worldmap-panel,grafana-piechart-panel,yesoreyeram-boomtheme-panel,briangann-gauge-panel,pierosavi-imageit-panel,bessler-pictureit-panel,vonage-status-panel diff --git a/logos/infra/assets/stack/monitoring/prometheus.yml b/logos/infra/assets/stack/monitoring/prometheus.yml deleted file mode 100644 index 7f91b55..0000000 --- a/logos/infra/assets/stack/monitoring/prometheus.yml +++ /dev/null @@ -1,4 +0,0 @@ -global: - evaluation_interval: 15s - external_labels: - monitor: "Monitoring" diff --git a/logos/infra/assets/stack/monitoring/tempo.yaml b/logos/infra/assets/stack/monitoring/tempo.yaml deleted file mode 100644 index 22473b5..0000000 --- a/logos/infra/assets/stack/monitoring/tempo.yaml +++ /dev/null @@ -1,53 +0,0 @@ -stream_over_http_enabled: true -server: - http_listen_port: 3200 - log_level: info - -query_frontend: - search: - duration_slo: 5s - throughput_bytes_slo: 1.073741824e+09 - trace_by_id: - duration_slo: 5s - -distributor: - receivers: # this configuration will listen on all ports and protocols that tempo is capable of. - otlp: - protocols: - grpc: - endpoint: "0.0.0.0:4317" - -ingester: - max_block_duration: 5m # cut the headblock when this much time passes. this is being set for demo purposes and should probably be left alone normally - -compactor: - compaction: - block_retention: 24h - -metrics_generator: - registry: - external_labels: - source: tempo - cluster: docker-compose - storage: - path: /var/tempo/generator/wal - remote_write: - - url: http://prometheus:9090/api/v1/write - send_exemplars: true - traces_storage: - path: /var/tempo/generator/traces - -storage: - trace: - backend: local # backend configuration to use - wal: - path: /var/tempo/wal # where to store the wal locally - local: - path: /var/tempo/blocks - -overrides: - defaults: - metrics_generator: - processors: [service-graphs, span-metrics, local-blocks] # enables metrics generator - generate_native_histograms: both - diff --git a/logos/infra/assets/stack/scripts/docker/build_cfgsync.sh b/logos/infra/assets/stack/scripts/docker/build_cfgsync.sh deleted file mode 100755 index 7921e8a..0000000 --- a/logos/infra/assets/stack/scripts/docker/build_cfgsync.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -RUSTFLAGS='--cfg feature="pol-dev-mode"' \ - cargo build --manifest-path /workspace/cfgsync/runtime/Cargo.toml --bin cfgsync-server - -RUSTFLAGS='--cfg feature="pol-dev-mode"' \ - cargo build --manifest-path /workspace/cfgsync/runtime/Cargo.toml --bin cfgsync-client - -cp /workspace/target/debug/cfgsync-server /workspace/artifacts/cfgsync-server -cp /workspace/target/debug/cfgsync-client /workspace/artifacts/cfgsync-client - -rm -rf /workspace/target/debug/incremental diff --git a/logos/infra/assets/stack/scripts/docker/prepare_binaries.sh b/logos/infra/assets/stack/scripts/docker/prepare_binaries.sh deleted file mode 100755 index bd3e153..0000000 --- a/logos/infra/assets/stack/scripts/docker/prepare_binaries.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -LOGOS_BLOCKCHAIN_NODE_REV="${LOGOS_BLOCKCHAIN_NODE_REV:?LOGOS_BLOCKCHAIN_NODE_REV build arg missing}" - -mkdir -p /workspace/artifacts - -TARGET_ARCH="$(uname -m)" - -have_prebuilt() { - [ -f logos/infra/assets/stack/bin/logos-blockchain-node ] && \ - [ -f logos/infra/assets/stack/bin/logos-blockchain-node ] -} - -bin_matches_arch() { - local info - info="$(file -b logos/infra/assets/stack/bin/logos-blockchain-node 2>/dev/null || true)" - case "${info}" in - *ELF*) : ;; - *) return 1 ;; - esac - - local pattern - case "${TARGET_ARCH}" in - x86_64) pattern="x86-64|x86_64" ;; - aarch64|arm64) pattern="arm64|aarch64" ;; - *) pattern="${TARGET_ARCH}" ;; - esac - - echo "${info}" | grep -Eqi "${pattern}" -} - -if [ -n "${LOGOS_BLOCKCHAIN_FORCE_BUILD:-}" ]; then - echo "LOGOS_BLOCKCHAIN_FORCE_BUILD is set; rebuilding logos-blockchain binaries from source" -elif have_prebuilt && bin_matches_arch; then - echo "Using prebuilt logos-blockchain binaries from logos/infra/assets/stack/bin" - cp logos/infra/assets/stack/bin/logos-blockchain-node /workspace/artifacts/logos-blockchain-node - exit 0 -fi - -if have_prebuilt; then - echo "Prebuilt logos-blockchain binaries do not match target architecture (${TARGET_ARCH}); rebuilding from source" -else - echo "Prebuilt logos-blockchain binaries missing; building from source" -fi - -echo "Building logos-blockchain binaries from source (rev ${LOGOS_BLOCKCHAIN_NODE_REV})" -if [ "${LOGOS_BLOCKCHAIN_NODE_USE_LOCAL_CONTEXT:-0}" = "1" ] && [ -d /nomos-node ]; then - echo "Using local nomos-node checkout from Docker build context" - cd /nomos-node -else - git clone https://github.com/logos-co/nomos-node.git /tmp/nomos-node - cd /tmp/nomos-node - git fetch --depth 1 origin "${LOGOS_BLOCKCHAIN_NODE_REV}" - git checkout "${LOGOS_BLOCKCHAIN_NODE_REV}" - git reset --hard - git clean -fdx -fi - -# Enable pol-dev-mode and embed verification keys for proof validation. -RUSTFLAGS='--cfg feature="pol-dev-mode" --cfg feature="build-verification-key"' \ - CARGO_FEATURE_BUILD_VERIFICATION_KEY=1 \ - cargo build --all-features -p logos-blockchain-node - -cp target/debug/logos-blockchain-node /workspace/artifacts/logos-blockchain-node - -rm -rf target/debug/incremental diff --git a/logos/infra/assets/stack/scripts/setup-logos-blockchain-circuits.sh b/logos/infra/assets/stack/scripts/setup-logos-blockchain-circuits.sh deleted file mode 100755 index 005b2aa..0000000 --- a/logos/infra/assets/stack/scripts/setup-logos-blockchain-circuits.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/bash -# -# Setup script for logos-blockchain-circuits -# -# Usage: ./setup-logos-blockchain-circuits.sh [VERSION] [INSTALL_DIR] -# VERSION - Optional. Version to install (default: v0.3.1) -# INSTALL_DIR - Optional. Installation directory (default: $HOME/.logos-blockchain-circuits) -# -# Examples: -# ./setup-logos-blockchain-circuits.sh # Install default version to default location -# ./setup-logos-blockchain-circuits.sh v0.2.0 # Install specific version to default location -# ./setup-logos-blockchain-circuits.sh v0.2.0 /opt/circuits # Install to custom location - -set -euo pipefail - -readonly DEFAULT_CIRCUITS_VERSION="v0.4.1" -readonly DEFAULT_INSTALL_SUBDIR=".logos-blockchain-circuits" -readonly DEFAULT_CIRCUITS_REPO="logos-blockchain/logos-blockchain-circuits" - -readonly CURL_RETRY_COUNT=5 -readonly CURL_RETRY_DELAY_SECONDS=2 - -VERSION="${1:-${DEFAULT_CIRCUITS_VERSION}}" -DEFAULT_INSTALL_DIR="${HOME}/${DEFAULT_INSTALL_SUBDIR}" -INSTALL_DIR="${2:-${DEFAULT_INSTALL_DIR}}" -REPO="${DEFAULT_CIRCUITS_REPO}" - -detect_platform() { - local os="" - local arch="" - case "$(uname -s)" in - Linux*) os="linux" ;; - Darwin*) os="macos" ;; - MINGW*|MSYS*|CYGWIN*) os="windows" ;; - *) echo "Unsupported operating system: $(uname -s)" >&2; exit 1 ;; - esac - case "$(uname -m)" in - x86_64) arch="x86_64" ;; - aarch64|arm64) arch="aarch64" ;; - *) echo "Unsupported architecture: $(uname -m)" >&2; exit 1 ;; - esac - echo "${os}-${arch}" -} - -download_release() { - local platform="$1" - local artifact="" - local url="" - local temp_dir - temp_dir=$(mktemp -d) - - for attempt in 1 2; do - artifact="logos-blockchain-circuits-${VERSION}-${platform}.tar.gz" - url="https://github.com/${REPO}/releases/download/${VERSION}/${artifact}" - - echo "Downloading logos-blockchain-circuits ${VERSION} for ${platform}..." - local -a curl_args=( - curl - -fL - --retry "${CURL_RETRY_COUNT}" - --retry-delay "${CURL_RETRY_DELAY_SECONDS}" - ) - # `curl` is not guaranteed to support `--retry-all-errors`, so check before using it - # `curl --help` may be abbreviated on some platforms - if (curl --help all 2>/dev/null || curl --help 2>/dev/null) | grep -q -- '--retry-all-errors'; then - curl_args+=(--retry-all-errors) - fi - - if [ -n "${GITHUB_TOKEN:-}" ]; then - curl_args+=(-H "Authorization: Bearer ${GITHUB_TOKEN}") - fi - curl_args+=(-o "${temp_dir}/${artifact}" "${url}") - - if "${curl_args[@]}"; then - if tar -tzf "${temp_dir}/${artifact}" >/dev/null 2>&1; then - break - fi - if [ "${platform}" = "linux-aarch64" ] || [ "${platform}" = "linux-arm64" ]; then - echo "Downloaded artifact is not a valid tar.gz; falling back to linux-x86_64" >&2 - rm -f "${temp_dir}/${artifact}" - platform="linux-x86_64" - continue - fi - echo "Downloaded artifact is not a valid tar.gz for ${platform}" >&2 - rm -rf "${temp_dir}" - exit 1 - fi - - if [ "${attempt}" -eq 1 ] && { [ "${platform}" = "linux-aarch64" ] || [ "${platform}" = "linux-arm64" ]; }; then - echo "No linux-aarch64 assets found; falling back to linux-x86_64" >&2 - platform="linux-x86_64" - continue - fi - - echo "Failed to download release artifact from ${url}" >&2 - rm -rf "${temp_dir}" - exit 1 - done - - echo "Extracting to ${INSTALL_DIR}..." - rm -rf "${INSTALL_DIR}" - mkdir -p "${INSTALL_DIR}" - if ! tar -xzf "${temp_dir}/${artifact}" -C "${INSTALL_DIR}" --strip-components=1; then - echo "Failed to extract ${artifact}" >&2 - rm -rf "${temp_dir}" - exit 1 - fi - rm -rf "${temp_dir}" -} - -platform="${LOGOS_BLOCKCHAIN_CIRCUITS_PLATFORM:-$(detect_platform)}" -echo "Setting up logos-blockchain-circuits ${VERSION} for ${platform}" -echo "Installing to ${INSTALL_DIR}" - -download_release "${platform}" - -echo "Installation complete. Circuits installed at: ${INSTALL_DIR}" -echo "If using a custom directory, set LOGOS_BLOCKCHAIN_CIRCUITS=${INSTALL_DIR}" diff --git a/logos/infra/helm/logos-runner/Chart.yaml b/logos/infra/helm/logos-runner/Chart.yaml deleted file mode 100644 index a35d6ad..0000000 --- a/logos/infra/helm/logos-runner/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: logos-runner -description: Helm chart for Logos integration test runner assets -type: application -version: 0.1.0 -appVersion: "0.1.0" diff --git a/logos/infra/helm/logos-runner/templates/_helpers.tpl b/logos/infra/helm/logos-runner/templates/_helpers.tpl deleted file mode 100644 index 669aad3..0000000 --- a/logos/infra/helm/logos-runner/templates/_helpers.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{{- define "logos-runner.chart" -}} -{{- .Chart.Name -}} -{{- end -}} - -{{- define "logos-runner.name" -}} -{{- include "logos-runner.chart" . -}} -{{- end -}} - -{{- define "logos-runner.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- printf "%s" .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - -{{- define "logos-runner.labels" -}} -app.kubernetes.io/name: {{ include "logos-runner.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{- define "logos-runner.selectorLabels" -}} -app.kubernetes.io/name: {{ include "logos-runner.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{- define "logos-runner.nodeLabels" -}} -{{- $root := index . "root" -}} -{{- $index := index . "index" -}} -app.kubernetes.io/name: {{ include "logos-runner.chart" $root }} -app.kubernetes.io/instance: {{ $root.Release.Name }} -logos/logical-role: node -logos/node-index: "{{ $index }}" -{{- end -}} diff --git a/logos/infra/helm/logos-runner/templates/cfgsync-deployment.yaml b/logos/infra/helm/logos-runner/templates/cfgsync-deployment.yaml deleted file mode 100644 index f76dc99..0000000 --- a/logos/infra/helm/logos-runner/templates/cfgsync-deployment.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "logos-runner.fullname" . }}-cfgsync - labels: - {{- include "logos-runner.labels" . | nindent 4 }} -spec: - replicas: 1 - selector: - matchLabels: - {{- include "logos-runner.selectorLabels" . | nindent 6 }} - logos/component: cfgsync - template: - metadata: - labels: - {{- include "logos-runner.selectorLabels" . | nindent 8 }} - logos/component: cfgsync - spec: - containers: - - name: cfgsync - image: {{ .Values.image }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh", "/etc/logos/scripts/run_cfgsync.sh"] - ports: - - name: http - containerPort: {{ .Values.cfgsync.port }} - env: - - name: RUST_LOG - value: debug - volumeMounts: - - name: assets - mountPath: /etc/logos - readOnly: true - volumes: - - name: assets - configMap: - name: {{ include "logos-runner.fullname" . }}-assets - defaultMode: 0755 - items: - - key: cfgsync.yaml - path: cfgsync.yaml - - key: cfgsync.artifacts.yaml - path: cfgsync.artifacts.yaml - - key: run_cfgsync.sh - path: scripts/run_cfgsync.sh diff --git a/logos/infra/helm/logos-runner/templates/cfgsync-service.yaml b/logos/infra/helm/logos-runner/templates/cfgsync-service.yaml deleted file mode 100644 index 626ae24..0000000 --- a/logos/infra/helm/logos-runner/templates/cfgsync-service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "logos-runner.fullname" . }}-cfgsync - labels: - {{- include "logos-runner.labels" . | nindent 4 }} -spec: - type: ClusterIP - selector: - {{- include "logos-runner.selectorLabels" . | nindent 4 }} - logos/component: cfgsync - ports: - - name: http - port: {{ .Values.cfgsync.port }} - targetPort: http diff --git a/logos/infra/helm/logos-runner/templates/configmap.yaml b/logos/infra/helm/logos-runner/templates/configmap.yaml deleted file mode 100644 index 36cd339..0000000 --- a/logos/infra/helm/logos-runner/templates/configmap.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "logos-runner.fullname" . }}-assets - labels: - {{- include "logos-runner.labels" . | nindent 4 }} -data: - cfgsync.yaml: | -{{- if .Values.cfgsync.config }} -{{ .Values.cfgsync.config | indent 4 }} -{{- else }} -{{ "" | indent 4 }} -{{- end }} - cfgsync.artifacts.yaml: | -{{- if .Values.cfgsync.artifacts }} -{{ .Values.cfgsync.artifacts | indent 4 }} -{{- else }} -{{ "" | indent 4 }} -{{- end }} - run_cfgsync.sh: | -{{- if .Values.scripts.runCfgsyncSh }} -{{ .Values.scripts.runCfgsyncSh | indent 4 }} -{{- else }} -{{ "" | indent 4 }} -{{- end }} - run_logos.sh: | -{{- if .Values.scripts.runLogosSh }} -{{ .Values.scripts.runLogosSh | indent 4 }} -{{- else }} -{{ "" | indent 4 }} -{{- end }} - run_logos_node.sh: | -{{- if .Values.scripts.runLogosNodeSh }} -{{ .Values.scripts.runLogosNodeSh | indent 4 }} -{{- else }} -{{ "" | indent 4 }} -{{- end }} diff --git a/logos/infra/helm/logos-runner/templates/pv.yaml b/logos/infra/helm/logos-runner/templates/pv.yaml deleted file mode 100644 index 4894614..0000000 --- a/logos/infra/helm/logos-runner/templates/pv.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if eq .Values.kzg.mode "hostPath" }} -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ include "logos-runner.fullname" . }}-kzg - labels: - {{- include "logos-runner.labels" . | nindent 4 }} -spec: - capacity: - storage: {{ .Values.kzg.storageSize }} - accessModes: - - ReadOnlyMany - persistentVolumeReclaimPolicy: Delete - storageClassName: manual - hostPath: - path: {{ .Values.kzg.hostPath }} - type: {{ .Values.kzg.hostPathType }} -{{- end }} diff --git a/logos/infra/helm/logos-runner/templates/pvc.yaml b/logos/infra/helm/logos-runner/templates/pvc.yaml deleted file mode 100644 index 08e5b9c..0000000 --- a/logos/infra/helm/logos-runner/templates/pvc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if eq .Values.kzg.mode "hostPath" }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "logos-runner.fullname" . }}-kzg - labels: - {{- include "logos-runner.labels" . | nindent 4 }} -spec: - accessModes: - - ReadOnlyMany - storageClassName: manual - volumeName: {{ include "logos-runner.fullname" . }}-kzg - resources: - requests: - storage: {{ .Values.kzg.storageSize }} -{{- end }} diff --git a/logos/infra/helm/logos-runner/templates/validator-deployments.yaml b/logos/infra/helm/logos-runner/templates/validator-deployments.yaml deleted file mode 100644 index 8b9b196..0000000 --- a/logos/infra/helm/logos-runner/templates/validator-deployments.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- $root := . -}} -{{- $nodes := default (list) .Values.nodes.nodes }} -{{- range $i, $node := $nodes }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "logos-runner.fullname" $root }}-node-{{ $i }} - labels: - {{- include "logos-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 4 }} -spec: - replicas: 1 - selector: - matchLabels: - {{- include "logos-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 6 }} - template: - metadata: - labels: - {{- include "logos-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 8 }} - spec: - containers: - - name: node - image: {{ $root.Values.image }} - imagePullPolicy: {{ $root.Values.imagePullPolicy }} - command: ["/bin/sh", "/etc/logos/scripts/run_logos_node.sh"] - ports: - - name: http - containerPort: {{ default 18080 $node.apiPort }} - - name: testing-http - containerPort: {{ default 18081 $node.testingHttpPort }} - - name: swarm-udp - containerPort: {{ default 60000 $node.networkPort }} - protocol: UDP - env: - - name: CFG_SERVER_ADDR - value: http://{{ include "logos-runner.fullname" $root }}-cfgsync:{{ $root.Values.cfgsync.port }} - - name: LOGOS_BLOCKCHAIN_TIME_BACKEND - value: {{ $root.Values.timeBackend | default "monotonic" | quote }} - {{- range $key, $value := $node.env }} - - name: {{ $key }} - value: "{{ $value }}" - {{- end }} - volumeMounts: - - name: assets - mountPath: /etc/logos - readOnly: true - volumes: - - name: assets - configMap: - name: {{ include "logos-runner.fullname" $root }}-assets - defaultMode: 0755 - items: - - key: cfgsync.yaml - path: cfgsync.yaml - - key: run_cfgsync.sh - path: scripts/run_cfgsync.sh - - key: run_logos.sh - path: scripts/run_logos.sh - - key: run_logos_node.sh - path: scripts/run_logos_node.sh -{{- end }} diff --git a/logos/infra/helm/logos-runner/templates/validator-services.yaml b/logos/infra/helm/logos-runner/templates/validator-services.yaml deleted file mode 100644 index a98490f..0000000 --- a/logos/infra/helm/logos-runner/templates/validator-services.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- $root := . -}} -{{- $nodes := default (list) .Values.nodes.nodes }} -{{- range $i, $node := $nodes }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "logos-runner.fullname" $root }}-node-{{ $i }} - labels: - {{- include "logos-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 4 }} -spec: - type: NodePort - selector: - {{- include "logos-runner.nodeLabels" (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 - - name: swarm-udp - port: {{ default 60000 $node.networkPort }} - targetPort: swarm-udp - protocol: UDP -{{- end }} diff --git a/logos/infra/helm/logos-runner/values.yaml b/logos/infra/helm/logos-runner/values.yaml deleted file mode 100644 index 5e3deb3..0000000 --- a/logos/infra/helm/logos-runner/values.yaml +++ /dev/null @@ -1,20 +0,0 @@ -image: "public.ecr.aws/r4s5t9y4/logos/logos-blockchain:test" -imagePullPolicy: IfNotPresent - -# Keep node time in-process by default; NTP backends are flaky in short-lived -# test clusters and can stall consensus if they fail to sync. -timeBackend: "monotonic" - -cfgsync: - port: 4400 - config: "" - bundle: "" - -scripts: - runCfgsyncSh: "" - runLogosSh: "" - runLogosNodeSh: "" - -nodes: - count: 1 - nodes: [] diff --git a/logos/runtime/env/Cargo.toml b/logos/runtime/env/Cargo.toml deleted file mode 100644 index 5920d45..0000000 --- a/logos/runtime/env/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -categories.workspace = true -description.workspace = true -edition.workspace = true -keywords.workspace = true -license.workspace = true -name = "testing-framework-env" -readme.workspace = true -repository.workspace = true -version.workspace = true - -[lints] -workspace = true - -[dependencies] diff --git a/logos/runtime/env/src/lib.rs b/logos/runtime/env/src/lib.rs deleted file mode 100644 index 1c5ccdb..0000000 --- a/logos/runtime/env/src/lib.rs +++ /dev/null @@ -1,73 +0,0 @@ -use std::{env, path::PathBuf}; - -#[must_use] -pub fn slow_test_env() -> bool { - env::var("SLOW_TEST_ENV").is_ok_and(|s| s == "true") -} - -#[must_use] -pub fn debug_tracing() -> bool { - env::var("LOGOS_BLOCKCHAIN_TESTS_TRACING").is_ok_and(|val| val.eq_ignore_ascii_case("true")) -} - -#[must_use] -pub fn nomos_log_dir() -> Option { - env::var("LOGOS_BLOCKCHAIN_LOG_DIR").ok().map(PathBuf::from) -} - -#[must_use] -pub fn nomos_log_level() -> Option { - env::var("LOGOS_BLOCKCHAIN_LOG_LEVEL").ok() -} - -#[must_use] -pub fn nomos_log_filter() -> Option { - env::var("LOGOS_BLOCKCHAIN_LOG_FILTER").ok() -} - -#[must_use] -pub fn nomos_use_autonat() -> bool { - env::var("LOGOS_BLOCKCHAIN_USE_AUTONAT").is_ok() -} - -#[must_use] -pub fn nomos_cfgsync_port() -> Option { - env::var("LOGOS_BLOCKCHAIN_CFGSYNC_PORT") - .ok() - .and_then(|v| v.parse::().ok()) -} - -#[must_use] -pub fn nomos_tests_keep_logs() -> bool { - env::var("LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS").is_ok() -} - -#[must_use] -pub fn nomos_testnet_image() -> Option { - env::var("LOGOS_BLOCKCHAIN_TESTNET_IMAGE").ok() -} - -#[must_use] -pub fn nomos_testnet_image_pull_policy() -> Option { - env::var("LOGOS_BLOCKCHAIN_TESTNET_IMAGE_PULL_POLICY").ok() -} - -#[must_use] -pub fn rust_log() -> Option { - env::var("RUST_LOG").ok() -} - -#[must_use] -pub fn lb_time_service_backend() -> Option { - env::var("LOGOS_BLOCKCHAIN_TIME_BACKEND").ok() -} - -#[must_use] -pub fn nomos_otlp_endpoint() -> Option { - env::var("LOGOS_BLOCKCHAIN_OTLP_ENDPOINT").ok() -} - -#[must_use] -pub fn nomos_otlp_metrics_endpoint() -> Option { - env::var("LOGOS_BLOCKCHAIN_OTLP_METRICS_ENDPOINT").ok() -} diff --git a/logos/runtime/ext/Cargo.toml b/logos/runtime/ext/Cargo.toml deleted file mode 100644 index b317f39..0000000 --- a/logos/runtime/ext/Cargo.toml +++ /dev/null @@ -1,34 +0,0 @@ -[package] -description = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -name = "lb-ext" -version = { workspace = true } - -[dependencies] -# Workspace crates -cfgsync-adapter = { workspace = true } -cfgsync-artifacts = { workspace = true } -cfgsync-core = { workspace = true } -lb-framework = { workspace = true } -testing-framework-core = { workspace = true } -testing-framework-env = { workspace = true } -testing-framework-runner-compose = { workspace = true } -testing-framework-runner-k8s = { workspace = true } -testing-framework-runner-local = { workspace = true } - -# Logos / Nomos deps -lb_http_api_common = { workspace = true } - -# External -anyhow = "1" -async-trait = { workspace = true } -kube = { default-features = false, features = ["client", "rustls-tls"], version = "0.87" } -reqwest = { features = ["json"], workspace = true } -serde = { workspace = true } -serde_yaml = { workspace = true } -tempfile = { workspace = true } -thiserror = { workspace = true } -tokio = { features = ["macros", "process", "rt-multi-thread", "time"], workspace = true } -tracing = { workspace = true } -uuid = { features = ["v4"], workspace = true } diff --git a/logos/runtime/ext/src/cfgsync/mod.rs b/logos/runtime/ext/src/cfgsync/mod.rs deleted file mode 100644 index 268d393..0000000 --- a/logos/runtime/ext/src/cfgsync/mod.rs +++ /dev/null @@ -1,157 +0,0 @@ -use anyhow::Result; -use cfgsync_artifacts::ArtifactFile; -pub(crate) use cfgsync_core::render::CfgsyncOutputPaths; -use cfgsync_core::render::{ - CfgsyncConfigOverrides, RenderedCfgsync, ensure_artifacts_path, - render_cfgsync_yaml_from_template, write_rendered_cfgsync, -}; -use reqwest::Url; -use serde_yaml::{Mapping, Value}; -use testing_framework_core::cfgsync::{StaticArtifactRenderer, build_static_artifacts}; -use thiserror::Error; - -pub(crate) struct CfgsyncRenderOptions { - pub port: Option, - pub artifacts_path: Option, - pub min_timeout_secs: Option, - pub metrics_otlp_ingest_url: Option, -} - -#[derive(Debug, Error)] -enum BundleRenderError { - #[error("cfgsync bundle node `{identifier}` is missing `/config.yaml`")] - MissingConfigFile { identifier: String }, - #[error("cfgsync config file is missing `{key}`")] - MissingYamlKey { key: String }, -} - -pub(crate) fn render_cfgsync_from_template( - topology: &E::Deployment, - hostnames: &[String], - options: CfgsyncRenderOptions, -) -> Result { - let cfg = build_cfgsync_server_config(); - let overrides = build_overrides::(topology, options); - let config_yaml = render_cfgsync_yaml_from_template(cfg, &overrides)?; - let mut materialized = build_static_artifacts::(topology, hostnames)?; - append_deployment_files(&mut materialized)?; - let artifacts_yaml = serde_yaml::to_string(&materialized)?; - - Ok(RenderedCfgsync { - config_yaml, - artifacts_yaml, - }) -} - -fn append_deployment_files( - materialized: &mut cfgsync_adapter::MaterializedArtifacts, -) -> Result<()> { - if has_shared_file_path(materialized, "/deployment.yaml") { - return Ok(()); - } - - let Some((identifier, artifacts)) = materialized.iter().next() else { - return Ok(()); - }; - - let config_content = - config_file_content(artifacts).ok_or_else(|| BundleRenderError::MissingConfigFile { - identifier: identifier.to_owned(), - })?; - let deployment_yaml = extract_yaml_key(&config_content, "deployment")?; - - let mut shared = materialized.shared().clone(); - shared - .files - .push(build_artifact_file("/deployment.yaml", deployment_yaml)); - *materialized = materialized.clone().with_shared(shared); - - Ok(()) -} - -fn has_shared_file_path(materialized: &cfgsync_adapter::MaterializedArtifacts, path: &str) -> bool { - materialized - .shared() - .files - .iter() - .any(|file| file.path == path) -} - -fn config_file_content(artifacts: &cfgsync_artifacts::ArtifactSet) -> Option { - artifacts - .files - .iter() - .find_map(|file| (file.path == "/config.yaml").then_some(file.content.clone())) -} - -fn build_artifact_file(path: &str, content: String) -> ArtifactFile { - ArtifactFile::new(path.to_string(), content.to_string()) -} - -fn extract_yaml_key(content: &str, key: &str) -> Result { - let document: Value = serde_yaml::from_str(content)?; - let value = document - .get(key) - .cloned() - .ok_or_else(|| BundleRenderError::MissingYamlKey { - key: key.to_owned(), - })?; - - Ok(serde_yaml::to_string(&value)?) -} - -fn build_cfgsync_server_config() -> Value { - let mut root = Mapping::new(); - root.insert( - Value::String("port".to_string()), - Value::Number(4400_u64.into()), - ); - - let mut source = Mapping::new(); - source.insert( - Value::String("kind".to_string()), - Value::String("registration".to_string()), - ); - source.insert( - Value::String("artifacts_path".to_string()), - Value::String("cfgsync.artifacts.yaml".to_string()), - ); - - root.insert(Value::String("source".to_string()), Value::Mapping(source)); - - Value::Mapping(root) -} - -pub(crate) fn render_and_write_cfgsync_from_template( - topology: &E::Deployment, - hostnames: &[String], - mut options: CfgsyncRenderOptions, - output: CfgsyncOutputPaths<'_>, -) -> Result { - ensure_artifacts_path(&mut options.artifacts_path, output.artifacts_path); - - let rendered = render_cfgsync_from_template::(topology, hostnames, options)?; - write_rendered_cfgsync(&rendered, output)?; - - Ok(rendered) -} - -fn build_overrides( - topology: &E::Deployment, - options: CfgsyncRenderOptions, -) -> CfgsyncConfigOverrides { - let CfgsyncRenderOptions { - port, - artifacts_path, - min_timeout_secs, - metrics_otlp_ingest_url, - } = options; - - CfgsyncConfigOverrides { - port, - n_hosts: Some(E::nodes(topology).len()), - timeout_floor_secs: min_timeout_secs, - artifacts_path, - metrics_otlp_ingest_url: metrics_otlp_ingest_url.map(|url| url.to_string()), - } -} diff --git a/logos/runtime/ext/src/compose_env.rs b/logos/runtime/ext/src/compose_env.rs deleted file mode 100644 index f539ce3..0000000 --- a/logos/runtime/ext/src/compose_env.rs +++ /dev/null @@ -1,393 +0,0 @@ -use std::{ - env, - path::{Path, PathBuf}, - process::Command as StdCommand, - time::Duration, -}; - -use anyhow::anyhow; -use async_trait::async_trait; -use lb_framework::{ - NodeHttpClient, - internal::{DeploymentPlan, NodePlan}, -}; -use lb_http_api_common::paths; -use reqwest::Url; -use testing_framework_core::{adjust_timeout, scenario::DynError}; -use testing_framework_env as tf_env; -use testing_framework_runner_compose::{ - ComposeDeployEnv, ComposeDescriptor, ConfigServerHandle, EnvEntry, NodeDescriptor, - docker::commands::run_docker_command, - infrastructure::{ports::NodeHostPorts, template::repository_root}, -}; -use tokio::process::Command; -use tracing::{debug, info, warn}; -use uuid::Uuid; - -use crate::{ - LbcExtEnv, - cfgsync::{CfgsyncOutputPaths, CfgsyncRenderOptions, render_and_write_cfgsync_from_template}, - constants::DEFAULT_CFGSYNC_PORT, -}; - -const NODE_ENTRYPOINT: &str = "/etc/logos/scripts/run_logos_node.sh"; -const CFGSYNC_START_TIMEOUT: Duration = Duration::from_secs(180); -const DEFAULT_COMPOSE_RUNNER_HOST: &str = "127.0.0.1"; -const DEFAULT_COMPOSE_TEST_IMAGE: &str = "logos-blockchain-testing:local"; -const GHCR_TESTNET_IMAGE: &str = "ghcr.io/logos-co/nomos:testnet"; -const DEFAULT_CFGSYNC_HOST: &str = "cfgsync"; - -#[derive(Debug)] -pub struct LbcCfgsyncHandle { - name: String, - stopped: bool, -} - -impl LbcCfgsyncHandle { - fn new(name: String) -> Self { - Self { - name, - stopped: false, - } - } -} - -impl ConfigServerHandle for LbcCfgsyncHandle { - fn shutdown(&mut self) { - if self.stopped { - return; - } - let name = self.name.clone(); - let status = StdCommand::new("docker") - .arg("rm") - .arg("-f") - .arg(&name) - .status(); - match status { - Ok(status) if status.success() => { - debug!(container = name, "removed cfgsync container"); - } - Ok(status) => { - warn!(container = name, status = ?status, "failed to remove cfgsync container"); - } - Err(err) => { - warn!(container = name, error = ?err, "failed to spawn docker rm for cfgsync container"); - } - } - self.stopped = true; - } - - fn mark_preserved(&mut self) { - self.stopped = true; - } - - fn container_name(&self) -> Option<&str> { - Some(self.name.as_str()) - } -} - -#[async_trait] -impl ComposeDeployEnv for LbcExtEnv { - type ConfigHandle = LbcCfgsyncHandle; - - fn compose_descriptor(topology: &Self::Deployment, cfgsync_port: u16) -> ComposeDescriptor { - let cfgsync_port = normalized_cfgsync_port(cfgsync_port); - let (image, platform) = resolve_image(); - let nodes = topology - .nodes() - .iter() - .enumerate() - .map(|(index, node)| { - build_compose_node_descriptor(index, node, cfgsync_port, &image, platform.clone()) - }) - .collect(); - - ComposeDescriptor::new(nodes) - } - - fn update_cfgsync_config( - path: &Path, - topology: &Self::Deployment, - port: u16, - metrics_otlp_ingest_url: Option<&Url>, - ) -> Result<(), DynError> { - debug!( - path = %path.display(), - port, - nodes = topology.nodes().len(), - "updating cfgsync template" - ); - let artifacts_path = cfgsync_artifacts_path(path); - let hostnames = topology_hostnames(topology); - let options = cfgsync_render_options(port, metrics_otlp_ingest_url); - - render_and_write_cfgsync_from_template::( - topology, - &hostnames, - options, - CfgsyncOutputPaths { - config_path: path, - artifacts_path: &artifacts_path, - }, - )?; - Ok(()) - } - - async fn start_cfgsync( - cfgsync_path: &Path, - port: u16, - network: &str, - ) -> Result { - let testnet_dir = cfgsync_dir(cfgsync_path)?; - let (image, _) = resolve_image(); - let container_name = cfgsync_container_name(); - - debug!( - container = %container_name, - image, - cfgsync = %cfgsync_path.display(), - port, - "starting cfgsync container" - ); - - let command = - build_cfgsync_docker_run_command(&container_name, network, port, testnet_dir, &image); - - run_docker_command( - command, - adjust_timeout(CFGSYNC_START_TIMEOUT), - "docker run cfgsync server", - ) - .await - .map_err(|err| anyhow!(err.to_string()))?; - - info!(container = %container_name, port, "cfgsync container started"); - - Ok(LbcCfgsyncHandle::new(container_name)) - } - - fn node_client_from_ports( - ports: &NodeHostPorts, - host: &str, - ) -> Result { - api_client_from_host_ports(ports, host) - } - - fn readiness_path() -> &'static str { - paths::CRYPTARCHIA_INFO - } - - fn compose_runner_host() -> String { - compose_runner_host() - } -} - -fn node_instance_name(index: usize) -> String { - format!("node-{index}") -} - -fn cfgsync_artifacts_path(config_path: &Path) -> PathBuf { - config_path - .parent() - .unwrap_or(config_path) - .join("cfgsync.artifacts.yaml") -} - -fn topology_hostnames(topology: &DeploymentPlan) -> Vec { - topology - .nodes() - .iter() - .map(|node| format!("node-{}", node.index())) - .collect() -} - -fn cfgsync_render_options( - port: u16, - metrics_otlp_ingest_url: Option<&Url>, -) -> CfgsyncRenderOptions { - CfgsyncRenderOptions { - port: Some(port), - artifacts_path: None, - min_timeout_secs: None, - metrics_otlp_ingest_url: metrics_otlp_ingest_url.cloned(), - } -} - -fn cfgsync_dir(cfgsync_path: &Path) -> Result<&Path, DynError> { - cfgsync_path - .parent() - .ok_or_else(|| anyhow!("cfgsync path {cfgsync_path:?} has no parent directory").into()) -} - -fn normalized_cfgsync_port(port: u16) -> u16 { - if port == 0 { - DEFAULT_CFGSYNC_PORT - } else { - port - } -} - -fn build_compose_node_descriptor( - index: usize, - node: &NodePlan, - cfgsync_port: u16, - image: &str, - platform: Option, -) -> NodeDescriptor { - let mut environment = base_environment(cfgsync_port); - environment.push(EnvEntry::new( - "CFG_HOST_IDENTIFIER", - node_instance_name(index), - )); - - let api_port = node.general.api_config.address.port(); - let testing_port = node.general.api_config.testing_http_address.port(); - let ports = vec![ - format!("127.0.0.1::{api_port}"), - format!("127.0.0.1::{testing_port}"), - ]; - - NodeDescriptor::new( - node_instance_name(index), - image.to_owned(), - NODE_ENTRYPOINT, - base_volumes(), - default_extra_hosts(), - ports, - environment, - platform, - ) -} - -fn cfgsync_container_name() -> String { - format!("nomos-cfgsync-{}", Uuid::new_v4()) -} - -fn cfgsync_stack_volume_arg(testnet_dir: &Path) -> String { - let stack_dir = testnet_dir - .canonicalize() - .unwrap_or_else(|_| testnet_dir.to_path_buf()); - format!("{}:/etc/logos:ro", stack_dir.display()) -} - -fn maybe_add_circuits_mount(command: &mut Command) { - let circuits_dir = env::var("LOGOS_BLOCKCHAIN_CIRCUITS_DOCKER") - .ok() - .or_else(|| env::var("LOGOS_BLOCKCHAIN_CIRCUITS").ok()); - - let Some(circuits_dir) = circuits_dir else { - return; - }; - - let host_path = PathBuf::from(&circuits_dir); - if !host_path.exists() { - return; - } - - let resolved_host_path = host_path.canonicalize().unwrap_or(host_path); - command - .arg("-e") - .arg(format!("LOGOS_BLOCKCHAIN_CIRCUITS={circuits_dir}")) - .arg("-v") - .arg(format!( - "{}:{circuits_dir}:ro", - resolved_host_path.display() - )); -} - -fn build_cfgsync_docker_run_command( - container_name: &str, - network: &str, - port: u16, - testnet_dir: &Path, - image: &str, -) -> Command { - let mut command = Command::new("docker"); - command - .arg("run") - .arg("-d") - .arg("--name") - .arg(container_name) - .arg("--network") - .arg(network) - .arg("--network-alias") - .arg("cfgsync") - .arg("--workdir") - .arg("/etc/logos") - .arg("--entrypoint") - .arg("cfgsync-server") - .arg("-p") - .arg(format!("{port}:{port}")) - .arg("-v") - .arg(cfgsync_stack_volume_arg(testnet_dir)); - - maybe_add_circuits_mount(&mut command); - command.arg(image).arg("/etc/logos/cfgsync.yaml"); - command -} - -fn resolve_image() -> (String, Option) { - let image = - tf_env::nomos_testnet_image().unwrap_or_else(|| String::from(DEFAULT_COMPOSE_TEST_IMAGE)); - let platform = (image == GHCR_TESTNET_IMAGE).then(|| "linux/amd64".to_owned()); - debug!(image, platform = ?platform, "resolved compose image"); - (image, platform) -} - -fn base_volumes() -> Vec { - let mut volumes = vec!["./stack:/etc/logos".into()]; - if let Some(host_log_dir) = repository_root() - .ok() - .map(|root| root.join("tmp").join("node-logs")) - .map(|dir| dir.display().to_string()) - { - volumes.push(format!("{host_log_dir}:/tmp/node-logs")); - } - volumes -} - -fn default_extra_hosts() -> Vec { - testing_framework_runner_compose::docker::platform::host_gateway_entry() - .into_iter() - .collect() -} - -fn base_environment(cfgsync_port: u16) -> Vec { - let rust_log = env_value_or_default(tf_env::rust_log, "info"); - let nomos_log_level = env_value_or_default(tf_env::nomos_log_level, "info"); - let time_backend = env_value_or_default(tf_env::lb_time_service_backend, "monotonic"); - let cfgsync_host = env::var("LOGOS_BLOCKCHAIN_CFGSYNC_HOST") - .unwrap_or_else(|_| String::from(DEFAULT_CFGSYNC_HOST)); - vec![ - EnvEntry::new("RUST_LOG", rust_log), - EnvEntry::new("LOGOS_BLOCKCHAIN_LOG_LEVEL", nomos_log_level), - EnvEntry::new("LOGOS_BLOCKCHAIN_TIME_BACKEND", time_backend), - EnvEntry::new( - "CFG_SERVER_ADDR", - format!("http://{cfgsync_host}:{cfgsync_port}"), - ), - EnvEntry::new("OTEL_METRIC_EXPORT_INTERVAL", "5000"), - ] -} - -fn compose_runner_host() -> String { - env::var("COMPOSE_RUNNER_HOST").unwrap_or_else(|_| DEFAULT_COMPOSE_RUNNER_HOST.to_string()) -} - -fn api_client_from_host_ports( - ports: &NodeHostPorts, - host: &str, -) -> Result { - let base_url = url_for_host_port(host, ports.api)?; - let testing_url = url_for_host_port(host, ports.testing)?; - Ok(NodeHttpClient::from_urls(base_url, Some(testing_url))) -} - -fn env_value_or_default(getter: impl Fn() -> Option, default: &'static str) -> String { - getter().unwrap_or_else(|| String::from(default)) -} - -fn url_for_host_port(host: &str, port: u16) -> Result { - let url = Url::parse(&format!("http://{host}:{port}/"))?; - Ok(url) -} diff --git a/logos/runtime/ext/src/constants.rs b/logos/runtime/ext/src/constants.rs deleted file mode 100644 index 1e469d5..0000000 --- a/logos/runtime/ext/src/constants.rs +++ /dev/null @@ -1,13 +0,0 @@ -use testing_framework_env as tf_env; - -/// Default cfgsync port used across extension runners. -pub const DEFAULT_CFGSYNC_PORT: u16 = 4400; - -/// Default stack assets directory used by k8s compose assets discovery. -pub const DEFAULT_ASSETS_STACK_DIR: &str = "logos/infra/assets/stack"; - -/// Resolve cfgsync port from `LOGOS_BLOCKCHAIN_CFGSYNC_PORT`, falling back to -/// the default. -pub fn cfgsync_port() -> u16 { - tf_env::nomos_cfgsync_port().unwrap_or(DEFAULT_CFGSYNC_PORT) -} diff --git a/logos/runtime/ext/src/k8s_env.rs b/logos/runtime/ext/src/k8s_env.rs deleted file mode 100644 index ee90f2c..0000000 --- a/logos/runtime/ext/src/k8s_env.rs +++ /dev/null @@ -1,648 +0,0 @@ -use std::{ - collections::BTreeMap, - env, fs, io, - path::{Path, PathBuf}, - process::Output, -}; - -use anyhow::{Result as AnyhowResult, anyhow}; -use async_trait::async_trait; -use kube::Client; -use lb_framework::{ - NodeHttpClient, - internal::{DeploymentPlan, NodePlan}, -}; -use lb_http_api_common::paths; -use reqwest::Url; -use serde::Serialize; -use tempfile::TempDir; -use testing_framework_core::scenario::DynError; -use testing_framework_env as tf_env; -use testing_framework_runner_k8s::{K8sDeployEnv, PortSpecs, RunnerCleanup, wait::NodeConfigPorts}; -use thiserror::Error; -use tokio::process::Command; -use tracing::{debug, info}; - -use crate::{ - LbcExtEnv, - cfgsync::{CfgsyncOutputPaths, CfgsyncRenderOptions, render_and_write_cfgsync_from_template}, - constants::{DEFAULT_ASSETS_STACK_DIR, cfgsync_port}, -}; - -const CFGSYNC_K8S_TIMEOUT_SECS: u64 = 300; -const K8S_FULLNAME_OVERRIDE: &str = "logos-runner"; -const DEFAULT_K8S_TESTNET_IMAGE: &str = "public.ecr.aws/r4s5t9y4/logos/logos-blockchain:test"; - -/// Paths and image metadata required to deploy the Helm chart. -pub struct K8sAssets { - pub image: String, - pub chart_path: PathBuf, - pub cfgsync_file: PathBuf, - pub run_cfgsync_script: PathBuf, - pub run_logos_script: PathBuf, - pub run_logos_node_script: PathBuf, - pub values_file: PathBuf, - _tempdir: TempDir, -} - -#[derive(Debug, Error)] -/// Failures preparing Helm assets and rendered cfgsync configuration. -pub enum AssetsError { - #[error("failed to locate workspace root: {source}")] - WorkspaceRoot { - #[source] - source: anyhow::Error, - }, - #[error("failed to render cfgsync configuration: {source}")] - Cfgsync { - #[source] - source: anyhow::Error, - }, - #[error("missing required script at {path}")] - MissingScript { path: PathBuf }, - #[error("missing Helm chart at {path}; ensure the repository is up-to-date")] - MissingChart { path: PathBuf }, - #[error("failed to create temporary directory for rendered assets: {source}")] - TempDir { - #[source] - source: io::Error, - }, - #[error("failed to write asset at {path}: {source}")] - Io { - path: PathBuf, - #[source] - source: io::Error, - }, - #[error("failed to render Helm values: {source}")] - Values { - #[source] - source: serde_yaml::Error, - }, -} - -#[derive(Debug, Error)] -/// Errors returned from Helm invocations. -pub enum HelmError { - #[error("failed to spawn {command}: {source}")] - Spawn { - command: String, - #[source] - source: io::Error, - }, - #[error("{command} exited with status {status:?}\nstderr:\n{stderr}\nstdout:\n{stdout}")] - Failed { - command: String, - status: Option, - stdout: String, - stderr: String, - }, -} - -#[async_trait] -impl K8sDeployEnv for LbcExtEnv { - type Assets = K8sAssets; - - fn collect_port_specs(topology: &Self::Deployment) -> PortSpecs { - let nodes = topology - .nodes() - .iter() - .map(|node| NodeConfigPorts { - api: node.general.api_config.address.port(), - testing: node.general.api_config.testing_http_address.port(), - }) - .collect(); - PortSpecs { nodes } - } - - fn prepare_assets( - topology: &Self::Deployment, - metrics_otlp_ingest_url: Option<&Url>, - ) -> Result { - prepare_assets(topology, metrics_otlp_ingest_url).map_err(|err| err.into()) - } - - async fn install_stack( - client: &Client, - assets: &Self::Assets, - namespace: &str, - release: &str, - nodes: usize, - ) -> Result { - install_release(assets, release, namespace, nodes) - .await - .map_err(|err| -> DynError { Box::new(err) })?; - - let preserve = env::var("K8S_RUNNER_PRESERVE").is_ok(); - Ok(RunnerCleanup::new( - client.clone(), - namespace.to_owned(), - release.to_owned(), - preserve, - )) - } - - fn node_client_from_ports( - host: &str, - api_port: u16, - testing_port: u16, - ) -> Result { - let base_url = node_url(host, api_port)?; - let testing_url = Url::parse(&format!("http://{host}:{testing_port}")).ok(); - Ok(NodeHttpClient::from_urls(base_url, testing_url)) - } - - fn readiness_path() -> &'static str { - paths::CRYPTARCHIA_INFO - } - - fn node_base_url(client: &Self::NodeClient) -> Option { - Some(client.base_url().to_string()) - } - - fn node_deployment_name(_release: &str, index: usize) -> String { - format!("{K8S_FULLNAME_OVERRIDE}-node-{index}") - } - - fn node_service_name(_release: &str, index: usize) -> String { - format!("{K8S_FULLNAME_OVERRIDE}-node-{index}") - } -} - -fn node_url(host: &str, port: u16) -> Result { - let url = Url::parse(&format!("http://{host}:{port}"))?; - Ok(url) -} - -/// Render cfgsync config, Helm values, and locate scripts for a topology. -pub fn prepare_assets( - topology: &DeploymentPlan, - metrics_otlp_ingest_url: Option<&Url>, -) -> Result { - log_assets_prepare_start(topology); - let root = workspace_root().map_err(|source| AssetsError::WorkspaceRoot { source })?; - let tempdir = create_assets_tempdir()?; - - let (cfgsync_file, cfgsync_yaml, artifacts_yaml) = - render_and_write_cfgsync(topology, metrics_otlp_ingest_url, &tempdir)?; - let scripts = validate_scripts(&root)?; - let chart_path = helm_chart_path()?; - let values_file = render_and_write_values(topology, &tempdir, &cfgsync_yaml, &artifacts_yaml)?; - let image = testnet_image(); - - log_assets_prepare_done(&cfgsync_file, &values_file, &chart_path, &image); - - Ok(K8sAssets { - image, - chart_path, - cfgsync_file, - run_logos_script: scripts.run_shared, - run_cfgsync_script: scripts.run_cfgsync, - run_logos_node_script: scripts.run_node, - values_file, - _tempdir: tempdir, - }) -} - -fn log_assets_prepare_start(topology: &DeploymentPlan) { - info!( - nodes = topology.nodes().len(), - "preparing k8s runner assets" - ); -} - -fn log_assets_prepare_done( - cfgsync_file: &Path, - values_file: &Path, - chart_path: &Path, - image: &str, -) { - debug!( - cfgsync = %cfgsync_file.display(), - values = %values_file.display(), - image, - chart = %chart_path.display(), - "k8s runner assets prepared" - ); -} - -async fn install_release( - assets: &K8sAssets, - release: &str, - namespace: &str, - nodes: usize, -) -> Result<(), HelmError> { - info!( - release, - namespace, - nodes, - image = %assets.image, - cfgsync_port = cfgsync_port(), - values = %assets.values_file.display(), - "installing helm release" - ); - - let command = format!("helm install {release}"); - let cmd = build_install_command(assets, release, namespace, nodes); - let output = run_helm_command(cmd, &command).await?; - - maybe_log_install_output(&command, &output); - - info!(release, namespace, "helm install completed"); - Ok(()) -} - -fn build_install_command( - assets: &K8sAssets, - release: &str, - namespace: &str, - nodes: usize, -) -> Command { - let mut cmd = Command::new("helm"); - cmd.arg("install").arg(release).arg(&assets.chart_path); - add_install_scoping_args(&mut cmd, namespace); - add_install_settings(&mut cmd, assets, nodes); - add_script_file_settings(&mut cmd, assets); - - if let Ok(root) = workspace_root() { - cmd.current_dir(root); - } - - cmd -} - -fn add_install_scoping_args(cmd: &mut Command, namespace: &str) { - cmd.arg("--namespace") - .arg(namespace) - .arg("--create-namespace") - .arg("--wait") - .arg("--timeout") - .arg("5m"); -} - -fn add_install_settings(cmd: &mut Command, assets: &K8sAssets, nodes: usize) { - cmd.arg("--set") - .arg(format!("image={}", assets.image)) - .arg("--set") - .arg(format!("nodes.count={nodes}")) - .arg("--set") - .arg(format!("cfgsync.port={}", cfgsync_port())) - .arg("-f") - .arg(&assets.values_file) - .arg("--set-file") - .arg(format!("cfgsync.config={}", assets.cfgsync_file.display())); -} - -fn add_script_file_settings(cmd: &mut Command, assets: &K8sAssets) { - add_set_file_arg(cmd, "scripts.runCfgsyncSh", &assets.run_cfgsync_script); - add_set_file_arg(cmd, "scripts.runLogosNodeSh", &assets.run_logos_node_script); - add_set_file_arg(cmd, "scripts.runLogosSh", &assets.run_logos_script); -} - -fn add_set_file_arg(cmd: &mut Command, key: &str, value: &Path) { - cmd.arg("--set-file") - .arg(format!("{key}={}", value.display())); -} - -fn maybe_log_install_output(command: &str, output: &Output) { - if env::var("K8S_RUNNER_DEBUG").is_err() { - return; - } - - debug!( - command, - stdout = %String::from_utf8_lossy(&output.stdout), - "helm install stdout" - ); - debug!( - command, - stderr = %String::from_utf8_lossy(&output.stderr), - "helm install stderr" - ); -} - -async fn run_helm_command(mut cmd: Command, command: &str) -> Result { - let output = cmd.output().await.map_err(|source| HelmError::Spawn { - command: command.to_owned(), - source, - })?; - - if output.status.success() { - Ok(output) - } else { - Err(HelmError::Failed { - command: command.to_owned(), - status: output.status.code(), - stdout: String::from_utf8_lossy(&output.stdout).into_owned(), - stderr: String::from_utf8_lossy(&output.stderr).into_owned(), - }) - } -} - -fn create_assets_tempdir() -> Result { - tempfile::Builder::new() - .prefix("nomos-helm-") - .tempdir() - .map_err(|source| AssetsError::TempDir { source }) -} - -fn render_and_write_cfgsync( - topology: &DeploymentPlan, - metrics_otlp_ingest_url: Option<&Url>, - tempdir: &TempDir, -) -> Result<(PathBuf, String, String), AssetsError> { - let cfgsync_file = tempdir.path().join("cfgsync.yaml"); - let artifacts_file = tempdir.path().join("cfgsync.artifacts.yaml"); - let (cfgsync_yaml, artifacts_yaml) = render_cfgsync_config( - topology, - metrics_otlp_ingest_url, - &cfgsync_file, - &artifacts_file, - )?; - - Ok((cfgsync_file, cfgsync_yaml, artifacts_yaml)) -} - -fn render_and_write_values( - topology: &DeploymentPlan, - tempdir: &TempDir, - cfgsync_yaml: &str, - artifacts_yaml: &str, -) -> Result { - let values_yaml = render_values_yaml(topology, cfgsync_yaml, artifacts_yaml)?; - write_temp_file(tempdir.path(), "values.yaml", values_yaml) -} - -fn testnet_image() -> String { - tf_env::nomos_testnet_image().unwrap_or_else(|| String::from(DEFAULT_K8S_TESTNET_IMAGE)) -} - -fn render_cfgsync_config( - topology: &DeploymentPlan, - metrics_otlp_ingest_url: Option<&Url>, - cfgsync_file: &Path, - artifacts_file: &Path, -) -> Result<(String, String), AssetsError> { - let hostnames = k8s_node_hostnames(topology); - let rendered = render_and_write_cfgsync_from_template::( - topology, - &hostnames, - CfgsyncRenderOptions { - port: Some(cfgsync_port()), - artifacts_path: Some("cfgsync.artifacts.yaml".to_string()), - min_timeout_secs: Some(CFGSYNC_K8S_TIMEOUT_SECS), - metrics_otlp_ingest_url: metrics_otlp_ingest_url.cloned(), - }, - CfgsyncOutputPaths { - config_path: cfgsync_file, - artifacts_path: artifacts_file, - }, - ) - .map_err(|source| AssetsError::Cfgsync { source })?; - - Ok((rendered.config_yaml, rendered.artifacts_yaml)) -} - -fn k8s_node_hostnames(topology: &DeploymentPlan) -> Vec { - topology - .nodes() - .iter() - .map(|node| format!("{K8S_FULLNAME_OVERRIDE}-node-{}", node.index())) - .collect() -} - -struct ScriptPaths { - run_cfgsync: PathBuf, - run_shared: PathBuf, - run_node: PathBuf, -} - -fn validate_scripts(root: &Path) -> Result { - let scripts_dir = stack_scripts_root(root); - let run_cfgsync = scripts_dir.join("run_cfgsync.sh"); - let run_shared = scripts_dir.join("run_logos.sh"); - let run_node = scripts_dir.join("run_logos_node.sh"); - - for path in [&run_cfgsync, &run_shared, &run_node] { - if !path.exists() { - return Err(AssetsError::MissingScript { path: path.clone() }); - } - } - - debug!( - run_cfgsync = %run_cfgsync.display(), - run_shared = %run_shared.display(), - run_node = %run_node.display(), - "validated runner scripts exist" - ); - - Ok(ScriptPaths { - run_cfgsync, - run_shared, - run_node, - }) -} - -fn helm_chart_path() -> Result { - let root = workspace_root().map_err(|source| AssetsError::WorkspaceRoot { source })?; - let path = if let Some(override_dir) = helm_override_dir(&root) { - override_dir - } else { - root.join("logos/infra/helm/logos-runner") - }; - if path.exists() { - Ok(path) - } else { - Err(AssetsError::MissingChart { path }) - } -} - -fn render_values_yaml( - topology: &DeploymentPlan, - cfgsync_yaml: &str, - artifacts_yaml: &str, -) -> Result { - let values = build_values(topology, cfgsync_yaml, artifacts_yaml); - serde_yaml::to_string(&values).map_err(|source| AssetsError::Values { source }) -} - -fn write_temp_file( - dir: &Path, - name: &str, - contents: impl AsRef<[u8]>, -) -> Result { - let path = dir.join(name); - fs::write(&path, contents).map_err(|source| AssetsError::Io { - path: path.clone(), - source, - })?; - Ok(path) -} - -/// Locate the workspace root, honoring `CARGO_WORKSPACE_DIR` overrides. -pub fn workspace_root() -> AnyhowResult { - if let Ok(var) = env::var("CARGO_WORKSPACE_DIR") { - return Ok(PathBuf::from(var)); - } - let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); - let candidate_roots = [ - manifest_dir - .parent() - .and_then(Path::parent) - .and_then(Path::parent), - manifest_dir.parent().and_then(Path::parent), - ]; - - for candidate in candidate_roots.iter().flatten() { - let stack_root = if let Some(override_dir) = assets_override_dir(candidate) { - override_dir - } else { - candidate.join(DEFAULT_ASSETS_STACK_DIR) - }; - if stack_root.exists() { - return Ok(candidate.to_path_buf()); - } - } - - Err(anyhow!( - "resolving workspace root from manifest dir: {manifest_dir:?}" - )) -} - -fn stack_scripts_root(root: &Path) -> PathBuf { - if let Some(scripts) = override_scripts_dir(root) - && scripts.exists() - { - return scripts; - } - root.join(DEFAULT_ASSETS_STACK_DIR).join("scripts") -} - -fn assets_override_dir(root: &Path) -> Option { - env::var("REL_ASSETS_STACK_DIR").ok().map(|value| { - let path = PathBuf::from(value); - if path.is_absolute() { - path - } else { - root.join(path) - } - }) -} - -fn override_scripts_dir(root: &Path) -> Option { - assets_override_dir(root).map(|dir| dir.join("scripts")) -} - -fn helm_override_dir(root: &Path) -> Option { - env::var("REL_HELM_CHART_DIR").ok().map(|value| { - let path = PathBuf::from(value); - if path.is_absolute() { - path - } else { - root.join(path) - } - }) -} - -#[derive(Serialize)] -struct HelmValues { - #[serde(rename = "imagePullPolicy")] - image_pull_policy: String, - #[serde(rename = "fullnameOverride")] - fullname_override: String, - kzg: KzgValues, - cfgsync: CfgsyncValues, - nodes: NodeGroup, -} - -#[derive(Serialize)] -struct KzgValues { - mode: String, - #[serde(rename = "storageSize")] - storage_size: String, - #[serde(rename = "hostPath")] - host_path: String, - #[serde(rename = "hostPathType")] - host_path_type: String, -} - -#[derive(Serialize)] -struct CfgsyncValues { - port: u16, - config: String, - artifacts: String, -} - -#[derive(Serialize)] -struct NodeGroup { - count: usize, - nodes: Vec, -} - -#[derive(Serialize)] -struct NodeValues { - #[serde(rename = "apiPort")] - api_port: u16, - #[serde(rename = "testingHttpPort")] - testing_http_port: u16, - #[serde(rename = "networkPort")] - network_port: u16, - env: BTreeMap, -} - -fn build_values(topology: &DeploymentPlan, cfgsync_yaml: &str, artifacts_yaml: &str) -> HelmValues { - let cfgsync = CfgsyncValues { - port: cfgsync_port(), - config: cfgsync_yaml.to_string(), - artifacts: artifacts_yaml.to_string(), - }; - let kzg = KzgValues::disabled(); - let image_pull_policy = - tf_env::nomos_testnet_image_pull_policy().unwrap_or_else(|| "IfNotPresent".into()); - debug!("rendering Helm values for k8s stack"); - let nodes = build_node_group("node", topology.nodes()); - - HelmValues { - image_pull_policy, - fullname_override: K8S_FULLNAME_OVERRIDE.to_string(), - kzg, - cfgsync, - nodes, - } -} - -impl KzgValues { - fn disabled() -> Self { - Self { - mode: "disabled".to_string(), - storage_size: "1Gi".to_string(), - host_path: "/tmp/nomos-kzg".to_string(), - host_path_type: "DirectoryOrCreate".to_string(), - } - } -} - -fn build_node_group(kind: &'static str, nodes: &[NodePlan]) -> NodeGroup { - let node_values = nodes - .iter() - .enumerate() - .map(|(index, node)| build_node_values(kind, index, node)) - .collect(); - - NodeGroup { - count: nodes.len(), - nodes: node_values, - } -} - -fn build_node_values(kind: &'static str, index: usize, node: &NodePlan) -> NodeValues { - let mut env = BTreeMap::new(); - env.insert("CFG_HOST_KIND".into(), kind.to_string()); - env.insert("CFG_HOST_IDENTIFIER".into(), format!("{kind}-{index}")); - - NodeValues { - api_port: node.general.api_config.address.port(), - testing_http_port: node.general.api_config.testing_http_address.port(), - network_port: node.general.network_config.backend.swarm.port, - env, - } -} diff --git a/logos/runtime/ext/src/lib.rs b/logos/runtime/ext/src/lib.rs deleted file mode 100644 index 0ae97fc..0000000 --- a/logos/runtime/ext/src/lib.rs +++ /dev/null @@ -1,168 +0,0 @@ -use std::{ - collections::HashMap, - path::{Path, PathBuf}, - sync::Arc, -}; - -use async_trait::async_trait; -pub use lb_framework::*; -use reqwest::Url; -pub use scenario::{ - CoreBuilderExt, ObservabilityBuilderExt, ScenarioBuilder, ScenarioBuilderExt, - ScenarioBuilderWith, -}; -use testing_framework_core::scenario::{ - Application, DynError, ExternalNodeSource, FeedRuntime, NodeClients, RunContext, - StartNodeOptions, -}; -use testing_framework_runner_local::{ - BuiltNodeConfig, LocalDeployerEnv, NodeConfigEntry, - process::{LaunchSpec, NodeEndpoints, ProcessSpawnError}, -}; -use tokio::sync::broadcast; -use workloads::{LbcBlockFeedEnv, LbcScenarioEnv}; - -pub mod cfgsync; -mod compose_env; -pub mod constants; -mod k8s_env; -pub mod scenario; - -pub type LbcComposeDeployer = testing_framework_runner_compose::ComposeDeployer; -pub type LbcK8sDeployer = testing_framework_runner_k8s::K8sDeployer; - -pub struct LbcExtEnv; - -#[async_trait] -impl Application for LbcExtEnv { - type Deployment = ::Deployment; - - type NodeClient = ::NodeClient; - - type NodeConfig = ::NodeConfig; - - type FeedRuntime = ::FeedRuntime; - - fn external_node_client(source: &ExternalNodeSource) -> Result { - let base_url = Url::parse(source.endpoint())?; - Ok(NodeHttpClient::from_urls(base_url, None)) - } - - async fn prepare_feed( - node_clients: NodeClients, - ) -> Result<(::Feed, Self::FeedRuntime), DynError> { - let clients = node_clients.snapshot(); - let upstream_clients = NodeClients::::new(clients); - - ::prepare_feed(upstream_clients).await - } -} - -impl LbcScenarioEnv for LbcExtEnv {} - -impl LbcBlockFeedEnv for LbcExtEnv { - fn block_feed_subscription(ctx: &RunContext) -> broadcast::Receiver> { - ctx.feed().subscribe() - } - - fn block_feed(ctx: &RunContext) -> BlockFeed { - ctx.feed() - } -} - -#[async_trait] -impl LocalDeployerEnv for LbcExtEnv { - fn build_node_config( - topology: &Self::Deployment, - index: usize, - peer_ports_by_name: &HashMap, - options: &StartNodeOptions, - peer_ports: &[u16], - ) -> Result::NodeConfig>, DynError> { - let mapped_options = map_start_options(options)?; - ::build_node_config( - topology, - index, - peer_ports_by_name, - &mapped_options, - peer_ports, - ) - } - - fn build_node_config_from_template( - topology: &Self::Deployment, - index: usize, - peer_ports_by_name: &HashMap, - options: &StartNodeOptions, - peer_ports: &[u16], - template_config: Option<&::NodeConfig>, - ) -> Result::NodeConfig>, DynError> { - let mapped_options = map_start_options(options)?; - ::build_node_config_from_template( - topology, - index, - peer_ports_by_name, - &mapped_options, - peer_ports, - template_config, - ) - } - - fn build_initial_node_configs( - topology: &Self::Deployment, - ) -> Result::NodeConfig>>, ProcessSpawnError> { - ::build_initial_node_configs(topology) - } - - fn initial_persist_dir( - topology: &Self::Deployment, - node_name: &str, - index: usize, - ) -> Option { - ::initial_persist_dir(topology, node_name, index) - } - - fn initial_snapshot_dir( - topology: &Self::Deployment, - node_name: &str, - index: usize, - ) -> Option { - ::initial_snapshot_dir(topology, node_name, index) - } - - fn build_launch_spec( - config: &::NodeConfig, - dir: &Path, - label: &str, - ) -> Result { - ::build_launch_spec(config, dir, label) - } - - fn node_endpoints(config: &::NodeConfig) -> NodeEndpoints { - ::node_endpoints(config) - } - - fn node_client(endpoints: &NodeEndpoints) -> Self::NodeClient { - ::node_client(endpoints) - } - - fn readiness_endpoint_path() -> &'static str { - ::readiness_endpoint_path() - } -} - -fn map_start_options( - options: &StartNodeOptions, -) -> Result, DynError> { - if options.config_patch.is_some() { - return Err("LbcExtEnv local deployer bridge does not support config_patch yet".into()); - } - - let mut mapped = StartNodeOptions::::default(); - mapped.peers = options.peers.clone(); - mapped.config_override = options.config_override.clone(); - mapped.persist_dir = options.persist_dir.clone(); - mapped.snapshot_dir = options.snapshot_dir.clone(); - - Ok(mapped) -} diff --git a/logos/runtime/ext/src/scenario/mod.rs b/logos/runtime/ext/src/scenario/mod.rs deleted file mode 100644 index 564e46c..0000000 --- a/logos/runtime/ext/src/scenario/mod.rs +++ /dev/null @@ -1,212 +0,0 @@ -use std::num::{NonZeroU64, NonZeroUsize}; - -use lb_framework::{ - configs::{ - deployment::{DeploymentBuilder, TopologyConfig}, - wallet::{WalletConfig, wallet_config_for_users}, - }, - internal::{DeploymentPlan, apply_wallet_config_to_deployment}, -}; -pub use testing_framework_core::scenario::ObservabilityBuilderExt; -use testing_framework_core::{ - scenario::internal::{NodeControlScenarioBuilder, ObservabilityScenarioBuilder}, - topology::{DeploymentProvider, DeploymentSeed, DynTopologyError}, -}; -use tracing::warn; - -use crate::LbcExtEnv; - -pub type ScenarioBuilder = testing_framework_core::scenario::ScenarioBuilder; -pub type ScenarioBuilderWith = - testing_framework_core::scenario::internal::CoreBuilder; - -pub trait CoreBuilderExt: Sized { - fn deployment_with(f: impl FnOnce(DeploymentBuilder) -> DeploymentBuilder) -> Self; - - fn with_wallet_config(self, wallet: WalletConfig) -> Self; - - fn wallets(self, users: usize) -> Self; -} - -pub trait ScenarioBuilderExt: Sized { - fn transactions(self) -> TransactionFlowBuilder; - - fn transactions_with( - self, - f: impl FnOnce(TransactionFlowBuilder) -> TransactionFlowBuilder, - ) -> Self; - - fn expect_consensus_liveness(self) -> Self; - - fn initialize_wallet(self, total_funds: u64, users: usize) -> Self; -} - -impl CoreBuilderExt for ScenarioBuilder { - fn deployment_with(f: impl FnOnce(DeploymentBuilder) -> DeploymentBuilder) -> Self { - let topology = f(DeploymentBuilder::new(TopologyConfig::empty())); - ScenarioBuilder::new(Box::new(topology)) - } - - fn with_wallet_config(self, wallet: WalletConfig) -> Self { - self.map_deployment_provider(|provider| { - Box::new(WalletConfigProvider { - inner: provider, - wallet, - }) - }) - } - - fn wallets(self, users: usize) -> Self { - with_wallets_or_warn(self, users, CoreBuilderExt::with_wallet_config) - } -} - -impl CoreBuilderExt for NodeControlScenarioBuilder { - fn deployment_with(f: impl FnOnce(DeploymentBuilder) -> DeploymentBuilder) -> Self { - ScenarioBuilder::deployment_with(f).with_node_control() - } - - fn with_wallet_config(self, wallet: WalletConfig) -> Self { - self.map_deployment_provider(|provider| { - Box::new(WalletConfigProvider { - inner: provider, - wallet, - }) - }) - } - - fn wallets(self, users: usize) -> Self { - with_wallets_or_warn(self, users, CoreBuilderExt::with_wallet_config) - } -} - -impl CoreBuilderExt for ObservabilityScenarioBuilder { - fn deployment_with(f: impl FnOnce(DeploymentBuilder) -> DeploymentBuilder) -> Self { - ScenarioBuilder::deployment_with(f).with_observability() - } - - fn with_wallet_config(self, wallet: WalletConfig) -> Self { - self.map_deployment_provider(|provider| { - Box::new(WalletConfigProvider { - inner: provider, - wallet, - }) - }) - } - - fn wallets(self, users: usize) -> Self { - with_wallets_or_warn(self, users, CoreBuilderExt::with_wallet_config) - } -} - -impl ScenarioBuilderExt for B -where - B: CoreBuilderExt + testing_framework_core::scenario::CoreBuilderExt + Sized, -{ - fn transactions(self) -> TransactionFlowBuilder { - TransactionFlowBuilder { - builder: self, - rate: NonZeroU64::MIN, - users: None, - } - } - - fn transactions_with( - self, - f: impl FnOnce(TransactionFlowBuilder) -> TransactionFlowBuilder, - ) -> Self { - f(self.transactions()).apply() - } - - fn expect_consensus_liveness(self) -> Self { - self.with_expectation(lb_framework::workloads::ConsensusLiveness::::default()) - } - - fn initialize_wallet(self, total_funds: u64, users: usize) -> Self { - let Some(user_count) = NonZeroUsize::new(users) else { - warn!( - users, - "wallet user count must be non-zero; ignoring initialize_wallet" - ); - return self; - }; - - match WalletConfig::uniform(total_funds, user_count) { - Ok(wallet) => self.with_wallet_config(wallet), - Err(error) => { - warn!( - users, - total_funds, - error = %error, - "invalid initialize_wallet input; ignoring initialize_wallet" - ); - self - } - } - } -} - -pub struct TransactionFlowBuilder { - builder: B, - rate: NonZeroU64, - users: Option, -} - -impl TransactionFlowBuilder -where - B: testing_framework_core::scenario::CoreBuilderExt + Sized, -{ - pub fn rate(mut self, rate: u64) -> Self { - match NonZeroU64::new(rate) { - Some(rate) => self.rate = rate, - None => warn!( - rate, - "transaction rate must be non-zero; keeping previous rate" - ), - } - self - } - - pub fn users(mut self, users: usize) -> Self { - match NonZeroUsize::new(users) { - Some(value) => self.users = Some(value), - None => warn!( - users, - "transaction user count must be non-zero; keeping previous setting" - ), - } - self - } - - pub fn apply(self) -> B { - let workload = lb_framework::workloads::transaction::Workload::::new(self.rate) - .with_user_limit(self.users); - self.builder.with_workload(workload) - } -} - -struct WalletConfigProvider { - inner: Box>, - wallet: WalletConfig, -} - -impl DeploymentProvider for WalletConfigProvider { - fn build(&self, seed: Option<&DeploymentSeed>) -> Result { - let mut deployment = self.inner.build(seed)?; - apply_wallet_config_to_deployment(&mut deployment, &self.wallet); - Ok(deployment) - } -} - -fn with_wallets_or_warn(builder: B, users: usize, apply: impl FnOnce(B, WalletConfig) -> B) -> B -where - B: CoreBuilderExt, -{ - match wallet_config_for_users(users) { - Ok(wallet) => apply(builder, wallet), - Err(error) => { - warn!(users, error = %error, "invalid wallets input; ignoring wallets"); - builder - } - } -} diff --git a/logos/runtime/workloads/Cargo.toml b/logos/runtime/workloads/Cargo.toml deleted file mode 100644 index fb63f8c..0000000 --- a/logos/runtime/workloads/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -description = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -name = "lb-workloads" -version = { workspace = true } - -[lints] -workspace = true - -[dependencies] -# Workspace crates -lb-ext = { workspace = true } -lb-framework = { workspace = true } -testing-framework-core = { workspace = true } - -# External -thiserror = { workspace = true } -tokio = { features = ["time"], workspace = true } diff --git a/logos/runtime/workloads/src/lib.rs b/logos/runtime/workloads/src/lib.rs deleted file mode 100644 index c8974ab..0000000 --- a/logos/runtime/workloads/src/lib.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub mod workflows; -pub mod workloads; - -pub use lb_ext::LbcExtEnv as LbcEnv; -pub use lb_framework::workloads::{ConsensusLiveness, transaction::TxInclusionExpectation}; -pub use testing_framework_core::{scenario::BuilderInputError, workloads::RandomRestartWorkload}; -pub use workflows::{ - ChaosBuilderExt, ScenarioBuilderExt, start_node_with_timeout, wait_for_min_height, -}; diff --git a/logos/runtime/workloads/src/workflows/manual.rs b/logos/runtime/workloads/src/workflows/manual.rs deleted file mode 100644 index a11b86e..0000000 --- a/logos/runtime/workloads/src/workflows/manual.rs +++ /dev/null @@ -1,77 +0,0 @@ -use std::time::Duration; - -use lb_framework::NodeHttpClient; -use testing_framework_core::scenario::{ - Application, DynError, NodeControlHandle, StartNodeOptions, StartedNode, -}; -use thiserror::Error; -use tokio::time::{Instant, sleep, timeout}; - -#[derive(Debug, Error)] -pub enum ManualTestError { - #[error("timeout: {message}")] - Timeout { message: String }, - #[error("start node failed: {message}")] - StartNode { message: String }, - #[error("consensus_info failed: {source}")] - ConsensusInfo { source: DynError }, -} - -pub async fn start_node_with_timeout( - handle: &H, - name: &str, - options: StartNodeOptions, - timeout_duration: Duration, -) -> Result, ManualTestError> -where - App: Application, - H: NodeControlHandle + ?Sized, -{ - timeout(timeout_duration, handle.start_node_with(name, options)) - .await - .map_err(|_| ManualTestError::Timeout { - message: format!("starting node '{name}' exceeded timeout"), - })? - .map_err(|err: DynError| ManualTestError::StartNode { - message: err.to_string(), - }) -} - -pub async fn wait_for_min_height( - clients: &[NodeHttpClient], - min_height: u64, - timeout_duration: Duration, - poll_interval: Duration, -) -> Result<(), ManualTestError> { - let start = Instant::now(); - - loop { - let mut heights = Vec::with_capacity(clients.len()); - for client in clients { - match client.consensus_info().await { - Ok(info) => heights.push(info.height), - Err(err) => { - if start.elapsed() >= timeout_duration { - return Err(ManualTestError::ConsensusInfo { source: err.into() }); - } - sleep(poll_interval).await; - continue; - } - } - } - - if heights.len() == clients.len() && heights.iter().all(|height| *height >= min_height) { - return Ok(()); - } - - if start.elapsed() >= timeout_duration { - return Err(ManualTestError::Timeout { - message: format!( - "min height {min_height} not reached before timeout; heights={heights:?}" - ), - }); - } - - sleep(poll_interval).await; - } -} diff --git a/logos/runtime/workloads/src/workflows/mod.rs b/logos/runtime/workloads/src/workflows/mod.rs deleted file mode 100644 index 052c1af..0000000 --- a/logos/runtime/workloads/src/workflows/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod manual; - -pub use lb_framework::ScenarioBuilderExt; -pub use manual::{start_node_with_timeout, wait_for_min_height}; -pub use testing_framework_core::workloads::ChaosBuilderExt; diff --git a/logos/runtime/workloads/src/workloads/mod.rs b/logos/runtime/workloads/src/workloads/mod.rs deleted file mode 100644 index ffa8b4a..0000000 --- a/logos/runtime/workloads/src/workloads/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -pub mod chaos { - pub use testing_framework_core::workloads::RandomRestartWorkload; -} - -pub mod transaction { - pub use lb_framework::workloads::transaction::{TxInclusionExpectation, Workload}; -} diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 9655629..1b79eb8 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,7 +2,7 @@ # Keep this version in sync also in the following places: # * Dockerfile # * flake.nix -# * logos/infra/assets/stack/Dockerfile +# * testing-framework/assets/stack/Dockerfile # Also, update the version of the nightly toolchain to the latest nightly of the new version specified in the following places: # * .github/workflows/code-check.yml (fmt job) # * .pre-commit-config.yml (fmt hook) diff --git a/scripts/build/build-bundle.sh b/scripts/build/build-bundle.sh deleted file mode 100755 index ac67dcf..0000000 --- a/scripts/build/build-bundle.sh +++ /dev/null @@ -1,446 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [ -z "${BASH_VERSION:-}" ]; then - exec bash "$0" "$@" -fi - -# shellcheck disable=SC1091 -. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib/common.sh" - -readonly DOCKER_RUST_IMAGE="rust:1.80-bullseye" -declare -ar DOCKER_APT_PACKAGES=( - clang - llvm-dev - libclang-dev - pkg-config - cmake - libssl-dev - rsync - libgmp10 - libgmp-dev - libgomp1 - nasm -) - -build_bundle::usage() { - cat <<'USAGE' -Usage: scripts/build/build-bundle.sh [--platform host|linux] [--output PATH] - -Options: - --platform Target platform for binaries (default: host) - --output Output path for the tarball (default: .tmp/nomos-binaries--.tar.gz) - --rev logos-blockchain-node git revision to build (overrides LOGOS_BLOCKCHAIN_NODE_REV) - --path Use local logos-blockchain-node checkout at DIR (skip fetch/checkout) - --features Extra cargo features to enable (comma-separated); base always includes "testing" - --docker-platform Docker platform for Linux bundle when running on non-Linux host (default: auto; linux/arm64 on Apple silicon Docker Desktop, else linux/amd64) - -Notes: - - For compose/k8s, use platform=linux. If running on macOS, this script will - run inside a Linux Docker container to produce Linux binaries. - - On Apple silicon, Docker defaults to linux/arm64; for compose/k8s you likely - want linux/amd64 (the default here). Override with --docker-platform. - - VERSION, LOGOS_BLOCKCHAIN_NODE_REV, and optional LOGOS_BLOCKCHAIN_NODE_PATH env vars are honored (defaults align with run-examples.sh). -USAGE -} - -build_bundle::fail() { - echo "$1" >&2 - exit 1 -} - -build_bundle::apply_nomos_node_patches() { - local node_src="$1" - - local apply="${LOGOS_BLOCKCHAIN_NODE_APPLY_PATCHES:-1}" - if [ "${apply}" = "0" ]; then - return 0 - fi - - local patch_dir="${LOGOS_BLOCKCHAIN_NODE_PATCH_DIR:-${ROOT_DIR}/patches/logos-blockchain-node}" - if [ ! -d "${patch_dir}" ]; then - return 0 - fi - - local level="${LOGOS_BLOCKCHAIN_NODE_PATCH_LEVEL:-}" - if [ -z "${level}" ]; then - level="all" - fi - - shopt -s nullglob - local -a patches=("${patch_dir}"/*.patch) - shopt -u nullglob - if [ "${#patches[@]}" -eq 0 ]; then - return 0 - fi - - echo "==> Applying logos-blockchain-node patches from ${patch_dir} (level=${level})" - local patch base phase - for patch in "${patches[@]}"; do - base="$(basename "${patch}")" - phase="" - if [[ "${base}" =~ phase([0-9]+) ]]; then - phase="${BASH_REMATCH[1]}" - fi - if [ "${level}" != "all" ] && [ "${level}" != "ALL" ]; then - if ! [[ "${level}" =~ ^[0-9]+$ ]]; then - build_bundle::fail "Invalid LOGOS_BLOCKCHAIN_NODE_PATCH_LEVEL: ${level} (expected integer or 'all')" - fi - if [ -n "${phase}" ] && [ "${phase}" -gt "${level}" ]; then - continue - fi - fi - - git -C "${node_src}" apply --whitespace=nowarn "${patch}" - done -} - -build_bundle::load_env() { - ROOT_DIR="$(common::repo_root)" - export ROOT_DIR - - local env_version="${VERSION:-}" - local env_node_rev="${LOGOS_BLOCKCHAIN_NODE_REV:-}" - local env_node_path="${LOGOS_BLOCKCHAIN_NODE_PATH:-}" - - common::require_file "${ROOT_DIR}/versions.env" - # shellcheck disable=SC1091 - . "${ROOT_DIR}/versions.env" - - if [ -n "${env_version}" ]; then - VERSION="${env_version}" - fi - if [ -n "${env_node_rev}" ]; then - LOGOS_BLOCKCHAIN_NODE_REV="${env_node_rev}" - fi - if [ -n "${env_node_path}" ]; then - LOGOS_BLOCKCHAIN_NODE_PATH="${env_node_path}" - fi - - DEFAULT_VERSION="${VERSION:?Missing VERSION in versions.env}" - DEFAULT_NODE_REV="${LOGOS_BLOCKCHAIN_NODE_REV:-}" - DEFAULT_NODE_PATH="${LOGOS_BLOCKCHAIN_NODE_PATH:-}" - - LOGOS_BLOCKCHAIN_EXTRA_FEATURES="${LOGOS_BLOCKCHAIN_EXTRA_FEATURES:-}" - DOCKER_PLATFORM="${LOGOS_BLOCKCHAIN_BUNDLE_DOCKER_PLATFORM:-${LOGOS_BLOCKCHAIN_BIN_PLATFORM:-}}" - BUNDLE_RUSTUP_TOOLCHAIN="${BUNDLE_RUSTUP_TOOLCHAIN:-}" - - if [ -z "${BUNDLE_RUSTUP_TOOLCHAIN}" ] && command -v rustup >/dev/null 2>&1 && [ -f "${ROOT_DIR}/rust-toolchain.toml" ]; then - BUNDLE_RUSTUP_TOOLCHAIN="$(awk -F '\"' '/^[[:space:]]*channel[[:space:]]*=/{print $2; exit}' "${ROOT_DIR}/rust-toolchain.toml")" - fi -} - -build_bundle::default_docker_platform() { - if [ -n "${DOCKER_PLATFORM}" ]; then - return 0 - fi - if ! command -v docker >/dev/null 2>&1; then - return 0 - fi - local docker_arch - docker_arch="$(docker version --format '{{.Server.Arch}}' 2>/dev/null || true)" - case "${docker_arch}" in - arm64|aarch64) DOCKER_PLATFORM="linux/arm64" ;; - amd64|x86_64) DOCKER_PLATFORM="linux/amd64" ;; - *) DOCKER_PLATFORM="linux/amd64" ;; - esac -} - -build_bundle::ensure_circuits() { - if [ -n "${LOGOS_BLOCKCHAIN_CIRCUITS:-}" ]; then - [ -d "${LOGOS_BLOCKCHAIN_CIRCUITS}" ] || build_bundle::fail \ - "LOGOS_BLOCKCHAIN_CIRCUITS is set but missing: ${LOGOS_BLOCKCHAIN_CIRCUITS}" - return 0 - fi - - local default_dir="${HOME}/.logos-blockchain-circuits" - if [ ! -d "${default_dir}" ]; then - echo "==> Circuits not found; installing to ${default_dir}" - bash "${ROOT_DIR}/scripts/setup/setup-logos-blockchain-circuits.sh" "${VERSION}" "${default_dir}" - fi - - LOGOS_BLOCKCHAIN_CIRCUITS="${default_dir}" - export LOGOS_BLOCKCHAIN_CIRCUITS -} - -build_bundle::parse_args() { - PLATFORM="host" - OUTPUT="" - REV_OVERRIDE="" - PATH_OVERRIDE="" - - if [ "${1:-}" = "-h" ] || [ "${1:-}" = "--help" ]; then - build_bundle::usage - exit 0 - fi - - while [ "$#" -gt 0 ]; do - case "$1" in - --platform=*|-p=*) PLATFORM="${1#*=}"; shift ;; - --platform|-p) PLATFORM="${2:-}"; shift 2 ;; - --output=*|-o=*) OUTPUT="${1#*=}"; shift ;; - --output|-o) OUTPUT="${2:-}"; shift 2 ;; - --rev=*) REV_OVERRIDE="${1#*=}"; shift ;; - --rev) REV_OVERRIDE="${2:-}"; shift 2 ;; - --path=*) PATH_OVERRIDE="${1#*=}"; shift ;; - --path) PATH_OVERRIDE="${2:-}"; shift 2 ;; - --features=*) LOGOS_BLOCKCHAIN_EXTRA_FEATURES="${1#*=}"; shift ;; - --features) LOGOS_BLOCKCHAIN_EXTRA_FEATURES="${2:-}"; shift 2 ;; - --docker-platform=*) DOCKER_PLATFORM="${1#*=}"; shift ;; - --docker-platform) DOCKER_PLATFORM="${2:-}"; shift 2 ;; - *) build_bundle::fail "Unknown argument: $1" ;; - esac - done -} - -build_bundle::validate_and_finalize() { - case "${PLATFORM}" in - host|linux) ;; - *) build_bundle::fail "--platform must be host or linux" ;; - esac - - VERSION="${DEFAULT_VERSION}" - - if [ -n "${REV_OVERRIDE}" ] && [ -n "${PATH_OVERRIDE}" ]; then - build_bundle::fail "Use either --rev or --path, not both" - fi - if [ -z "${REV_OVERRIDE}" ] && [ -z "${PATH_OVERRIDE}" ] && [ -z "${DEFAULT_NODE_REV}" ] && [ -z "${DEFAULT_NODE_PATH}" ]; then - build_bundle::fail "Provide --rev, --path, or set LOGOS_BLOCKCHAIN_NODE_REV/LOGOS_BLOCKCHAIN_NODE_PATH in versions.env" - fi - LOGOS_BLOCKCHAIN_NODE_REV="${REV_OVERRIDE:-${DEFAULT_NODE_REV}}" - LOGOS_BLOCKCHAIN_NODE_PATH="${PATH_OVERRIDE:-${DEFAULT_NODE_PATH}}" - export LOGOS_BLOCKCHAIN_NODE_REV LOGOS_BLOCKCHAIN_NODE_PATH - - build_bundle::default_docker_platform - DOCKER_PLATFORM="${DOCKER_PLATFORM:-linux/amd64}" - - # Normalize OUTPUT to an absolute path under the workspace. - if [ -z "${OUTPUT}" ]; then - OUTPUT="${ROOT_DIR}/.tmp/nomos-binaries-${PLATFORM}-${VERSION}.tar.gz" - elif [[ "${OUTPUT}" != /* ]]; then - OUTPUT="${ROOT_DIR}/${OUTPUT#./}" - fi - echo "Bundle output: ${OUTPUT}" -} - -build_bundle::clean_cargo_linux_cache() { - rm -rf "${ROOT_DIR}/.tmp/cargo-linux/registry" "${ROOT_DIR}/.tmp/cargo-linux/git" -} - -build_bundle::docker_platform_suffix() { - # Map a docker platform string (e.g. linux/amd64) to a filesystem-safe suffix - # used for arch-specific target dirs, to avoid mixing build artifacts between - # different container architectures. - local platform="${1:-}" - if [ -z "${platform}" ]; then - echo "" - return 0 - fi - platform="${platform#linux/}" - platform="${platform//\//-}" - if [ -z "${platform}" ] || [ "${platform}" = "linux" ]; then - echo "" - return 0 - fi - echo "-${platform}" -} - -build_bundle::maybe_run_linux_build_in_docker() { - # With `set -e`, this function must return 0 when no Docker cross-build is needed. - if [ "${PLATFORM}" != "linux" ] || [ "$(uname -s)" = "Linux" ] || [ -n "${BUNDLE_IN_CONTAINER:-}" ]; then - return 0 - fi - - command -v docker >/dev/null 2>&1 || build_bundle::fail "Docker is required to build a Linux bundle from non-Linux host" - [ -n "${DOCKER_PLATFORM}" ] || build_bundle::fail "--docker-platform must not be empty" - - local node_path_env="${LOGOS_BLOCKCHAIN_NODE_PATH}" - local -a extra_mounts=() - if [ -n "${LOGOS_BLOCKCHAIN_NODE_PATH}" ]; then - case "${LOGOS_BLOCKCHAIN_NODE_PATH}" in - "${ROOT_DIR}"/*) - node_path_env="/workspace${LOGOS_BLOCKCHAIN_NODE_PATH#"${ROOT_DIR}"}" - ;; - /*) - node_path_env="/external/nomos-node" - extra_mounts+=("-v" "${LOGOS_BLOCKCHAIN_NODE_PATH}:${node_path_env}") - # Local node checkouts may reference this workspace via absolute - # /external/nomos-testing path dependencies. - extra_mounts+=("-v" "${ROOT_DIR}:/external/nomos-testing") - ;; - *) - build_bundle::fail "--path must be absolute when cross-building in Docker" - ;; - esac - fi - if [ -n "${LOGOS_BLOCKCHAIN_CIRCUITS:-}" ] && [ -d "${LOGOS_BLOCKCHAIN_CIRCUITS}" ]; then - extra_mounts+=("-v" "${LOGOS_BLOCKCHAIN_CIRCUITS}:/root/.logos-blockchain-circuits:ro") - fi - - echo "==> Building Linux bundle inside Docker" - local container_output="/workspace${OUTPUT#"${ROOT_DIR}"}" - local target_suffix - target_suffix="$(build_bundle::docker_platform_suffix "${DOCKER_PLATFORM}")" - local run_suffix="-$(date +%s)" - local host_target_dir="${ROOT_DIR}/.tmp/logos-blockchain-node-linux-target${target_suffix}${run_suffix}" - mkdir -p "${ROOT_DIR}/.tmp/cargo-linux" "${host_target_dir}" - - local -a features_args=() - if [ -n "${LOGOS_BLOCKCHAIN_EXTRA_FEATURES:-}" ]; then - features_args+=(--features "${LOGOS_BLOCKCHAIN_EXTRA_FEATURES}") - fi - - local -a src_args=() - if [ -n "${node_path_env}" ]; then - src_args+=(--path "${node_path_env}") - else - src_args+=(--rev "${LOGOS_BLOCKCHAIN_NODE_REV}") - fi - - docker run --rm --platform "${DOCKER_PLATFORM}" \ - -e VERSION="${VERSION}" \ - -e LOGOS_BLOCKCHAIN_NODE_REV="${LOGOS_BLOCKCHAIN_NODE_REV}" \ - -e LOGOS_BLOCKCHAIN_NODE_PATH="${node_path_env}" \ - -e LOGOS_BLOCKCHAIN_CIRCUITS="/root/.logos-blockchain-circuits" \ - -e LOGOS_BLOCKCHAIN_BUNDLE_DOCKER_PLATFORM="${DOCKER_PLATFORM}" \ - -e LOGOS_BLOCKCHAIN_NODE_TARGET_SUFFIX="${run_suffix}" \ - -e LOGOS_BLOCKCHAIN_EXTRA_FEATURES="${LOGOS_BLOCKCHAIN_EXTRA_FEATURES:-}" \ - -e BUNDLE_IN_CONTAINER=1 \ - -e CARGO_HOME=/workspace/.tmp/cargo-linux \ - -e CARGO_TARGET_DIR="/workspace/.tmp/logos-blockchain-node-linux-target${target_suffix}${run_suffix}" \ - -v "${ROOT_DIR}/.tmp/cargo-linux":/workspace/.tmp/cargo-linux \ - -v "${host_target_dir}:/workspace/.tmp/logos-blockchain-node-linux-target${target_suffix}${run_suffix}" \ - -v "${ROOT_DIR}:/workspace" \ - "${extra_mounts[@]}" \ - -w /workspace \ - "${DOCKER_RUST_IMAGE}" \ - bash -c "apt-get update && apt-get install -y ${DOCKER_APT_PACKAGES[*]} && ./scripts/build/build-bundle.sh --platform linux --output \"${container_output}\" ${src_args[*]} ${features_args[*]}" - - exit 0 -} - -build_bundle::prepare_circuits() { - echo "==> Preparing build workspace (version ${VERSION})" - if [ "${PLATFORM}" = "host" ]; then - NODE_TARGET="${ROOT_DIR}/.tmp/logos-blockchain-node-host-target" - else - # When building Linux bundles in Docker, avoid reusing the same target dir - # across different container architectures (e.g. linux/arm64 vs linux/amd64), - # as the native-host `target/debug` layout would otherwise get mixed. - local target_suffix="" - if [ -n "${BUNDLE_IN_CONTAINER:-}" ]; then - target_suffix="$(build_bundle::docker_platform_suffix "${LOGOS_BLOCKCHAIN_BUNDLE_DOCKER_PLATFORM:-}")" - fi - target_suffix="${target_suffix}${LOGOS_BLOCKCHAIN_NODE_TARGET_SUFFIX:-}" - NODE_TARGET="${ROOT_DIR}/.tmp/logos-blockchain-node-linux-target${target_suffix}" - fi - - NODE_SRC_DEFAULT="${ROOT_DIR}/.tmp/logos-blockchain-node-${PLATFORM}-src" - NODE_SRC="${LOGOS_BLOCKCHAIN_NODE_PATH:-${NODE_SRC_DEFAULT}}" - if [ -n "${LOGOS_BLOCKCHAIN_NODE_PATH}" ]; then - [ -d "${NODE_SRC}" ] || build_bundle::fail "LOGOS_BLOCKCHAIN_NODE_PATH does not exist: ${NODE_SRC}" - rm -rf "${NODE_SRC_DEFAULT}" - if [ -d "${NODE_TARGET}" ]; then - find "${NODE_TARGET}" -mindepth 1 -maxdepth 1 -exec rm -rf {} + - fi - NODE_TARGET="${NODE_TARGET}-local" - fi - - NODE_BIN="${NODE_TARGET}/debug/logos-blockchain-node" -} - -build_bundle::build_binaries() { - BUILD_FEATURES_LABEL="all,high-active-slot-coefficient,verification-keys" - echo "==> Building binaries (platform=${PLATFORM})" - mkdir -p "${NODE_SRC}" - ( - cd "${NODE_SRC}" - if [ -d "${NODE_TARGET}" ]; then - if [ -n "${BUNDLE_IN_CONTAINER:-}" ]; then - find "${NODE_TARGET}" -mindepth 1 -maxdepth 1 -exec rm -rf {} + - else - rm -rf "${NODE_TARGET}" - fi - fi - if [ -n "${LOGOS_BLOCKCHAIN_NODE_PATH}" ]; then - echo "Using local logos-blockchain-node checkout at ${NODE_SRC} (no fetch/checkout)" - else - if [ ! -d "${NODE_SRC}/.git" ]; then - git clone https://github.com/logos-co/nomos-node.git "${NODE_SRC}" - fi - git fetch --depth 1 origin "${LOGOS_BLOCKCHAIN_NODE_REV}" - git checkout "${LOGOS_BLOCKCHAIN_NODE_REV}" - git reset --hard - git clean -fdx - fi - - if [ -z "${LOGOS_BLOCKCHAIN_NODE_PATH}" ]; then - build_bundle::apply_nomos_node_patches "${NODE_SRC}" - fi - if [ -n "${BUNDLE_RUSTUP_TOOLCHAIN}" ]; then - RUSTFLAGS='--cfg feature="high-active-slot-coefficient" --cfg feature="build-verification-key"' \ - CARGO_FEATURE_BUILD_VERIFICATION_KEY=1 \ - RUSTUP_TOOLCHAIN="${BUNDLE_RUSTUP_TOOLCHAIN}" \ - cargo build --all-features \ - -p logos-blockchain-node \ - --target-dir "${NODE_TARGET}" - else - RUSTFLAGS='--cfg feature="high-active-slot-coefficient" --cfg feature="build-verification-key"' \ - CARGO_FEATURE_BUILD_VERIFICATION_KEY=1 \ - cargo build --all-features \ - -p logos-blockchain-node \ - --target-dir "${NODE_TARGET}" - fi - ) -} - -build_bundle::package_bundle() { - echo "==> Packaging bundle" - local bundle_dir="${ROOT_DIR}/.tmp/nomos-bundle" - rm -rf "${bundle_dir}" - mkdir -p "${bundle_dir}/artifacts" - cp "${NODE_BIN}" "${bundle_dir}/artifacts/logos-blockchain-node" - { - echo "nomos_node_path=${LOGOS_BLOCKCHAIN_NODE_PATH:-}" - echo "nomos_node_rev=${LOGOS_BLOCKCHAIN_NODE_REV:-}" - if [ -d "${NODE_SRC}/.git" ] && command -v git >/dev/null 2>&1; then - echo "nomos_node_git_head=$(git -C "${NODE_SRC}" rev-parse HEAD 2>/dev/null || true)" - fi - echo "platform=${PLATFORM}" - echo "features=${BUILD_FEATURES_LABEL}" - } > "${bundle_dir}/artifacts/nomos-bundle-meta.env" - - mkdir -p "$(dirname "${OUTPUT}")" - if tar --help 2>/dev/null | grep -q -- '--no-mac-metadata'; then - tar --no-mac-metadata --no-xattrs -czf "${OUTPUT}" -C "${bundle_dir}" artifacts - elif tar --help 2>/dev/null | grep -q -- '--no-xattrs'; then - tar --no-xattrs -czf "${OUTPUT}" -C "${bundle_dir}" artifacts - else - tar -czf "${OUTPUT}" -C "${bundle_dir}" artifacts - fi - echo "Bundle created at ${OUTPUT}" - - if [[ "${BUILD_FEATURES_LABEL}" == "all" ]] || [[ "${BUILD_FEATURES_LABEL}" == *profiling* ]]; then - cat <<'EOF_PROF' -Profiling endpoints (enabled by --features profiling): - CPU pprof (SVG): curl "http://:8722/debug/pprof/profile?seconds=15&format=svg" -o profile.svg - CPU pprof (proto): go tool pprof -http=:8080 "http://:8722/debug/pprof/profile?seconds=15&format=proto" -EOF_PROF - fi -} - -build_bundle::main() { - build_bundle::load_env - build_bundle::clean_cargo_linux_cache - build_bundle::parse_args "$@" - build_bundle::validate_and_finalize - build_bundle::ensure_circuits - build_bundle::maybe_run_linux_build_in_docker - build_bundle::prepare_circuits - build_bundle::build_binaries - build_bundle::package_bundle -} - -if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then - build_bundle::main "$@" -fi diff --git a/scripts/build/build-linux-binaries.sh b/scripts/build/build-linux-binaries.sh deleted file mode 100755 index 7ea6995..0000000 --- a/scripts/build/build-linux-binaries.sh +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [ -z "${BASH_VERSION:-}" ]; then - exec bash "$0" "$@" -fi - -# shellcheck disable=SC1091 -. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib/common.sh" - -build_linux_binaries::usage() { - cat <<'EOF' -Usage: scripts/build/build-linux-binaries.sh [options] - -Builds a Linux bundle via scripts/build/build-bundle.sh, then stages artifacts into: - - logos/infra/assets/stack/bin - -Options: - --rev REV logos-blockchain-node git revision to build (overrides LOGOS_BLOCKCHAIN_NODE_REV) - --path DIR use local logos-blockchain-node checkout (skip fetch/checkout) - --features LIST extra cargo features (comma-separated); base includes "testing" - --docker-platform PLAT docker platform for the Linux build (e.g. linux/amd64, linux/arm64) - --tar PATH stage from an existing bundle tarball (skip build) - --output PATH where to write the bundle tarball when building (default: .tmp/nomos-binaries-linux-.tar.gz) - -h, --help show help - -Environment: - VERSION bundle version (default from versions.env) - LOGOS_BLOCKCHAIN_CIRCUITS_VERSION legacy alias for VERSION (supported) - LOGOS_BLOCKCHAIN_NODE_REV default logos-blockchain-node revision (from versions.env) -EOF -} - -build_linux_binaries::fail_with_usage() { - echo "$1" >&2 - build_linux_binaries::usage - exit 1 -} - -build_linux_binaries::load_env() { - ROOT_DIR="$(common::repo_root)" - export ROOT_DIR - - common::require_file "${ROOT_DIR}/versions.env" - # shellcheck disable=SC1091 - . "${ROOT_DIR}/versions.env" - common::maybe_source "${ROOT_DIR}/paths.env" - - DEFAULT_VERSION="${VERSION:?Missing VERSION in versions.env}" - VERSION="${VERSION:-${DEFAULT_VERSION}}" - if [ -n "${LOGOS_BLOCKCHAIN_CIRCUITS_VERSION:-}" ]; then - VERSION="${LOGOS_BLOCKCHAIN_CIRCUITS_VERSION}" - fi -} - -build_linux_binaries::parse_args() { - REV_OVERRIDE="" - PATH_OVERRIDE="" - EXTRA_FEATURES="" - DOCKER_PLATFORM="" - OUTPUT_TAR="" - INPUT_TAR="" - - while [ "$#" -gt 0 ]; do - case "$1" in - -h|--help) build_linux_binaries::usage; exit 0 ;; - --rev) REV_OVERRIDE="${2:-}"; shift 2 ;; - --rev=*) REV_OVERRIDE="${1#*=}"; shift ;; - --path) PATH_OVERRIDE="${2:-}"; shift 2 ;; - --path=*) PATH_OVERRIDE="${1#*=}"; shift ;; - --features) EXTRA_FEATURES="${2:-}"; shift 2 ;; - --features=*) EXTRA_FEATURES="${1#*=}"; shift ;; - --docker-platform) DOCKER_PLATFORM="${2:-}"; shift 2 ;; - --docker-platform=*) DOCKER_PLATFORM="${1#*=}"; shift ;; - --tar) INPUT_TAR="${2:-}"; shift 2 ;; - --tar=*) INPUT_TAR="${1#*=}"; shift ;; - --output|-o) OUTPUT_TAR="${2:-}"; shift 2 ;; - --output=*|-o=*) OUTPUT_TAR="${1#*=}"; shift ;; - *) build_linux_binaries::fail_with_usage "Unknown argument: $1" ;; - esac - done - - if [ -n "${REV_OVERRIDE}" ] && [ -n "${PATH_OVERRIDE}" ]; then - build_linux_binaries::fail_with_usage "Use either --rev or --path, not both" - fi - if [ -n "${INPUT_TAR}" ] && [ ! -f "${INPUT_TAR}" ]; then - build_linux_binaries::fail_with_usage "Bundle tarball not found: ${INPUT_TAR}" - fi - - if [ -z "${OUTPUT_TAR}" ]; then - OUTPUT_TAR="${ROOT_DIR}/.tmp/nomos-binaries-linux-${VERSION}.tar.gz" - elif [[ "${OUTPUT_TAR}" != /* ]]; then - OUTPUT_TAR="${ROOT_DIR}/${OUTPUT_TAR#./}" - fi -} - -build_linux_binaries::build_bundle_if_needed() { - if [ -n "${INPUT_TAR}" ]; then - BUNDLE_TAR="${INPUT_TAR}" - return 0 - fi - - mkdir -p "$(dirname "${OUTPUT_TAR}")" - BUILD_ARGS=(--platform linux --output "${OUTPUT_TAR}") - if [ -n "${REV_OVERRIDE}" ]; then - BUILD_ARGS+=(--rev "${REV_OVERRIDE}") - elif [ -n "${PATH_OVERRIDE}" ]; then - BUILD_ARGS+=(--path "${PATH_OVERRIDE}") - fi - if [ -n "${EXTRA_FEATURES}" ]; then - BUILD_ARGS+=(--features "${EXTRA_FEATURES}") - fi - if [ -n "${DOCKER_PLATFORM}" ]; then - BUILD_ARGS+=(--docker-platform "${DOCKER_PLATFORM}") - fi - - echo "==> Building Linux bundle" - VERSION="${VERSION}" "${ROOT_DIR}/scripts/build/build-bundle.sh" "${BUILD_ARGS[@]}" - - BUNDLE_TAR="${OUTPUT_TAR}" -} - -build_linux_binaries::stage_from_bundle() { - local tar_path="$1" - local extract_dir - extract_dir="$(common::tmpdir nomos-linux-bundle.XXXXXX)" - trap "rm -rf '${extract_dir}' 2>/dev/null || true" EXIT - - echo "==> Extracting ${tar_path}" - tar -xzf "${tar_path}" -C "${extract_dir}" - - local artifacts="${extract_dir}/artifacts" - [ -f "${artifacts}/logos-blockchain-node" ] || common::die "Missing logos-blockchain-node in bundle: ${tar_path}" - local bin_out="${ROOT_DIR}/logos/infra/assets/stack/bin" - - echo "==> Staging binaries to ${bin_out}" - mkdir -p "${bin_out}" - cp "${artifacts}/logos-blockchain-node" "${bin_out}/" - # If the tarball was produced inside Docker, it might be root-owned on the host. - chown -R "$(id -u)":"$(id -g)" "${bin_out}" 2>/dev/null || true -} - -build_linux_binaries::main() { - build_linux_binaries::load_env - build_linux_binaries::parse_args "$@" - build_linux_binaries::build_bundle_if_needed - build_linux_binaries::stage_from_bundle "${BUNDLE_TAR}" - - echo - echo "Binaries staged in ${ROOT_DIR}/logos/infra/assets/stack/bin" - echo "Bundle tarball: ${BUNDLE_TAR}" -} - -if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then - build_linux_binaries::main "$@" -fi diff --git a/scripts/build/build_test_image.sh b/scripts/build/build_test_image.sh deleted file mode 100755 index e43c7be..0000000 --- a/scripts/build/build_test_image.sh +++ /dev/null @@ -1,253 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [ -z "${BASH_VERSION:-}" ]; then - exec bash "$0" "$@" -fi - -# shellcheck disable=SC1091 -. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib/common.sh" - -build_test_image::usage() { - cat <<'USAGE' -Usage: scripts/build/build_test_image.sh [options] - -Builds the compose/k8s test image (bakes in binaries). - -Options: - --tag TAG Docker image tag (default: logos-blockchain-testing:local; or env IMAGE_TAG) - --version VERSION Bundle version tag (default: versions.env VERSION) - --dockerfile PATH Dockerfile path (default: logos/infra/assets/stack/Dockerfile.runtime) - --base-tag TAG Base image tag (default: logos-blockchain-testing:base) - --bundle-tar PATH Bundle tar containing artifacts/{nomos-*} (default: .tmp/nomos-binaries-linux-.tar.gz; or env LOGOS_BLOCKCHAIN_BINARIES_TAR) - --no-restore Do not restore binaries from bundle tar (forces Dockerfile to build/download as needed) - --print-config Print resolved configuration and exit - -h, --help Show this help and exit - -Env (legacy/compatible): - IMAGE_TAG, VERSION, LOGOS_BLOCKCHAIN_BINARIES_TAR -USAGE -} - -build_test_image::fail() { - common::die "$1" -} - -build_test_image::load_env() { - if [ -n "${ROOT_DIR:-}" ] && [ -f "${ROOT_DIR}/versions.env" ]; then - : # Use provided ROOT_DIR. - else - ROOT_DIR="$(common::repo_root)" - fi - export ROOT_DIR - - common::require_file "${ROOT_DIR}/versions.env" - # shellcheck disable=SC1091 - . "${ROOT_DIR}/versions.env" - common::maybe_source "${ROOT_DIR}/paths.env" - - DOCKERFILE_PATH_DEFAULT="${ROOT_DIR}/logos/infra/assets/stack/Dockerfile.runtime" - BASE_DOCKERFILE_PATH_DEFAULT="${ROOT_DIR}/logos/infra/assets/stack/Dockerfile.base" - IMAGE_TAG_DEFAULT="logos-blockchain-testing:local" - BASE_IMAGE_TAG_DEFAULT="logos-blockchain-testing:base" - - VERSION_DEFAULT="${VERSION:?Missing VERSION in versions.env}" - LOGOS_BLOCKCHAIN_NODE_REV="${LOGOS_BLOCKCHAIN_NODE_REV:?Missing LOGOS_BLOCKCHAIN_NODE_REV in versions.env}" -} - -build_test_image::parse_args() { - IMAGE_TAG="${IMAGE_TAG:-${IMAGE_TAG_DEFAULT}}" - VERSION_OVERRIDE="" - DOCKERFILE_PATH="${DOCKERFILE_PATH_DEFAULT}" - BASE_DOCKERFILE_PATH="${BASE_DOCKERFILE_PATH_DEFAULT}" - BASE_IMAGE_TAG="${BASE_IMAGE_TAG:-${BASE_IMAGE_TAG_DEFAULT}}" - BUNDLE_TAR_PATH="${LOGOS_BLOCKCHAIN_BINARIES_TAR:-}" - NO_RESTORE=0 - PRINT_CONFIG=0 - - while [ "$#" -gt 0 ]; do - case "$1" in - -h|--help) build_test_image::usage; exit 0 ;; - --tag=*) IMAGE_TAG="${1#*=}"; shift ;; - --tag) IMAGE_TAG="${2:-}"; shift 2 ;; - --version=*) VERSION_OVERRIDE="${1#*=}"; shift ;; - --version) VERSION_OVERRIDE="${2:-}"; shift 2 ;; - --dockerfile=*) DOCKERFILE_PATH="${1#*=}"; shift ;; - --dockerfile) DOCKERFILE_PATH="${2:-}"; shift 2 ;; - --base-tag=*) BASE_IMAGE_TAG="${1#*=}"; shift ;; - --base-tag) BASE_IMAGE_TAG="${2:-}"; shift 2 ;; - --bundle-tar=*) BUNDLE_TAR_PATH="${1#*=}"; shift ;; - --bundle-tar) BUNDLE_TAR_PATH="${2:-}"; shift 2 ;; - --no-restore) NO_RESTORE=1; shift ;; - --print-config) PRINT_CONFIG=1; shift ;; - *) build_test_image::fail "Unknown argument: $1" ;; - esac - done - - if [ -n "${VERSION_OVERRIDE}" ]; then - VERSION="${VERSION_OVERRIDE}" - else - VERSION="${VERSION_DEFAULT}" - fi - - BIN_DST="${ROOT_DIR}/logos/infra/assets/stack/bin" - - DEFAULT_LINUX_TAR="${ROOT_DIR}/.tmp/nomos-binaries-linux-${VERSION}.tar.gz" - TAR_PATH="${BUNDLE_TAR_PATH:-${DEFAULT_LINUX_TAR}}" - - LOGOS_BLOCKCHAIN_NODE_PATH="${LOGOS_BLOCKCHAIN_NODE_PATH:-}" - if [ -n "${LOGOS_BLOCKCHAIN_NODE_PATH}" ] && [ ! -d "${LOGOS_BLOCKCHAIN_NODE_PATH}" ]; then - build_test_image::fail "LOGOS_BLOCKCHAIN_NODE_PATH does not exist: ${LOGOS_BLOCKCHAIN_NODE_PATH}" - fi -} - -build_test_image::print_config() { - echo "Workspace root: ${ROOT_DIR}" - echo "Image tag: ${IMAGE_TAG}" - echo "Dockerfile: ${DOCKERFILE_PATH}" - echo "Base image tag: ${BASE_IMAGE_TAG}" - echo "Base Dockerfile: ${BASE_DOCKERFILE_PATH}" - echo "Logos node rev: ${LOGOS_BLOCKCHAIN_NODE_REV}" - echo "Logos node path: ${LOGOS_BLOCKCHAIN_NODE_PATH:-}" - echo "Binaries dir: ${BIN_DST}" - echo "Bundle tar (if used): ${TAR_PATH}" - echo "Restore from tar: $([ "${NO_RESTORE}" -eq 1 ] && echo "disabled" || echo "enabled")" -} - -build_test_image::have_host_binaries() { - # Preserve existing behavior: only require node on the host. - [ -x "${BIN_DST}/logos-blockchain-node" ] -} - -build_test_image::restore_from_bundle() { - [ -f "${TAR_PATH}" ] || build_test_image::fail "Prebuilt binaries missing and bundle tar not found at ${TAR_PATH}" - - echo "==> Restoring binaries from ${TAR_PATH}" - local tmp_extract - tmp_extract="$(common::tmpdir nomos-bundle-extract.XXXXXX)" - trap "rm -rf -- '${tmp_extract}'" RETURN - - tar -xzf "${TAR_PATH}" -C "${tmp_extract}" - local artifacts="${tmp_extract}/artifacts" - - [ -f "${artifacts}/logos-blockchain-node" ] || build_test_image::fail \ - "Bundle ${TAR_PATH} missing artifacts/logos-blockchain-node" - - mkdir -p "${BIN_DST}" - cp "${artifacts}/logos-blockchain-node" "${BIN_DST}/" - chmod +x "${BIN_DST}/logos-blockchain-node" || true - -} - -build_test_image::maybe_restore_assets() { - if [ "${NO_RESTORE}" -eq 1 ]; then - return 0 - fi - if build_test_image::have_host_binaries; then - return 0 - fi - build_test_image::restore_from_bundle -} - -build_test_image::docker_build() { - command -v docker >/dev/null 2>&1 || build_test_image::fail "docker not found in PATH" - [ -f "${DOCKERFILE_PATH}" ] || build_test_image::fail "Dockerfile not found: ${DOCKERFILE_PATH}" - - [ -f "${BASE_DOCKERFILE_PATH}" ] || build_test_image::fail "Base Dockerfile not found: ${BASE_DOCKERFILE_PATH}" - - local host_platform="" - local target_platform="" - case "$(uname -m)" in - x86_64) host_platform="linux/amd64" ;; - arm64|aarch64) host_platform="linux/arm64" ;; - esac - - if [ -n "${DOCKER_PLATFORM:-}" ]; then - target_platform="${DOCKER_PLATFORM}" - elif [ -n "${COMPOSE_CIRCUITS_PLATFORM:-}" ] || [ -n "${CIRCUITS_PLATFORM:-}" ]; then - case "${COMPOSE_CIRCUITS_PLATFORM:-${CIRCUITS_PLATFORM}}" in - linux-x86_64) target_platform="linux/amd64" ;; - linux-aarch64) target_platform="linux/arm64" ;; - esac - fi - if [ -z "${target_platform}" ] && [ -n "${host_platform}" ]; then - # Prefer native builds to avoid emulation issues in rapidsnark/prover. - target_platform="${host_platform}" - fi - - local -a base_build_args=( - -f "${BASE_DOCKERFILE_PATH}" - -t "${BASE_IMAGE_TAG}" - --build-arg "LOGOS_BLOCKCHAIN_NODE_REV=${LOGOS_BLOCKCHAIN_NODE_REV}" - --build-arg "LOGOS_BLOCKCHAIN_NODE_USE_LOCAL_CONTEXT=$([ -n "${LOGOS_BLOCKCHAIN_NODE_PATH}" ] && echo 1 || echo 0)" - --build-arg "VERSION=${VERSION}" - ) - local node_context_path="${LOGOS_BLOCKCHAIN_NODE_PATH:-${ROOT_DIR}}" - base_build_args+=(--build-context "nomos_node=${node_context_path}") - if [ -n "${LOGOS_BLOCKCHAIN_FORCE_BUILD:-}" ]; then - base_build_args+=(--build-arg "LOGOS_BLOCKCHAIN_FORCE_BUILD=${LOGOS_BLOCKCHAIN_FORCE_BUILD}") - fi - if [ -n "${host_platform}" ] && [ -n "${target_platform}" ] && [ "${host_platform}" != "${target_platform}" ]; then - base_build_args+=(--platform "${target_platform}") - fi - base_build_args+=("${ROOT_DIR}") - - printf "Running:" - printf " %q" docker build "${base_build_args[@]}" - echo - build_test_image::docker_build_with_retry "${base_build_args[@]}" - - local -a final_build_args=( - -f "${DOCKERFILE_PATH}" - -t "${IMAGE_TAG}" - --build-arg "BASE_IMAGE=${BASE_IMAGE_TAG}" - "${ROOT_DIR}" - ) - if [ -n "${host_platform}" ] && [ -n "${target_platform}" ] && [ "${host_platform}" != "${target_platform}" ]; then - final_build_args+=(--platform "${target_platform}") - fi - printf "Running:" - printf " %q" docker build "${final_build_args[@]}" - echo - build_test_image::docker_build_with_retry "${final_build_args[@]}" -} - -build_test_image::docker_build_with_retry() { - local max_attempts=3 - local attempt - for attempt in $(seq 1 "${max_attempts}"); do - if docker build "$@"; then - return 0 - fi - if [ "${attempt}" -lt "${max_attempts}" ]; then - local backoff=$((attempt * 5)) - echo "docker build failed (attempt ${attempt}/${max_attempts}); retrying in ${backoff}s..." - sleep "${backoff}" - fi - done - build_test_image::fail "docker build failed after ${max_attempts} attempts" -} - -build_test_image::main() { - build_test_image::load_env - build_test_image::parse_args "$@" - - if [ "${PRINT_CONFIG}" -eq 1 ]; then - build_test_image::print_config - exit 0 - fi - - build_test_image::print_config - build_test_image::maybe_restore_assets - build_test_image::docker_build - - cat <&2 - exit 1 -fi - -cargo_revs="$( - grep -oE "git *= *\"${logos_git}\" *, *rev *= *\"[0-9a-f]{40}\"" "$cargo_toml" \ - | sed -E 's/.*rev *= *"([0-9a-f]{40})"/\1/' \ - | sort -u -)" - -if [ -z "$cargo_revs" ]; then - echo "node-rev-sync check failed: no logos-blockchain git rev found in Cargo.toml" >&2 - exit 1 -fi - -rev_count="$(printf '%s\n' "$cargo_revs" | wc -l | tr -d ' ')" -if [ "$rev_count" -ne 1 ]; then - echo "node-rev-sync check failed: multiple logos-blockchain revs found in Cargo.toml:" >&2 - printf ' %s\n' "$cargo_revs" >&2 - exit 1 -fi - -cargo_rev="$(printf '%s\n' "$cargo_revs")" -if [ "$env_rev" != "$cargo_rev" ]; then - echo "node-rev-sync check failed:" >&2 - echo " versions.env LOGOS_BLOCKCHAIN_NODE_REV: $env_rev" >&2 - echo " Cargo.toml logos-blockchain rev: $cargo_rev" >&2 - echo " Fix: set LOGOS_BLOCKCHAIN_NODE_REV to match Cargo.toml." >&2 - exit 1 -fi diff --git a/scripts/lib/common.sh b/scripts/lib/common.sh index f07523c..17c1f85 100755 --- a/scripts/lib/common.sh +++ b/scripts/lib/common.sh @@ -14,12 +14,12 @@ common::repo_root() { local dir dir="$(cd "$(dirname "${caller_source}")" && pwd)" while true; do - if [ -f "${dir}/versions.env" ]; then + if [ -f "${dir}/Cargo.toml" ] && grep -q '^\[workspace\]' "${dir}/Cargo.toml" 2>/dev/null; then echo "${dir}" return 0 fi if [ "${dir}" = "/" ]; then - common::die "Could not locate repo root (versions.env) from ${caller_source}" + common::die "Could not locate repo root (workspace Cargo.toml) from ${caller_source}" fi dir="$(cd "${dir}/.." && pwd)" done diff --git a/scripts/observability/compose/docker-compose.yml b/scripts/observability/compose/docker-compose.yml index eb03ae6..511731b 100644 --- a/scripts/observability/compose/docker-compose.yml +++ b/scripts/observability/compose/docker-compose.yml @@ -4,7 +4,6 @@ services: command: - --config.file=/etc/prometheus/prometheus.yml - --storage.tsdb.path=/prometheus - # Exposes OTLP HTTP ingest at /api/v1/otlp/v1/metrics - --enable-feature=otlp-write-receiver - --web.enable-lifecycle - --web.enable-admin-api @@ -18,21 +17,12 @@ services: image: grafana/grafana:11.4.0 depends_on: - prometheus - env_file: - - ../../../logos/infra/assets/stack/monitoring/grafana/plugins.env environment: GF_SECURITY_ADMIN_USER: admin GF_SECURITY_ADMIN_PASSWORD: admin GF_USERS_ALLOW_SIGN_UP: "false" - volumes: - - grafana-data:/var/lib/grafana - - ../../../logos/infra/assets/stack/monitoring/grafana/grafana.ini:/etc/grafana/grafana.ini:ro - - ../../../logos/infra/assets/stack/monitoring/grafana/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro - - ../../../logos/infra/assets/stack/monitoring/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml:ro - - ../../../logos/infra/assets/stack/monitoring/grafana/dashboards:/var/lib/grafana/dashboards:ro ports: - "3000:3000" volumes: prometheus-data: {} - grafana-data: {} diff --git a/scripts/observability/compose/prometheus/prometheus.yml b/scripts/observability/compose/prometheus/prometheus.yml index 6ca46b2..1439d23 100644 --- a/scripts/observability/compose/prometheus/prometheus.yml +++ b/scripts/observability/compose/prometheus/prometheus.yml @@ -1,8 +1,5 @@ global: scrape_interval: 15s - evaluation_interval: 15s - external_labels: - monitor: "NomosTesting" scrape_configs: - job_name: prometheus diff --git a/scripts/observability/deploy.sh b/scripts/observability/deploy.sh old mode 100755 new mode 100644 index a199c34..91415ef --- a/scripts/observability/deploy.sh +++ b/scripts/observability/deploy.sh @@ -12,19 +12,11 @@ usage() { cat <<'USAGE' Usage: scripts/observability/deploy.sh --target compose --action up|down|logs|env - scripts/observability/deploy.sh --target k8s --action install|uninstall|dashboards|env + scripts/observability/deploy.sh --target k8s --action install|uninstall|env Short flags: -t, --target compose|k8s -a, --action (see above) - -Examples: - scripts/observability/deploy.sh -t compose -a up - eval "$(scripts/observability/deploy.sh -t compose -a env)" - - scripts/observability/deploy.sh -t k8s -a install - scripts/observability/deploy.sh -t k8s -a dashboards - scripts/observability/deploy.sh -t k8s -a env USAGE } @@ -63,7 +55,7 @@ case "${target}" in ;; k8s) case "${action}" in - install|uninstall|dashboards|env) ;; + install|uninstall|env) ;; *) die_usage "Invalid k8s action: ${action}" ;; esac ;; @@ -73,4 +65,3 @@ case "${target}" in esac exec "${ROOT}/scripts/setup/setup-observability.sh" "${target}" "${action}" - diff --git a/scripts/observability/k8s/kube-prometheus-stack.values.yaml b/scripts/observability/k8s/kube-prometheus-stack.values.yaml index 533f4aa..96e04d0 100644 --- a/scripts/observability/k8s/kube-prometheus-stack.values.yaml +++ b/scripts/observability/k8s/kube-prometheus-stack.values.yaml @@ -3,17 +3,8 @@ prometheus: enableOTLPReceiver: true additionalArgs: - name: web.enable-admin-api - # Basic OTLP → Prometheus translation defaults are fine for most setups. - # See: https://prometheus.io/docs/guides/opentelemetry/ otlp: {} grafana: adminUser: admin adminPassword: admin - sidecar: - dashboards: - enabled: true - label: grafana_dashboard - labelValue: "1" - datasources: - enabled: true diff --git a/scripts/ops/push-ecr-test.sh b/scripts/ops/push-ecr-test.sh deleted file mode 100755 index 67609a4..0000000 --- a/scripts/ops/push-ecr-test.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" - -readonly DEFAULT_TAG="test" -readonly DEFAULT_ECR_IMAGE_REPO="public.ecr.aws/r4s5t9y4/logos/logos-blockchain" -readonly DEFAULT_AWS_REGION="us-east-1" -readonly DEFAULT_LOCAL_IMAGE_REPO="logos-blockchain-testing" -readonly DEFAULT_DOCKER_PLATFORM="linux/amd64" -readonly DEFAULT_CIRCUITS_PLATFORM="linux-x86_64" -readonly PUBLIC_ECR_HOST="public.ecr.aws" - -# Publishes the testnet image to ECR Public by default. -# -# Env overrides: -# TAG - image tag (default: test) -# ECR_IMAGE_REPO - full repo path without tag (default: public.ecr.aws/r4s5t9y4/logos/logos-blockchain) -# AWS_REGION - AWS region for ecr-public login (default: us-east-1) -# -# Legacy (private ECR) overrides: -# AWS_ACCOUNT_ID - if set, uses private ECR login/push unless ECR_IMAGE_REPO points at public.ecr.aws - -TAG="${TAG:-${DEFAULT_TAG}}" -ECR_IMAGE_REPO="${ECR_IMAGE_REPO:-${DEFAULT_ECR_IMAGE_REPO}}" -AWS_REGION="${AWS_REGION:-${DEFAULT_AWS_REGION}}" - -LOCAL_IMAGE="${LOCAL_IMAGE:-${DEFAULT_LOCAL_IMAGE_REPO}:${TAG}}" -REMOTE_IMAGE="${ECR_IMAGE_REPO}:${TAG}" - -export DOCKER_DEFAULT_PLATFORM="${DEFAULT_DOCKER_PLATFORM}" -export CIRCUITS_PLATFORM="${CIRCUITS_PLATFORM:-${DEFAULT_CIRCUITS_PLATFORM}}" -export IMAGE_TAG="${REMOTE_IMAGE}" - - "${ROOT_DIR}/scripts/build/build_test_image.sh" --dockerfile "${ROOT_DIR}/logos/infra/assets/stack/Dockerfile.testnet" - -if [[ "${ECR_IMAGE_REPO}" == ${PUBLIC_ECR_HOST}/* ]]; then - aws ecr-public get-login-password --region "${AWS_REGION}" \ - | docker login --username AWS --password-stdin "${PUBLIC_ECR_HOST}" -else - if [ -z "${AWS_ACCOUNT_ID:-}" ]; then - echo "ERROR: AWS_ACCOUNT_ID must be set for private ECR pushes (or set ECR_IMAGE_REPO=${PUBLIC_ECR_HOST}/...)" >&2 - exit 1 - fi - ECR_REGISTRY="${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com" - aws ecr get-login-password --region "${AWS_REGION}" \ - | docker login --username AWS --password-stdin "${ECR_REGISTRY}" - docker tag "${REMOTE_IMAGE}" "${ECR_REGISTRY}/${REMOTE_IMAGE#*/}" - REMOTE_IMAGE="${ECR_REGISTRY}/${REMOTE_IMAGE#*/}" -fi - -docker push "${REMOTE_IMAGE}" - -echo "${REMOTE_IMAGE}" diff --git a/scripts/ops/update-nomos-rev.sh b/scripts/ops/update-nomos-rev.sh deleted file mode 100755 index 79b6bce..0000000 --- a/scripts/ops/update-nomos-rev.sh +++ /dev/null @@ -1,249 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [ -z "${BASH_VERSION:-}" ]; then - exec bash "$0" "$@" -fi - -# shellcheck disable=SC1091 -. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib/common.sh" - -update_nomos_rev::usage() { - cat <<'EOF' -Usage: - scripts/ops/update-nomos-rev.sh --rev - scripts/ops/update-nomos-rev.sh --path - scripts/ops/update-nomos-rev.sh --unskip-worktree - -Notes: - --rev sets LOGOS_BLOCKCHAIN_NODE_REV and updates Cargo.toml revs - --path sets LOGOS_BLOCKCHAIN_NODE_PATH (clears LOGOS_BLOCKCHAIN_NODE_REV) and patches Cargo.toml to use a local logos-blockchain-node checkout - --unskip-worktree clears any skip-worktree flag for Cargo.toml - Only one may be used at a time. -EOF -} - -update_nomos_rev::fail_with_usage() { - echo "$1" >&2 - update_nomos_rev::usage - exit 1 -} - -update_nomos_rev::maybe_unskip_worktree() { - local file="$1" - if git -C "${ROOT_DIR}" rev-parse --is-inside-work-tree >/dev/null 2>&1; then - git -C "${ROOT_DIR}" update-index --no-skip-worktree "${file}" >/dev/null 2>&1 || true - fi -} - -update_nomos_rev::maybe_skip_worktree() { - local file="$1" - if git -C "${ROOT_DIR}" rev-parse --is-inside-work-tree >/dev/null 2>&1; then - git -C "${ROOT_DIR}" update-index --skip-worktree "${file}" >/dev/null 2>&1 || true - fi -} - -update_nomos_rev::ensure_env_key() { - local key="$1" default_value="$2" - if ! grep -Eq "^#?[[:space:]]*${key}=" "${ROOT_DIR}/versions.env"; then - echo "${default_value}" >> "${ROOT_DIR}/versions.env" - fi -} - -update_nomos_rev::parse_args() { - REV="" - LOCAL_PATH="" - UNSKIP_WORKTREE=0 - - while [ "$#" -gt 0 ]; do - case "$1" in - --rev) REV="${2:-}"; shift 2 ;; - --path) LOCAL_PATH="${2:-}"; shift 2 ;; - --unskip-worktree) UNSKIP_WORKTREE=1; shift ;; - -h|--help) update_nomos_rev::usage; exit 0 ;; - *) update_nomos_rev::fail_with_usage "Unknown arg: $1" ;; - esac - done - - if [ "${UNSKIP_WORKTREE}" -eq 1 ] && { [ -n "${REV}" ] || [ -n "${LOCAL_PATH}" ]; }; then - update_nomos_rev::fail_with_usage "Use --unskip-worktree alone." - fi - if [ -n "${REV}" ] && [ -n "${LOCAL_PATH}" ]; then - update_nomos_rev::fail_with_usage "Use either --rev or --path, not both" - fi - if [ -z "${REV}" ] && [ -z "${LOCAL_PATH}" ] && [ "${UNSKIP_WORKTREE}" -eq 0 ]; then - update_nomos_rev::usage - exit 1 - fi -} - -update_nomos_rev::load_env() { - ROOT_DIR="$(common::repo_root)" - export ROOT_DIR - common::require_file "${ROOT_DIR}/versions.env" -} - -update_nomos_rev::update_to_rev() { - local rev="$1" - echo "Updating logos-blockchain-node rev to ${rev}" - - sed -i.bak -E \ - -e "s/^#?[[:space:]]*LOGOS_BLOCKCHAIN_NODE_REV=.*/LOGOS_BLOCKCHAIN_NODE_REV=${rev}/" \ - -e "s/^#?[[:space:]]*LOGOS_BLOCKCHAIN_NODE_PATH=.*/# LOGOS_BLOCKCHAIN_NODE_PATH=/" \ - "${ROOT_DIR}/versions.env" - rm -f "${ROOT_DIR}/versions.env.bak" - - python3 - "${ROOT_DIR}" "${rev}" <<'PY' -import pathlib, re, sys -root = pathlib.Path(sys.argv[1]) -rev = sys.argv[2] -cargo_toml = root / "Cargo.toml" -txt = cargo_toml.read_text() -txt = txt.replace("\\n", "\n") -txt = re.sub( - r'(?ms)^\[patch\."https://github\.com/logos-co/nomos-node"\].*?(?=^\[|\Z)', - "", - txt, -) -txt = re.sub( - r'(git = "https://github\.com/logos-co/nomos-node\.git", rev = ")[^"]+(")', - r"\g<1>" + rev + r"\2", - txt, -) -cargo_toml.write_text(txt.rstrip() + "\n") -PY - - update_nomos_rev::maybe_unskip_worktree "Cargo.toml" -} - -update_nomos_rev::update_to_path() { - local node_path="$1" - echo "Pointing to local logos-blockchain-node at ${node_path}" - - [ -d "${node_path}" ] || common::die "path does not exist: ${node_path}" - - local current_rev escaped_path - current_rev="$(grep -E '^[#[:space:]]*LOGOS_BLOCKCHAIN_NODE_REV=' "${ROOT_DIR}/versions.env" | head -n1 | sed -E 's/^#?[[:space:]]*LOGOS_BLOCKCHAIN_NODE_REV=//')" - escaped_path="${node_path//\//\\/}" - - sed -i.bak -E \ - -e "s/^#?[[:space:]]*LOGOS_BLOCKCHAIN_NODE_PATH=.*/LOGOS_BLOCKCHAIN_NODE_PATH=${escaped_path}/" \ - -e "s/^#?[[:space:]]*LOGOS_BLOCKCHAIN_NODE_REV=.*/# LOGOS_BLOCKCHAIN_NODE_REV=${current_rev}/" \ - "${ROOT_DIR}/versions.env" - rm -f "${ROOT_DIR}/versions.env.bak" - - local python_bin="${PYTHON_BIN:-python3}" - command -v "${python_bin}" >/dev/null 2>&1 || common::die "python3 is required to patch Cargo.toml for local paths" - - "${python_bin}" - "${ROOT_DIR}" "${node_path}" <<'PY' -import json -import pathlib -import re -import subprocess -import sys - -root = pathlib.Path(sys.argv[1]) -node_path = pathlib.Path(sys.argv[2]) - -targets = [ - "logos-blockchain-api-service", - "logos-blockchain-blend-message", - "logos-blockchain-blend-service", - "logos-blockchain-chain-broadcast-service", - "logos-blockchain-chain-leader-service", - "logos-blockchain-chain-network-service", - "logos-blockchain-chain-service", - "logos-blockchain-common-http-client", - "logos-blockchain-cryptarchia-engine", - "logos-blockchain-cryptarchia-sync", - "logos-blockchain-groth16", - "logos-blockchain-http-api-common", - "logos-blockchain-key-management-system-service", - "logos-blockchain-ledger", - "logos-blockchain-libp2p", - "logos-blockchain-network-service", - "logos-blockchain-node", - "logos-blockchain-poc", - "logos-blockchain-pol", - "logos-blockchain-sdp-service", - "logos-blockchain-tests", - "logos-blockchain-time-service", - "logos-blockchain-tracing", - "logos-blockchain-tracing-service", - "logos-blockchain-tx-service", - "logos-blockchain-utils", - "logos-blockchain-wallet", - "logos-blockchain-wallet-service", - "logos-blockchain-zksign", -] - -try: - meta = subprocess.check_output( - ["cargo", "metadata", "--format-version", "1", "--no-deps"], - cwd=node_path, - ) -except subprocess.CalledProcessError as exc: - sys.stderr.write(f"Failed to run cargo metadata in {node_path}: {exc}\n") - sys.exit(1) - -data = json.loads(meta) -paths = {} -for pkg in data.get("packages", []): - paths[pkg["name"]] = str(pathlib.Path(pkg["manifest_path"]).parent) - -patch_lines = ['[patch."https://github.com/logos-co/nomos-node"]'] -missing = [] -for name in targets: - if name in paths: - patch_lines.append(f'{name} = {{ path = "{paths[name]}" }}') - else: - missing.append(name) - -cargo_toml = root / "Cargo.toml" -txt = cargo_toml.read_text() -txt = txt.replace("\\n", "\n") -txt = re.sub( - r'(?ms)^\[patch\."https://github\.com/logos-co/nomos-node"\].*?(?=^\[|\Z)', - "", - txt, -) -txt = txt.rstrip() + "\n\n" + "\n".join(patch_lines) + "\n" -cargo_toml.write_text(txt) - -if missing: - sys.stderr.write( - "Warning: missing crates in local logos-blockchain-node checkout: " - + ", ".join(missing) - + "\n" - ) -PY - - update_nomos_rev::maybe_skip_worktree "Cargo.toml" - echo "Local logos-blockchain-node patch applied; Cargo.toml marked skip-worktree (run --unskip-worktree to clear)." -} - -update_nomos_rev::main() { - update_nomos_rev::load_env - update_nomos_rev::parse_args "$@" - - update_nomos_rev::ensure_env_key "LOGOS_BLOCKCHAIN_NODE_REV" "# LOGOS_BLOCKCHAIN_NODE_REV=" - update_nomos_rev::ensure_env_key "LOGOS_BLOCKCHAIN_NODE_PATH" "# LOGOS_BLOCKCHAIN_NODE_PATH=" - - if [ "${UNSKIP_WORKTREE}" -eq 1 ]; then - update_nomos_rev::maybe_unskip_worktree "Cargo.toml" - echo "Cleared skip-worktree on Cargo.toml (if it was set)." - exit 0 - fi - - if [ -n "${REV}" ]; then - update_nomos_rev::update_to_rev "${REV}" - else - update_nomos_rev::update_to_path "${LOCAL_PATH}" - fi - - echo "Done. Consider updating Cargo.lock if needed (cargo fetch)." -} - -if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then - update_nomos_rev::main "$@" -fi diff --git a/scripts/run/checks.sh b/scripts/run/checks.sh index 26077a6..32e0adc 100755 --- a/scripts/run/checks.sh +++ b/scripts/run/checks.sh @@ -31,10 +31,6 @@ checks::load_env() { ROOT_DIR="$(common::repo_root)" export ROOT_DIR - if [ -f "${ROOT_DIR}/versions.env" ]; then - # shellcheck disable=SC1091 - . "${ROOT_DIR}/versions.env" - fi if [ -f "${ROOT_DIR}/paths.env" ]; then # shellcheck disable=SC1091 . "${ROOT_DIR}/paths.env" @@ -44,17 +40,6 @@ checks::load_env() { checks::print_workspace() { checks::section "Workspace" checks::say "root: ${ROOT_DIR}" - if [ -f "${ROOT_DIR}/versions.env" ]; then - checks::ok "versions.env present" - checks::say "VERSION=${VERSION:-}" - checks::say "LOGOS_BLOCKCHAIN_NODE_REV=${LOGOS_BLOCKCHAIN_NODE_REV:-}" - if [ -n "${LOGOS_BLOCKCHAIN_NODE_PATH:-}" ]; then - checks::say "LOGOS_BLOCKCHAIN_NODE_PATH=${LOGOS_BLOCKCHAIN_NODE_PATH}" - fi - else - checks::warn "versions.env missing (scripts depend on it)" - fi - if [ -f "${ROOT_DIR}/paths.env" ]; then checks::ok "paths.env present" fi @@ -140,7 +125,7 @@ checks::print_docker() { if docker image inspect "${image}" >/dev/null 2>&1; then checks::ok "testnet image present locally" else - checks::warn "testnet image not present locally (compose/k8s runs will rebuild or fail if LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD=1)" + checks::warn "testnet image not present locally (compose/k8s runs will fail until you provide a reachable image)" fi } @@ -248,7 +233,6 @@ checks::print_docker_desktop_kubernetes_health() { checks::print_debug_flags() { checks::section "Runner Debug Flags (optional)" checks::say "SLOW_TEST_ENV=${SLOW_TEST_ENV:-} (if true: doubles readiness timeouts)" - checks::say "LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD=${LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD:-} (compose/k8s)" checks::say "COMPOSE_RUNNER_PRESERVE=${COMPOSE_RUNNER_PRESERVE:-} (compose)" checks::say "K8S_RUNNER_PRESERVE=${K8S_RUNNER_PRESERVE:-} (k8s)" checks::say "K8S_RUNNER_DEBUG=${K8S_RUNNER_DEBUG:-} (k8s helm debug)" @@ -274,7 +258,7 @@ checks::main() { checks::print_debug_flags checks::section "Done" - checks::say "If something looks off, start with: scripts/run/run-examples.sh -t 60 -n 1" + checks::say "If something looks off, start with: cargo check -p testing-framework-runner-compose -p testing-framework-runner-k8s -p testing-framework-runner-local" } if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then diff --git a/scripts/run/run-examples.sh b/scripts/run/run-examples.sh deleted file mode 100755 index 66ce750..0000000 --- a/scripts/run/run-examples.sh +++ /dev/null @@ -1,589 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [ -z "${BASH_VERSION:-}" ]; then - exec bash "$0" "$@" -fi - -# shellcheck disable=SC1091 -. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib/common.sh" - -readonly DEFAULT_LOCAL_IMAGE="logos-blockchain-testing:local" -readonly DEFAULT_PUBLIC_ECR_REGISTRY="public.ecr.aws/r4s5t9y4" -readonly DEFAULT_PUBLIC_ECR_REPO="logos/logos-blockchain" -readonly DEFAULT_PRIVATE_ECR_REPO="logos-blockchain-testing" -readonly DEFAULT_ECR_TAG="test" -readonly DEFAULT_PRIVATE_AWS_REGION="ap-southeast-2" - -readonly DEFAULT_PULL_POLICY_LOCAL="IfNotPresent" -readonly DEFAULT_PULL_POLICY_ECR="Always" -readonly DOCKER_DESKTOP_CONTEXT="docker-desktop" -readonly DEFAULT_K8S_ECR_SKIP_IMAGE_BUILD="1" - -run_examples::cleanup() { - rm -f "${SETUP_OUT:-}" 2>/dev/null || true -} - -# Avoid inheriting environment-provided EXIT traps (e.g., from BASH_ENV) that can -# reference missing functions and fail at script termination. -trap run_examples::cleanup EXIT - -run_examples::usage() { - cat <-.tar.gz) - LOGOS_BLOCKCHAIN_CIRCUITS Directory containing circuits assets (defaults to ~/.logos-blockchain-circuits) - CARGO_FEATURE_BUILD_VERIFICATION_KEY Build flag to embed Groth16 verification keys in node binaries (recommended for host) - LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD Set to 1 to skip rebuilding the compose/k8s image - LOGOS_BLOCKCHAIN_FORCE_IMAGE_BUILD Set to 1 to force image rebuild even for k8s ECR mode - LOGOS_BLOCKCHAIN_METRICS_QUERY_URL PromQL base URL for the runner process (optional) - LOGOS_BLOCKCHAIN_METRICS_OTLP_INGEST_URL Full OTLP HTTP ingest URL for node metrics export (optional) - LOGOS_BLOCKCHAIN_GRAFANA_URL Grafana base URL for printing/logging (optional) - -Notes: - - For k8s runs on non-docker-desktop clusters (e.g. EKS), a locally built Docker image is not - visible to the cluster. By default, this script skips local image rebuilds in that case. - If you need a custom image, run scripts/build/build_test_image.sh and push it to a registry the - cluster can pull from, then set LOGOS_BLOCKCHAIN_TESTNET_IMAGE accordingly. -EOF -} - -run_examples::fail_with_usage() { - echo "$1" >&2 - run_examples::usage - exit 1 -} - -run_examples::load_env() { - ROOT_DIR="$(common::repo_root)" - export ROOT_DIR - - local env_version="${VERSION:-}" - local env_node_rev="${LOGOS_BLOCKCHAIN_NODE_REV:-}" - local env_node_path="${LOGOS_BLOCKCHAIN_NODE_PATH:-}" - - common::require_file "${ROOT_DIR}/versions.env" - # shellcheck disable=SC1091 - . "${ROOT_DIR}/versions.env" - common::maybe_source "${ROOT_DIR}/paths.env" - - if [ -n "${env_version}" ]; then - VERSION="${env_version}" - fi - if [ -n "${env_node_rev}" ]; then - LOGOS_BLOCKCHAIN_NODE_REV="${env_node_rev}" - fi - if [ -n "${env_node_path}" ]; then - LOGOS_BLOCKCHAIN_NODE_PATH="${env_node_path}" - fi - - DEFAULT_VERSION="${VERSION:?Missing VERSION in versions.env}" - VERSION="${VERSION:-${DEFAULT_VERSION}}" - -} - -run_examples::apply_platform_defaults() { - local arch - arch="$(uname -m)" - - case "${arch}" in - arm64|aarch64) - if [ "${MODE}" != "host" ]; then - if [ -z "${LOGOS_BLOCKCHAIN_BIN_PLATFORM:-}" ]; then - export LOGOS_BLOCKCHAIN_BIN_PLATFORM="linux/arm64" - fi - if [ -z "${COMPOSE_CIRCUITS_PLATFORM:-}" ]; then - export COMPOSE_CIRCUITS_PLATFORM="linux-aarch64" - fi - fi - ;; - esac -} - -run_examples::select_bin() { - case "${MODE}" in - compose) BIN="compose_runner" ;; - host) BIN="local_runner" ;; - k8s) BIN="k8s_runner" ;; - *) common::die "Unknown mode '${MODE}' (use compose|host|k8s)" ;; - esac -} - -run_examples::parse_args() { - MODE="compose" - RUN_SECS_RAW="" - DEMO_NODES="" - IMAGE_SELECTION_MODE="auto" - METRICS_QUERY_URL="" - METRICS_OTLP_INGEST_URL="" - - RUN_SECS_RAW_SPECIFIED="" - - while [ "$#" -gt 0 ]; do - case "$1" in - -h|--help) - run_examples::usage - exit 0 - ;; - -t|--run-seconds) - RUN_SECS_RAW_SPECIFIED=1 - RUN_SECS_RAW="${2:-}" - shift 2 - ;; - --run-seconds=*) - RUN_SECS_RAW_SPECIFIED=1 - RUN_SECS_RAW="${1#*=}" - shift - ;; - -n|--nodes) - DEMO_NODES="${2:-}" - shift 2 - ;; - --nodes=*) - DEMO_NODES="${1#*=}" - shift - ;; - --bundle) - LOGOS_BLOCKCHAIN_BINARIES_TAR="${2:-}" - export LOGOS_BLOCKCHAIN_BINARIES_TAR - shift 2 - ;; - --bundle=*) - LOGOS_BLOCKCHAIN_BINARIES_TAR="${1#*=}" - export LOGOS_BLOCKCHAIN_BINARIES_TAR - shift - ;; - --metrics-query-url) - METRICS_QUERY_URL="${2:-}" - shift 2 - ;; - --metrics-query-url=*) - METRICS_QUERY_URL="${1#*=}" - shift - ;; - --metrics-otlp-ingest-url) - METRICS_OTLP_INGEST_URL="${2:-}" - shift 2 - ;; - --metrics-otlp-ingest-url=*) - METRICS_OTLP_INGEST_URL="${1#*=}" - shift - ;; - --external-prometheus) - METRICS_QUERY_URL="${2:-}" - shift 2 - ;; - --external-prometheus=*) - METRICS_QUERY_URL="${1#*=}" - shift - ;; - --external-otlp-metrics-endpoint) - METRICS_OTLP_INGEST_URL="${2:-}" - shift 2 - ;; - --external-otlp-metrics-endpoint=*) - METRICS_OTLP_INGEST_URL="${1#*=}" - shift - ;; - --local) - IMAGE_SELECTION_MODE="local" - shift - ;; - --no-image-build) - LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD=1 - export LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD - shift - ;; - compose|host|k8s) - MODE="$1" - shift - ;; - *) - # Positional run-seconds fallback for legacy usage. - if [ -z "${RUN_SECS_RAW_SPECIFIED}" ] && common::is_uint "$1"; then - RUN_SECS_RAW="$1" - shift - else - run_examples::fail_with_usage "Unknown argument: $1" - fi - ;; - esac - done - - if [ -n "${LOGOS_BLOCKCHAIN_BINARIES_TAR:-}" ] && [ ! -f "${LOGOS_BLOCKCHAIN_BINARIES_TAR}" ]; then - run_examples::fail_with_usage "LOGOS_BLOCKCHAIN_BINARIES_TAR is set but missing: ${LOGOS_BLOCKCHAIN_BINARIES_TAR}" - fi - - if ! common::is_uint "${RUN_SECS_RAW}" || [ "${RUN_SECS_RAW}" -le 0 ]; then - run_examples::fail_with_usage "run-seconds must be a positive integer (pass -t/--run-seconds)" - fi - RUN_SECS="${RUN_SECS_RAW}" - - if [ -z "${DEMO_NODES}" ]; then - run_examples::fail_with_usage "nodes must be provided via -n/--nodes" - fi - if ! common::is_uint "${DEMO_NODES}" ; then - run_examples::fail_with_usage "nodes must be a non-negative integer (pass -n/--nodes)" - fi -} - -run_examples::select_image() { - local selection="${IMAGE_SELECTION_MODE}" - local context="" - - if [ "${selection}" = "auto" ]; then - if [ "${MODE}" = "k8s" ] && command -v kubectl >/dev/null 2>&1; then - context="$(kubectl config current-context 2>/dev/null || true)" - if [ "${context}" = "${DOCKER_DESKTOP_CONTEXT}" ]; then - selection="local" - else - selection="ecr" - fi - else - selection="local" - fi - fi - - if [ "${selection}" = "local" ]; then - IMAGE="${LOGOS_BLOCKCHAIN_TESTNET_IMAGE:-${DEFAULT_LOCAL_IMAGE}}" - export LOGOS_BLOCKCHAIN_TESTNET_IMAGE_PULL_POLICY="${LOGOS_BLOCKCHAIN_TESTNET_IMAGE_PULL_POLICY:-${DEFAULT_PULL_POLICY_LOCAL}}" - elif [ "${selection}" = "ecr" ]; then - local tag="${TAG:-${DEFAULT_ECR_TAG}}" - if [ -n "${ECR_IMAGE:-}" ]; then - IMAGE="${ECR_IMAGE}" - elif [ -n "${ECR_REGISTRY:-}" ]; then - local registry="${ECR_REGISTRY}" - local repo="${ECR_REPO:-${DEFAULT_PUBLIC_ECR_REPO}}" - IMAGE="${registry}/${repo}:${tag}" - elif [ -n "${AWS_ACCOUNT_ID:-}" ]; then - local aws_region="${AWS_REGION:-${DEFAULT_PRIVATE_AWS_REGION}}" - local aws_account_id="${AWS_ACCOUNT_ID}" - local repo="${ECR_REPO:-${DEFAULT_PRIVATE_ECR_REPO}}" - IMAGE="${aws_account_id}.dkr.ecr.${aws_region}.amazonaws.com/${repo}:${tag}" - else - local registry="${DEFAULT_PUBLIC_ECR_REGISTRY}" - local repo="${ECR_REPO:-${DEFAULT_PUBLIC_ECR_REPO}}" - IMAGE="${registry}/${repo}:${tag}" - fi - export LOGOS_BLOCKCHAIN_TESTNET_IMAGE_PULL_POLICY="${LOGOS_BLOCKCHAIN_TESTNET_IMAGE_PULL_POLICY:-${DEFAULT_PULL_POLICY_ECR}}" - else - run_examples::fail_with_usage "Unknown image selection mode: ${selection}" - fi - - export LOGOS_BLOCKCHAIN_IMAGE_SELECTION="${selection}" - export IMAGE_TAG="${IMAGE}" - export LOGOS_BLOCKCHAIN_TESTNET_IMAGE="${IMAGE}" - - if [ "${MODE}" = "k8s" ] && [ "${selection}" = "ecr" ]; then - # A locally built Docker image isn't visible to remote clusters (e.g. EKS). Default to - # skipping the local rebuild, unless the user explicitly set LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD or - # overrides via LOGOS_BLOCKCHAIN_FORCE_IMAGE_BUILD=1. - if [ "${LOGOS_BLOCKCHAIN_FORCE_IMAGE_BUILD:-0}" != "1" ]; then - LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD="${LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD:-${DEFAULT_K8S_ECR_SKIP_IMAGE_BUILD}}" - export LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD - fi - fi -} - -run_examples::default_tar_path() { - if [ -n "${LOGOS_BLOCKCHAIN_BINARIES_TAR:-}" ]; then - echo "${LOGOS_BLOCKCHAIN_BINARIES_TAR}" - return - fi - case "${MODE}" in - host) echo "${ROOT_DIR}/.tmp/nomos-binaries-host-${VERSION}.tar.gz" ;; - compose|k8s) - if [ "${LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD:-}" = "1" ]; then - echo "${ROOT_DIR}/.tmp/nomos-binaries-host-${VERSION}.tar.gz" - else - echo "${ROOT_DIR}/.tmp/nomos-binaries-linux-${VERSION}.tar.gz" - fi - ;; - *) echo "${ROOT_DIR}/.tmp/nomos-binaries-${VERSION}.tar.gz" ;; - esac -} - -run_examples::bundle_matches_expected() { - local tar_path="$1" - [ -f "${tar_path}" ] || return 1 - [ -z "${LOGOS_BLOCKCHAIN_NODE_REV:-}" ] && return 0 - local expected_features="${RUN_EXAMPLES_EXPECTED_BUNDLE_FEATURES:-all,high-active-slot-coefficient,verification-keys}" - - local meta tar_rev tar_head tar_features - meta="$(tar -xOzf "${tar_path}" artifacts/nomos-bundle-meta.env 2>/dev/null || true)" - if [ -z "${meta}" ]; then - echo "Bundle meta missing in ${tar_path}; treating as stale and rebuilding." >&2 - return 1 - fi - tar_rev="$(echo "${meta}" | sed -n 's/^nomos_node_rev=//p' | head -n 1)" - tar_head="$(echo "${meta}" | sed -n 's/^nomos_node_git_head=//p' | head -n 1)" - tar_features="$(echo "${meta}" | sed -n 's/^features=//p' | head -n 1)" - if [ -n "${expected_features}" ] && [ "${tar_features}" != "${expected_features}" ]; then - echo "Bundle ${tar_path} features '${tar_features}' do not match expected '${expected_features}'; rebuilding." >&2 - return 1 - fi - if [ -n "${tar_rev}" ] && [ "${tar_rev}" != "${LOGOS_BLOCKCHAIN_NODE_REV}" ]; then - echo "Bundle ${tar_path} is for logos-blockchain-node rev ${tar_rev}, expected ${LOGOS_BLOCKCHAIN_NODE_REV}; rebuilding." >&2 - return 1 - fi - if [ -n "${tar_head}" ] && echo "${LOGOS_BLOCKCHAIN_NODE_REV}" | grep -Eq '^[0-9a-f]{7,40}$'; then - if [ "${tar_head}" != "${LOGOS_BLOCKCHAIN_NODE_REV}" ]; then - echo "Bundle ${tar_path} is for logos-blockchain-node git head ${tar_head}, expected ${LOGOS_BLOCKCHAIN_NODE_REV}; rebuilding." >&2 - return 1 - fi - fi - return 0 -} - -run_examples::host_bin_matches_arch() { - local bin_path="$1" - [ -x "${bin_path}" ] || return 1 - command -v file >/dev/null 2>&1 || return 0 - - local info expected - info="$(file -b "${bin_path}" 2>/dev/null || true)" - case "$(uname -m)" in - x86_64) expected="x86-64|x86_64" ;; - aarch64|arm64) expected="arm64|aarch64" ;; - *) expected="" ;; - esac - [ -n "${expected}" ] && echo "${info}" | grep -Eqi "${expected}" -} - -run_examples::restore_binaries_from_tar() { - local tar_path="${1:-}" - if [ -z "${tar_path}" ]; then - tar_path="$(run_examples::default_tar_path)" - fi - run_examples::bundle_matches_expected "${tar_path}" || return 1 - [ -f "${tar_path}" ] || return 1 - - local extract_dir="${ROOT_DIR}/.tmp/nomos-binaries" - echo "==> Restoring binaries from ${tar_path}" - rm -rf "${extract_dir}" - mkdir -p "${extract_dir}" - tar -xzf "${tar_path}" -C "${extract_dir}" || common::die "Failed to extract ${tar_path}" - - local src="${extract_dir}/artifacts" - local bin_dst="${ROOT_DIR}/logos/infra/assets/stack/bin" - RESTORED_BIN_DIR="${src}" - export RESTORED_BIN_DIR - - if [ ! -f "${src}/logos-blockchain-node" ]; then - echo "Binaries missing in ${tar_path}; provide a prebuilt binaries tarball." >&2 - return 1 - fi - - local copy_bins=1 - 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" - fi - if [ "${copy_bins}" -eq 1 ]; then - mkdir -p "${bin_dst}" - cp "${src}/logos-blockchain-node" "${bin_dst}/" - fi - - RESTORED_BINARIES=1 - export RESTORED_BINARIES -} - -run_examples::ensure_binaries_tar() { - local platform="$1" - local tar_path="$2" - echo "==> Building fresh binaries bundle (${platform}) at ${tar_path}" - if [ -n "${LOGOS_BLOCKCHAIN_NODE_PATH:-}" ]; then - "${ROOT_DIR}/scripts/build/build-bundle.sh" --platform "${platform}" --output "${tar_path}" --path "${LOGOS_BLOCKCHAIN_NODE_PATH}" - else - "${ROOT_DIR}/scripts/build/build-bundle.sh" --platform "${platform}" --output "${tar_path}" --rev "${LOGOS_BLOCKCHAIN_NODE_REV}" - fi -} - -run_examples::prepare_bundles() { - RESTORED_BINARIES=0 - NEED_HOST_RESTORE_AFTER_IMAGE=0 - - 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}" ]; then - echo "==> Using pre-specified host binaries (LOGOS_BLOCKCHAIN_NODE_BIN); skipping tarball restore" - return 0 - fi - - if [ -n "${LOGOS_BLOCKCHAIN_NODE_PATH:-}" ]; then - echo "==> Using local logos-blockchain-node checkout at ${LOGOS_BLOCKCHAIN_NODE_PATH}" - if [ "${LOGOS_BLOCKCHAIN_FORCE_BUNDLE_REBUILD:-0}" = "1" ]; then - echo "==> Forcing local bundle rebuild (LOGOS_BLOCKCHAIN_FORCE_BUNDLE_REBUILD=1)" - rm -f "${HOST_TAR}" "${LINUX_TAR}" - fi - fi - - # On non-Linux compose/k8s runs, use the Linux bundle for image build, then restore host bundle for the runner. - if [ "${MODE}" != "host" ] && [ "$(uname -s)" != "Linux" ] && [ "${LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD:-0}" = "0" ] && [ -f "${LINUX_TAR}" ]; then - NEED_HOST_RESTORE_AFTER_IMAGE=1 - run_examples::restore_binaries_from_tar "${LINUX_TAR}" || { - run_examples::ensure_binaries_tar linux "${LINUX_TAR}" - run_examples::restore_binaries_from_tar "${LINUX_TAR}" - } - fi - - if ! run_examples::restore_binaries_from_tar; then - local tar_path - tar_path="$(run_examples::default_tar_path)" - case "${MODE}" in - host) run_examples::ensure_binaries_tar host "${tar_path}" ;; - compose|k8s) - if [ "${LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD:-0}" = "1" ]; then - run_examples::ensure_binaries_tar host "${tar_path}" - else - run_examples::ensure_binaries_tar linux "${tar_path}" - fi - ;; - *) run_examples::ensure_binaries_tar host "${tar_path}" ;; - esac - - run_examples::restore_binaries_from_tar "${tar_path}" || common::die \ - "Missing or invalid binaries tarball. Provide it via --bundle/LOGOS_BLOCKCHAIN_BINARIES_TAR or place it at $(run_examples::default_tar_path)." - fi -} - -run_examples::maybe_rebuild_image() { - if [ "${MODE}" = "host" ]; then - return 0 - fi - - if [ "${LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD:-0}" = "1" ]; then - echo "==> Skipping testnet image rebuild (LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD=1)" - return 0 - fi - - echo "==> Rebuilding testnet image (${IMAGE})" - IMAGE_TAG="${IMAGE}" bash "${ROOT_DIR}/scripts/build/build_test_image.sh" -} - -run_examples::maybe_restore_host_after_image() { - if [ "${NEED_HOST_RESTORE_AFTER_IMAGE}" != "1" ]; then - return 0 - fi - - echo "==> Restoring host bundle for runner (${HOST_TAR})" - if [ ! -f "${HOST_TAR}" ]; then - run_examples::ensure_binaries_tar host "${HOST_TAR}" - fi - run_examples::restore_binaries_from_tar "${HOST_TAR}" || common::die "Failed to restore host bundle from ${HOST_TAR}" -} - -run_examples::validate_restored_bundle() { - if [ "${MODE}" = "host" ] && ! { [ -n "${LOGOS_BLOCKCHAIN_NODE_BIN:-}" ] && [ -x "${LOGOS_BLOCKCHAIN_NODE_BIN:-}" ]; }; then - local tar_node - tar_node="${RESTORED_BIN_DIR:-${ROOT_DIR}/logos/infra/assets/stack/bin}/logos-blockchain-node" - - [ -x "${tar_node}" ] || common::die \ - "Restored tarball missing host executables; provide a host-compatible binaries tarball." - 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}" - export LOGOS_BLOCKCHAIN_NODE_BIN - fi -} - -run_examples::ensure_circuits() { - local circuits_dir - local setup_script - local platform - - if [ -n "${LOGOS_BLOCKCHAIN_CIRCUITS:-}" ]; then - circuits_dir="${LOGOS_BLOCKCHAIN_CIRCUITS}" - else - circuits_dir="${ROOT_DIR}/${LOGOS_BLOCKCHAIN_CIRCUITS_HOST_DIR_REL:-.tmp/logos-blockchain-circuits-host}" - platform="${LOGOS_BLOCKCHAIN_CIRCUITS_PLATFORM:-}" - export LOGOS_BLOCKCHAIN_CIRCUITS="${circuits_dir}" - fi - - if [ -d "${circuits_dir}" ]; then - return 0 - fi - - setup_script="${ROOT_DIR}/logos/infra/assets/stack/scripts/setup-logos-blockchain-circuits.sh" - if [ ! -x "${setup_script}" ]; then - common::die "Missing circuits setup script at ${setup_script}" - fi - - if [ -n "${platform:-}" ]; then - LOGOS_BLOCKCHAIN_CIRCUITS_PLATFORM="${platform}" "${setup_script}" "${VERSION}" "${circuits_dir}" - else - "${setup_script}" "${VERSION}" "${circuits_dir}" - fi -} - -run_examples::run() { - export LOGOS_BLOCKCHAIN_DEMO_RUN_SECS="${RUN_SECS}" - export LOGOS_BLOCKCHAIN_DEMO_NODES="${DEMO_NODES}" - - if [ -n "${METRICS_QUERY_URL}" ]; then - export LOGOS_BLOCKCHAIN_METRICS_QUERY_URL="${METRICS_QUERY_URL}" - fi - if [ -n "${METRICS_OTLP_INGEST_URL}" ]; then - export LOGOS_BLOCKCHAIN_METRICS_OTLP_INGEST_URL="${METRICS_OTLP_INGEST_URL}" - fi - - echo "==> Running ${BIN} for ${RUN_SECS}s (mode=${MODE}, image=${IMAGE})" - cd "${ROOT_DIR}" - - TESTNET_PRINT_ENDPOINTS=1 \ - LOGOS_BLOCKCHAIN_TESTNET_IMAGE="${IMAGE}" \ - LOGOS_BLOCKCHAIN_NODE_BIN="${LOGOS_BLOCKCHAIN_NODE_BIN:-}" \ - cargo run -p runner-examples --bin "${BIN}" -} - -run_examples::main() { - run_examples::load_env - run_examples::parse_args "$@" - run_examples::select_bin - run_examples::select_image - run_examples::apply_platform_defaults - run_examples::prepare_bundles - echo "==> Using restored binaries bundle" - - SETUP_OUT="$(common::tmpfile nomos-setup-output.XXXXXX)" - - run_examples::maybe_rebuild_image - run_examples::maybe_restore_host_after_image - run_examples::validate_restored_bundle - run_examples::run -} - -if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then - run_examples::main "$@" -fi diff --git a/scripts/run/run-test-matrix.sh b/scripts/run/run-test-matrix.sh deleted file mode 100755 index bea5ce2..0000000 --- a/scripts/run/run-test-matrix.sh +++ /dev/null @@ -1,306 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [ -z "${BASH_VERSION:-}" ]; then - exec bash "$0" "$@" -fi - -# shellcheck disable=SC1091 -. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib/common.sh" - -matrix::usage() { - cat <<'USAGE' -Usage: scripts/run/run-test-matrix.sh [options] - -Runs a small matrix of runner examples (host/compose/k8s) with and without -image rebuilds (where it makes sense), after cleaning and rebuilding bundles. - -Options: - -t, --run-seconds N Demo duration for each run (default: 120) - -n, --nodes N Nodes (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) - --no-image-build Skip image-build variants (compose/k8s); only run the --no-image-build cases - --allow-nonzero-progress Treat expectation failures as success if logs show non-zero progress (for faster local iteration) - --force-k8s-image-build Allow the k8s "rebuild image" run even on non-docker-desktop clusters - --metrics-query-url URL Forwarded to scripts/run/run-examples.sh (optional) - --metrics-otlp-ingest-url URL Forwarded to scripts/run/run-examples.sh (optional) - -h, --help Show this help - -Notes: - - For k8s on non-docker-desktop clusters, the matrix defaults to only the - --no-image-build variant, since a local docker build is not visible to the cluster. - - --allow-nonzero-progress is intentionally lax and should not be used in CI. -USAGE -} - -matrix::die() { - echo "ERROR: $*" >&2 - exit 2 -} - -matrix::have() { command -v "$1" >/dev/null 2>&1; } - -matrix::parse_args() { - RUN_SECS=120 - NODES=1 - MODES_RAW="host,compose,k8s" - DO_CLEAN=1 - DO_BUNDLES=1 - SKIP_IMAGE_BUILD_VARIANTS=0 - ALLOW_NONZERO_PROGRESS=0 - FORCE_K8S_IMAGE_BUILD=0 - METRICS_QUERY_URL="" - METRICS_OTLP_INGEST_URL="" - - while [ "$#" -gt 0 ]; do - case "$1" in - -h|--help) matrix::usage; exit 0 ;; - -t|--run-seconds) RUN_SECS="${2:-}"; shift 2 ;; - --run-seconds=*) RUN_SECS="${1#*=}"; shift ;; - -n|--nodes) NODES="${2:-}"; shift 2 ;; - --nodes=*) NODES="${1#*=}"; shift ;; - --modes) MODES_RAW="${2:-}"; shift 2 ;; - --modes=*) MODES_RAW="${1#*=}"; shift ;; - --no-clean) DO_CLEAN=0; shift ;; - --no-bundles) DO_BUNDLES=0; shift ;; - --no-image-build) SKIP_IMAGE_BUILD_VARIANTS=1; shift ;; - --allow-nonzero-progress) ALLOW_NONZERO_PROGRESS=1; shift ;; - --force-k8s-image-build) FORCE_K8S_IMAGE_BUILD=1; shift ;; - --metrics-query-url) METRICS_QUERY_URL="${2:-}"; shift 2 ;; - --metrics-query-url=*) METRICS_QUERY_URL="${1#*=}"; shift ;; - --metrics-otlp-ingest-url) METRICS_OTLP_INGEST_URL="${2:-}"; shift 2 ;; - --metrics-otlp-ingest-url=*) METRICS_OTLP_INGEST_URL="${1#*=}"; shift ;; - *) matrix::die "Unknown argument: $1" ;; - esac - done - - 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 "${NODES}" || matrix::die "--nodes must be an integer" -} - -matrix::split_modes() { - MODES=() - local token - IFS=',' read -r -a MODES <<< "${MODES_RAW}" - for token in "${MODES[@]}"; do - case "${token}" in - host|compose|k8s) ;; - "") ;; - *) matrix::die "Unknown mode in --modes: ${token} (expected host,compose,k8s)" ;; - esac - done -} - -matrix::forwarded_args() { - local -a args=() - if [ -n "${METRICS_QUERY_URL}" ]; then - args+=(--metrics-query-url "${METRICS_QUERY_URL}") - fi - if [ -n "${METRICS_OTLP_INGEST_URL}" ]; then - args+=(--metrics-otlp-ingest-url "${METRICS_OTLP_INGEST_URL}") - fi - printf '%s\0' "${args[@]}" -} - -matrix::log_has_nonzero_progress() { - local log="$1" - # Heuristic: "some progress happened" means we observed some non-zero metric - # from the runner/expectations. Keep this intentionally lax; it's a local - # iteration escape hatch, not a CI signal. - # - # Use portable awk (no 3-arg match()) so this works on macOS / busybox. - awk ' - function record_num(re) { - if (match($0, re)) { - s = substr($0, RSTART, RLENGTH) - gsub(/[^0-9]/, "", s) - if (s + 0 > 0) { ok = 1 } - } - } - { - record_num(/height[^0-9]*[0-9]+/) - record_num(/observed_blocks[^0-9]*[0-9]+/) - record_num(/observed_total_blobs[^0-9]*[0-9]+/) - record_num(/channels_with_blobs[^0-9]*[0-9]+/) - record_num(/inscriptions_observed[^0-9]*[0-9]+/) - record_num(/observed[^0-9]*[0-9]+\/[0-9]+/) - } - END { exit ok ? 0 : 1 } - ' "${log}" -} - -matrix::run_case() { - local name="$1" - shift - - local log="${LOG_DIR}/${name}.log" - mkdir -p "$(dirname "${log}")" - echo "==> [${name}] $(date -u +'%Y-%m-%dT%H:%M:%SZ')" - echo "==> [${name}] cmd: $*" - - local start end status - start="$(date +%s)" - set +e - "$@" 2>&1 | tee "${log}" - status="${PIPESTATUS[0]}" - set -e - - if [ "${status}" -ne 0 ] && [ "${ALLOW_NONZERO_PROGRESS}" -eq 1 ]; then - if matrix::log_has_nonzero_progress "${log}"; then - echo "==> [${name}] Soft-passing due to non-zero progress (--allow-nonzero-progress)" - status=0 - fi - fi - end="$(date +%s)" - - CASE_NAMES+=("${name}") - CASE_CODES+=("${status}") - CASE_SECS+=("$((end - start))") - - if [ "${status}" -ne 0 ]; then - echo "==> [${name}] FAILED (exit=${status}, secs=$((end - start)))" - else - echo "==> [${name}] OK (secs=$((end - start)))" - fi -} - -matrix::k8s_context() { - if ! matrix::have kubectl; then - echo "" - return 0 - fi - kubectl config current-context 2>/dev/null || true -} - -matrix::main() { - ROOT_DIR="$(common::repo_root)" - export ROOT_DIR - export RUST_LOG="${RUST_LOG:-info}" - - matrix::parse_args "$@" - matrix::split_modes - - local ts - ts="$(date +%Y%m%d-%H%M%S)" - LOG_DIR="${ROOT_DIR}/.tmp/test-matrix/${ts}" - mkdir -p "${LOG_DIR}" - - echo "Workspace: ${ROOT_DIR}" - echo "Logs: ${LOG_DIR}" - - if [ "${DO_CLEAN}" -eq 1 ]; then - echo "==> Cleaning workspace artifacts" - "${ROOT_DIR}/scripts/ops/clean.sh" --tmp --target --docker - fi - - if [ "${DO_BUNDLES}" -eq 1 ]; then - echo "==> Building bundles (host + linux)" - "${ROOT_DIR}/scripts/build/build-bundle.sh" --platform host - "${ROOT_DIR}/scripts/build/build-bundle.sh" --platform linux - fi - - CASE_NAMES=() - CASE_CODES=() - CASE_SECS=() - - local -a forward - IFS=$'\0' read -r -d '' -a forward < <(matrix::forwarded_args; printf '\0') - - local mode - for mode in "${MODES[@]}"; do - case "${mode}" in - host) - matrix::run_case "host" \ - "${ROOT_DIR}/scripts/run/run-examples.sh" \ - -t "${RUN_SECS}" -n "${NODES}" \ - "${forward[@]}" \ - host - ;; - compose) - if [ "${SKIP_IMAGE_BUILD_VARIANTS}" -eq 0 ]; then - matrix::run_case "compose.image_build" \ - "${ROOT_DIR}/scripts/run/run-examples.sh" \ - -t "${RUN_SECS}" -n "${NODES}" \ - "${forward[@]}" \ - compose - else - echo "==> [compose] Skipping image-build variant (--no-image-build)" - fi - - matrix::run_case "compose.skip_image_build" \ - "${ROOT_DIR}/scripts/run/run-examples.sh" \ - --no-image-build \ - -t "${RUN_SECS}" -n "${NODES}" \ - "${forward[@]}" \ - compose - ;; - k8s) - local ctx - ctx="$(matrix::k8s_context)" - if [ -z "${ctx}" ]; then - echo "==> [k8s] Skipping (kubectl missing or no current context)" - continue - fi - - if [ "${SKIP_IMAGE_BUILD_VARIANTS}" -eq 0 ]; then - if [ "${ctx}" = "docker-desktop" ] || [ "${FORCE_K8S_IMAGE_BUILD}" -eq 1 ]; then - # On non-docker-desktop clusters, run-examples.sh defaults to skipping local image builds - # since the cluster can't see them. Honor the matrix "force" option by overriding. - if [ "${ctx}" != "docker-desktop" ] && [ "${FORCE_K8S_IMAGE_BUILD}" -eq 1 ]; then - export LOGOS_BLOCKCHAIN_FORCE_IMAGE_BUILD=1 - fi - matrix::run_case "k8s.image_build" \ - "${ROOT_DIR}/scripts/run/run-examples.sh" \ - -t "${RUN_SECS}" -n "${NODES}" \ - "${forward[@]}" \ - k8s - unset LOGOS_BLOCKCHAIN_FORCE_IMAGE_BUILD || true - else - echo "==> [k8s] Detected context '${ctx}'; skipping image-build variant (use --force-k8s-image-build to override)" - fi - else - echo "==> [k8s] Skipping image-build variant (--no-image-build)" - fi - - matrix::run_case "k8s.skip_image_build" \ - "${ROOT_DIR}/scripts/run/run-examples.sh" \ - --no-image-build \ - -t "${RUN_SECS}" -n "${NODES}" \ - "${forward[@]}" \ - k8s - ;; - "") - ;; - *) - matrix::die "Unhandled mode: ${mode}" - ;; - esac - done - - echo "==> Summary" - local i failed=0 - for i in "${!CASE_NAMES[@]}"; do - printf "%-28s exit=%-3s secs=%s log=%s\n" \ - "${CASE_NAMES[$i]}" \ - "${CASE_CODES[$i]}" \ - "${CASE_SECS[$i]}" \ - "${LOG_DIR}/${CASE_NAMES[$i]}.log" - if [ "${CASE_CODES[$i]}" -ne 0 ]; then - failed=1 - fi - done - - if [ "${failed}" -ne 0 ]; then - echo "==> Matrix FAILED (see logs under ${LOG_DIR})" >&2 - exit 1 - fi - - echo "==> Matrix OK" -} - -if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then - matrix::main "$@" -fi diff --git a/scripts/setup/setup-logos-blockchain-circuits.sh b/scripts/setup/setup-logos-blockchain-circuits.sh deleted file mode 100755 index 532c7c1..0000000 --- a/scripts/setup/setup-logos-blockchain-circuits.sh +++ /dev/null @@ -1,245 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [ -z "${BASH_VERSION:-}" ]; then - exec bash "$0" "$@" -fi - -# Setup script for logos-blockchain-circuits -# -# Usage: scripts/setup/setup-logos-blockchain-circuits.sh [VERSION] [INSTALL_DIR] -# -# Arguments: -# VERSION Optional. Version to install (default: v0.3.2) -# INSTALL_DIR Optional. Installation directory (default: $HOME/.logos-blockchain-circuits) -# -# Examples: -# scripts/setup/setup-logos-blockchain-circuits.sh -# scripts/setup/setup-logos-blockchain-circuits.sh v0.3.2 -# scripts/setup/setup-logos-blockchain-circuits.sh v0.3.2 /opt/circuits - -DEFAULT_CIRCUITS_VERSION="v0.4.1" -DEFAULT_INSTALL_DIR="${HOME}/.logos-blockchain-circuits" -REPO="logos-blockchain/logos-blockchain-circuits" - -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -NC='\033[0m' - -print_info() { echo -e "${BLUE}ℹ${NC} $1"; } -print_success() { echo -e "${GREEN}✓${NC} $1"; } -print_warning() { echo -e "${YELLOW}âš ${NC} $1"; } -print_error() { echo -e "${RED}✗${NC} $1"; } - -VERSION="${1:-${DEFAULT_CIRCUITS_VERSION}}" -INSTALL_DIR="${2:-${DEFAULT_INSTALL_DIR}}" -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" -RAPIDSNARK_SKIP="${RAPIDSNARK_SKIP:-0}" - -# Detect OS and architecture -# Outputs: os-arch like linux-x86_64, macos-aarch64 -# -# Uses same logic as the logos-blockchain-node installer. -detect_platform() { - local os="" arch="" - - case "$(uname -s)" in - Linux*) os="linux" ;; - Darwin*) os="macos" ;; - MINGW*|MSYS*|CYGWIN*) os="windows" ;; - *) print_error "Unsupported operating system: $(uname -s)"; exit 1 ;; - esac - - case "$(uname -m)" in - x86_64) arch="x86_64" ;; - aarch64|arm64) arch="aarch64" ;; - *) print_error "Unsupported architecture: $(uname -m)"; exit 1 ;; - esac - - echo "${os}-${arch}" -} - -check_existing_installation() { - if [ -d "${INSTALL_DIR}" ]; then - print_warning "Installation directory already exists: ${INSTALL_DIR}" - - if [ -f "${INSTALL_DIR}/VERSION" ]; then - local current_version - current_version="$(cat "${INSTALL_DIR}/VERSION")" - print_info "Currently installed version: ${current_version}" - fi - - if [ ! -t 0 ]; then - print_info "Non-interactive environment detected, automatically overwriting..." - else - echo - read -p "Do you want to overwrite it? (y/N): " -n 1 -r - echo - if [[ ! ${REPLY} =~ ^[Yy]$ ]]; then - print_info "Installation cancelled." - exit 0 - fi - fi - - print_info "Removing existing installation..." - rm -rf "${INSTALL_DIR}" - fi -} - -download_release() { - local platform="$1" - local artifact="" - local url="" - local temp_dir - temp_dir="$(mktemp -d)" - - for attempt in 1 2; do - artifact="logos-blockchain-circuits-${VERSION}-${platform}.tar.gz" - url="https://github.com/${REPO}/releases/download/${VERSION}/${artifact}" - - print_info "Downloading logos-blockchain-circuits ${VERSION} for ${platform}..." - print_info "URL: ${url}" - - local curl_cmd="curl -L" - if [ -n "${GITHUB_TOKEN:-}" ]; then - curl_cmd="$curl_cmd --header 'authorization: Bearer ${GITHUB_TOKEN}'" - fi - curl_cmd="$curl_cmd -o ${temp_dir}/${artifact} ${url}" - - if eval "${curl_cmd}"; then - if tar -tzf "${temp_dir}/${artifact}" >/dev/null 2>&1; then - break - fi - if [ "${platform}" = "linux-aarch64" ] || [ "${platform}" = "linux-arm64" ]; then - print_warning "Downloaded artifact is not a valid tar.gz; falling back to linux-x86_64" - rm -f "${temp_dir}/${artifact}" - platform="linux-x86_64" - continue - fi - print_error "Downloaded artifact is not a valid tar.gz for ${platform}" - rm -rf "${temp_dir}" - exit 1 - fi - - if [ "${attempt}" -eq 1 ] && { [ "${platform}" = "linux-aarch64" ] || [ "${platform}" = "linux-arm64" ]; }; then - print_warning "No linux-aarch64 assets found; falling back to linux-x86_64" - platform="linux-x86_64" - continue - fi - - print_error "Failed to download release artifact" - print_error "Please check that version ${VERSION} exists for platform ${platform}" - print_error "Available releases: https://github.com/${REPO}/releases" - rm -rf "${temp_dir}" - exit 1 - done - - print_success "Download complete" - - print_info "Extracting to ${INSTALL_DIR}..." - mkdir -p "${INSTALL_DIR}" - - if ! tar -xzf "${temp_dir}/${artifact}" -C "${INSTALL_DIR}" --strip-components=1; then - print_error "Failed to extract archive" - rm -rf "${temp_dir}" - exit 1 - fi - - rm -rf "${temp_dir}" - print_success "Extraction complete" -} - -handle_macos_quarantine() { - print_info "macOS detected: Removing quarantine attributes from executables..." - - if find "${INSTALL_DIR}" -type f -perm +111 -exec xattr -d com.apple.quarantine {} \; 2>/dev/null; then - print_success "Quarantine attributes removed" - else - print_warning "Could not remove quarantine attributes (they may not exist)" - fi -} - -print_circuits() { - print_info "The following circuits are available:" - - local dir - for dir in "${INSTALL_DIR}"/*/; do - if [ -d "${dir}" ] && [ -f "${dir}/witness_generator" ]; then - echo " • $(basename "${dir}")" - fi - done -} - -ensure_rapidsnark() { - if [ -x "${INSTALL_DIR}/prover" ] && [ -x "${INSTALL_DIR}/verifier" ]; then - print_info "rapidsnark prover already present at ${INSTALL_DIR}" - return - fi - - if [ "${RAPIDSNARK_SKIP}" = "1" ]; then - print_warning "Skipping rapidsnark build (RAPIDSNARK_SKIP=1). Proofs may fail without prover/verifier." - return - fi - - local build_script="${REPO_ROOT}/scripts/build/build-rapidsnark.sh" - if [ ! -x "${build_script}" ]; then - print_error "rapidsnark build script not found or not executable: ${build_script}" - exit 1 - fi - - local missing=() - for tool in git cmake make gcc g++; do - if ! command -v "${tool}" >/dev/null 2>&1; then - missing+=("${tool}") - fi - done - - if [ "${#missing[@]}" -gt 0 ]; then - print_error "Missing build tools for rapidsnark: ${missing[*]}" - print_error "Install the required packages, or set RAPIDSNARK_SKIP=1 to skip the build." - exit 1 - fi - - print_info "Building rapidsnark prover into ${INSTALL_DIR}..." - bash "${build_script}" "${INSTALL_DIR}" - print_success "rapidsnark prover installed" -} - -main() { - print_info "Setting up logos-blockchain-circuits ${VERSION}" - print_info "Installation directory: ${INSTALL_DIR}" - echo - - local platform - platform="$(detect_platform)" - print_info "Detected platform: ${platform}" - - check_existing_installation - download_release "${platform}" - - if [[ "${platform}" == macos-* ]]; then - echo - handle_macos_quarantine - fi - - echo - ensure_rapidsnark - - echo - print_success "Installation complete!" - echo - print_info "logos-blockchain-circuits ${VERSION} is now installed at: ${INSTALL_DIR}" - print_circuits - - if [ "${INSTALL_DIR}" != "${DEFAULT_INSTALL_DIR}" ]; then - echo - print_info "Since you're using a custom installation directory, set the environment variable:" - print_info " export LOGOS_BLOCKCHAIN_CIRCUITS=${INSTALL_DIR}" - echo - fi -} - -main "$@" diff --git a/scripts/setup/setup-observability.sh b/scripts/setup/setup-observability.sh old mode 100755 new mode 100644 index 9229f09..62e2f22 --- a/scripts/setup/setup-observability.sh +++ b/scripts/setup/setup-observability.sh @@ -13,15 +13,15 @@ usage() { cat <<'USAGE' Usage: scripts/setup/setup-observability.sh compose up|down|logs|env - scripts/setup/setup-observability.sh k8s install|uninstall|dashboards|env + scripts/setup/setup-observability.sh k8s install|uninstall|env Compose: - - Runs Prometheus (+ OTLP receiver) and Grafana via docker compose. + - Runs Prometheus and Grafana via docker compose. - Prints LOGOS_BLOCKCHAIN_METRICS_* / LOGOS_BLOCKCHAIN_GRAFANA_URL exports to wire into runs. Kubernetes: - Installs prometheus-community/kube-prometheus-stack into namespace - "logos-observability" and optionally loads Logos Grafana dashboards. + "logos-observability". - Prints port-forward commands + LOGOS_BLOCKCHAIN_METRICS_* / LOGOS_BLOCKCHAIN_GRAFANA_URL exports. USAGE } @@ -36,8 +36,10 @@ compose_file() { compose_run() { local file + file="$(compose_file)" common::require_file "${file}" + docker compose -f "${file}" "$@" } @@ -58,6 +60,7 @@ k8s_install() { require_cmd helm local ns release values + ns="$(k8s_namespace)" release="$(k8s_release)" values="$(k8s_values)" @@ -69,6 +72,7 @@ k8s_install() { if ! helm repo list | grep -q '^prometheus-community[[:space:]]'; then helm repo add prometheus-community https://prometheus-community.github.io/helm-charts fi + helm repo update prometheus-community helm upgrade --install "${release}" prometheus-community/kube-prometheus-stack \ @@ -84,6 +88,7 @@ k8s_uninstall() { require_cmd helm local ns release + ns="$(k8s_namespace)" release="$(k8s_release)" @@ -91,28 +96,9 @@ k8s_uninstall() { kubectl delete ns "${ns}" --ignore-not-found } -k8s_apply_dashboards() { - require_cmd kubectl - - local ns dash_dir - ns="$(k8s_namespace)" - dash_dir="${ROOT}/logos/infra/assets/stack/monitoring/grafana/dashboards" - - [ -d "${dash_dir}" ] || common::die "Missing dashboards directory: ${dash_dir}" - - local file base name - for file in "${dash_dir}"/*.json; do - base="$(basename "${file}" .json)" - name="logos-dashboard-${base//[^a-zA-Z0-9-]/-}" - kubectl -n "${ns}" create configmap "${name}" \ - --from-file="$(basename "${file}")=${file}" \ - --dry-run=client -o yaml | kubectl apply -f - - kubectl -n "${ns}" label configmap "${name}" grafana_dashboard=1 --overwrite >/dev/null - done -} - k8s_env() { local ns release + ns="$(k8s_namespace)" release="$(k8s_release)" @@ -150,7 +136,6 @@ main() { case "${action}" in install) k8s_install ;; uninstall) k8s_uninstall ;; - dashboards) k8s_apply_dashboards ;; env) k8s_env ;; ""|help|-h|--help) usage ;; *) common::die "Unknown k8s action: ${action}" ;; diff --git a/logos/infra/assets/stack/scripts/run_cfgsync.sh b/testing-framework/assets/stack/scripts/run_cfgsync.sh similarity index 100% rename from logos/infra/assets/stack/scripts/run_cfgsync.sh rename to testing-framework/assets/stack/scripts/run_cfgsync.sh diff --git a/logos/infra/assets/stack/scripts/run_logos.sh b/testing-framework/assets/stack/scripts/run_logos.sh similarity index 100% rename from logos/infra/assets/stack/scripts/run_logos.sh rename to testing-framework/assets/stack/scripts/run_logos.sh diff --git a/logos/infra/assets/stack/scripts/run_logos_node.sh b/testing-framework/assets/stack/scripts/run_logos_node.sh similarity index 100% rename from logos/infra/assets/stack/scripts/run_logos_node.sh rename to testing-framework/assets/stack/scripts/run_logos_node.sh diff --git a/testing-framework/core/Cargo.toml b/testing-framework/core/Cargo.toml index 492f746..478c6a9 100644 --- a/testing-framework/core/Cargo.toml +++ b/testing-framework/core/Cargo.toml @@ -16,14 +16,18 @@ workspace = true default = [] [dependencies] +anyhow = "1" async-trait = "0.1" cfgsync-adapter = { workspace = true } cfgsync-artifacts = { workspace = true } +cfgsync-core = { workspace = true } futures = { default-features = false, features = ["std"], version = "0.3" } parking_lot = { workspace = true } prometheus-http-query = "0.8" rand = { workspace = true } reqwest = { features = ["json"], workspace = true } +serde = { workspace = true } +serde_yaml = { workspace = true } thiserror = { workspace = true } tokio = { features = ["macros", "process", "rt-multi-thread", "time"], workspace = true } tracing = { workspace = true } diff --git a/testing-framework/core/src/cfgsync/mod.rs b/testing-framework/core/src/cfgsync/mod.rs index 2f93d7b..85f6b80 100644 --- a/testing-framework/core/src/cfgsync/mod.rs +++ b/testing-framework/core/src/cfgsync/mod.rs @@ -2,6 +2,9 @@ use std::error::Error; pub use cfgsync_adapter::*; use cfgsync_artifacts::{ArtifactFile, ArtifactSet}; +use cfgsync_core::render::write_rendered_cfgsync; +pub use cfgsync_core::render::{CfgsyncOutputPaths, RenderedCfgsync}; +use serde::Serialize; use thiserror::Error; #[doc(hidden)] @@ -91,3 +94,120 @@ pub fn build_static_artifacts( #[doc(hidden)] pub use build_static_artifacts as build_cfgsync_node_catalog; + +pub struct RegistrationServerRenderOptions { + pub port: Option, + pub artifacts_path: Option, +} + +#[derive(Debug, Error)] +pub enum RenderRegistrationServerError { + #[error(transparent)] + BuildStaticArtifacts(#[from] BuildStaticArtifactsError), + #[error("failed to serialize cfgsync server config: {source}")] + SerializeConfig { + #[source] + source: serde_yaml::Error, + }, + #[error("failed to serialize cfgsync artifacts: {source}")] + SerializeArtifacts { + #[source] + source: serde_yaml::Error, + }, + #[error("failed to write cfgsync files: {source}")] + Write { + #[source] + source: anyhow::Error, + }, + #[error("failed to enrich cfgsync artifacts: {source}")] + Enrich { + #[source] + source: DynCfgsyncError, + }, +} + +#[derive(Serialize)] +struct RegistrationServerConfig { + port: u16, + source: RegistrationServerSource, +} + +#[derive(Serialize)] +struct RegistrationServerSource { + kind: String, + artifacts_path: String, +} + +pub fn render_and_write_registration_server( + deployment: &E::Deployment, + hostnames: &[String], + mut options: RegistrationServerRenderOptions, + output: CfgsyncOutputPaths<'_>, + enrich_artifacts: F, +) -> Result +where + E: StaticArtifactRenderer, + F: FnOnce(&mut cfgsync_adapter::MaterializedArtifacts) -> Result<(), DynCfgsyncError>, +{ + ensure_artifacts_path(&mut options.artifacts_path, output.artifacts_path); + + let config_yaml = + render_registration_server_config(options.port, options.artifacts_path.as_deref())?; + + let mut materialized = build_static_artifacts::(deployment, hostnames)?; + enrich_artifacts(&mut materialized) + .map_err(|source| RenderRegistrationServerError::Enrich { source })?; + + let artifacts_yaml = serde_yaml::to_string(&materialized) + .map_err(|source| RenderRegistrationServerError::SerializeArtifacts { source })?; + + let rendered = RenderedCfgsync { + config_yaml, + artifacts_yaml, + }; + + write_rendered_cfgsync(&rendered, output) + .map_err(|source| RenderRegistrationServerError::Write { source })?; + + Ok(rendered) +} + +fn ensure_artifacts_path( + artifacts_path: &mut Option, + output_artifacts_path: &std::path::Path, +) { + if artifacts_path.is_some() { + return; + } + + *artifacts_path = Some( + output_artifacts_path + .file_name() + .and_then(|name| name.to_str()) + .unwrap_or("cfgsync.artifacts.yaml") + .to_string(), + ); +} + +fn render_registration_server_config( + port: Option, + artifacts_path: Option<&str>, +) -> Result { + serde_yaml::to_string(®istration_server_config(port, artifacts_path)) + .map_err(|source| RenderRegistrationServerError::SerializeConfig { source }) +} + +fn registration_server_config( + port: Option, + artifacts_path: Option<&str>, +) -> RegistrationServerConfig { + RegistrationServerConfig { + port: port.unwrap_or(4400), + source: RegistrationServerSource { + kind: "registration".to_string(), + artifacts_path: artifacts_path + .unwrap_or("cfgsync.artifacts.yaml") + .to_string(), + }, + } +} diff --git a/testing-framework/deployers/compose/Cargo.toml b/testing-framework/deployers/compose/Cargo.toml index 4df1f40..afa9ff0 100644 --- a/testing-framework/deployers/compose/Cargo.toml +++ b/testing-framework/deployers/compose/Cargo.toml @@ -29,7 +29,4 @@ url = { version = "2" } uuid = { features = ["v4"], version = "1" } [dev-dependencies] -groth16 = { workspace = true } -key-management-system-service = { workspace = true } -serde_json = { workspace = true } -zksign = { workspace = true } +serde_json = { workspace = true } diff --git a/testing-framework/deployers/compose/src/deployer/mod.rs b/testing-framework/deployers/compose/src/deployer/mod.rs index 3624563..03ccbe3 100644 --- a/testing-framework/deployers/compose/src/deployer/mod.rs +++ b/testing-framework/deployers/compose/src/deployer/mod.rs @@ -14,7 +14,11 @@ use testing_framework_core::scenario::{ internal::{CleanupGuard, FeedHandle}, }; -use crate::{env::ComposeDeployEnv, errors::ComposeRunnerError, lifecycle::cleanup::RunnerCleanup}; +use crate::{ + env::{ComposeCfgsyncEnv, ComposeDeployEnv}, + errors::ComposeRunnerError, + lifecycle::cleanup::RunnerCleanup, +}; /// Docker Compose-based deployer for test scenarios. #[derive(Clone, Copy)] @@ -141,6 +145,7 @@ impl ComposeDeployer { scenario: &Scenario, ) -> Result<(Runner, ComposeDeploymentMetadata), ComposeRunnerError> where + E: ComposeCfgsyncEnv, Caps: RequiresNodeControl + ObservabilityCapabilityProvider + Send + Sync, { let deployer = Self { @@ -158,7 +163,7 @@ impl ComposeDeployer { impl Deployer for ComposeDeployer where Caps: RequiresNodeControl + ObservabilityCapabilityProvider + Send + Sync, - E: ComposeDeployEnv, + E: ComposeCfgsyncEnv, { type Error = ComposeRunnerError; diff --git a/testing-framework/deployers/compose/src/deployer/orchestrator.rs b/testing-framework/deployers/compose/src/deployer/orchestrator.rs index 3084bf6..aced978 100644 --- a/testing-framework/deployers/compose/src/deployer/orchestrator.rs +++ b/testing-framework/deployers/compose/src/deployer/orchestrator.rs @@ -28,7 +28,7 @@ use super::{ }; use crate::{ docker::control::{ComposeAttachedNodeControl, ComposeNodeControl}, - env::ComposeDeployEnv, + env::{ComposeCfgsyncEnv, ComposeDeployEnv}, errors::ComposeRunnerError, infrastructure::{ environment::StackEnvironment, @@ -39,11 +39,17 @@ use crate::{ const PRINT_ENDPOINTS_ENV: &str = "TESTNET_PRINT_ENDPOINTS"; -pub struct DeploymentOrchestrator { +pub struct DeploymentOrchestrator +where + E: ComposeCfgsyncEnv, +{ deployer: ComposeDeployer, } -impl DeploymentOrchestrator { +impl DeploymentOrchestrator +where + E: ComposeCfgsyncEnv, +{ pub const fn new(deployer: ComposeDeployer) -> Self { Self { deployer } } @@ -330,7 +336,7 @@ impl DeploymentOrchestrator { fn log_deploy_start( &self, scenario: &Scenario, - descriptors: &E::Deployment, + descriptors: &::Deployment, deployment_policy: DeploymentPolicy, observability: &ObservabilityInputs, ) { @@ -648,15 +654,21 @@ fn profiling_url(host: &str, api_port: u16) -> String { format!("http://{host}:{api_port}/debug/pprof/profile?seconds=15&format=proto") } -struct PreparedDeployment { +struct PreparedDeployment +where + E: ComposeCfgsyncEnv, +{ environment: StackEnvironment, - descriptors: E::Deployment, + descriptors: ::Deployment, } -async fn prepare_deployment( +async fn prepare_deployment( setup: DeploymentSetup<'_, E>, observability: &ObservabilityInputs, -) -> Result, ComposeRunnerError> { +) -> Result, ComposeRunnerError> +where + E: ComposeCfgsyncEnv, +{ let DeploymentContext { environment, descriptors, diff --git a/testing-framework/deployers/compose/src/deployer/setup.rs b/testing-framework/deployers/compose/src/deployer/setup.rs index 71b565f..15152eb 100644 --- a/testing-framework/deployers/compose/src/deployer/setup.rs +++ b/testing-framework/deployers/compose/src/deployer/setup.rs @@ -1,26 +1,38 @@ -use testing_framework_core::{scenario::ObservabilityInputs, topology::DeploymentDescriptor}; +use testing_framework_core::{ + scenario::{Application, ObservabilityInputs}, + topology::DeploymentDescriptor, +}; use tracing::info; use crate::{ docker::ensure_docker_available, - env::ComposeDeployEnv, + env::ComposeCfgsyncEnv, errors::ComposeRunnerError, infrastructure::environment::{ StackEnvironment, ensure_supported_topology, prepare_environment, }, }; -pub struct DeploymentSetup<'a, E: ComposeDeployEnv> { - descriptors: &'a E::Deployment, +pub struct DeploymentSetup<'a, E> +where + E: ComposeCfgsyncEnv, +{ + descriptors: &'a ::Deployment, } -pub struct DeploymentContext<'a, E: ComposeDeployEnv> { - pub descriptors: &'a E::Deployment, +pub struct DeploymentContext<'a, E> +where + E: ComposeCfgsyncEnv, +{ + pub descriptors: &'a ::Deployment, pub environment: StackEnvironment, } -impl<'a, E: ComposeDeployEnv> DeploymentSetup<'a, E> { - pub fn new(descriptors: &'a E::Deployment) -> Self { +impl<'a, E> DeploymentSetup<'a, E> +where + E: ComposeCfgsyncEnv, +{ + pub fn new(descriptors: &'a ::Deployment) -> Self { Self { descriptors } } diff --git a/testing-framework/deployers/compose/src/descriptor/node.rs b/testing-framework/deployers/compose/src/descriptor/node.rs index c5f769b..b8adba4 100644 --- a/testing-framework/deployers/compose/src/descriptor/node.rs +++ b/testing-framework/deployers/compose/src/descriptor/node.rs @@ -9,6 +9,8 @@ pub struct NodeDescriptor { volumes: Vec, extra_hosts: Vec, ports: Vec, + #[serde(skip)] + container_ports: Vec, environment: Vec, #[serde(skip_serializing_if = "Option::is_none")] platform: Option, @@ -49,6 +51,7 @@ impl NodeDescriptor { volumes: Vec, extra_hosts: Vec, ports: Vec, + container_ports: Vec, environment: Vec, platform: Option, ) -> Self { @@ -59,15 +62,61 @@ impl NodeDescriptor { volumes, extra_hosts, ports, + container_ports, environment, platform, } } + #[allow(clippy::too_many_arguments)] + pub fn with_loopback_ports( + name: impl Into, + image: impl Into, + entrypoint: impl Into, + volumes: Vec, + extra_hosts: Vec, + container_ports: Vec, + environment: Vec, + platform: Option, + ) -> Self { + Self::new( + name, + image, + entrypoint, + volumes, + extra_hosts, + container_ports + .iter() + .copied() + .map(Self::loopback_port_binding) + .collect(), + container_ports, + environment, + platform, + ) + } + + #[must_use] + pub fn loopback_port_binding(port: u16) -> String { + format!("127.0.0.1::{port}") + } + pub fn ports(&self) -> &[String] { &self.ports } + pub fn container_ports(&self) -> &[u16] { + &self.container_ports + } + + pub fn image(&self) -> &str { + &self.image + } + + pub fn platform(&self) -> Option<&str> { + self.platform.as_deref() + } + #[cfg(test)] pub fn test_ports(&self) -> &[String] { self.ports() diff --git a/testing-framework/deployers/compose/src/docker/config_server.rs b/testing-framework/deployers/compose/src/docker/config_server.rs new file mode 100644 index 0000000..071f1f9 --- /dev/null +++ b/testing-framework/deployers/compose/src/docker/config_server.rs @@ -0,0 +1,239 @@ +use std::{ + path::{Path, PathBuf}, + process::Command as StdCommand, + time::Duration, +}; + +use tokio::process::Command; +use tracing::{debug, info, warn}; + +use crate::{docker::commands::run_docker_command, env::ConfigServerHandle}; + +#[derive(Clone, Debug)] +pub struct DockerPortBinding { + pub host_port: u16, + pub container_port: u16, +} + +impl DockerPortBinding { + #[must_use] + pub fn tcp(host_port: u16, container_port: u16) -> Self { + Self { + host_port, + container_port, + } + } +} + +#[derive(Clone, Debug)] +pub struct DockerVolumeMount { + pub host_path: PathBuf, + pub container_path: String, + pub read_only: bool, +} + +impl DockerVolumeMount { + #[must_use] + pub fn read_only(host_path: PathBuf, container_path: String) -> Self { + Self { + host_path, + container_path, + read_only: true, + } + } +} + +#[derive(Clone, Debug)] +pub struct DockerConfigServerSpec { + pub container_name: String, + pub network: String, + pub network_alias: Option, + pub platform: Option, + pub workdir: Option, + pub entrypoint: String, + pub image: String, + pub args: Vec, + pub env: Vec<(String, String)>, + pub ports: Vec, + pub mounts: Vec, +} + +impl DockerConfigServerSpec { + #[must_use] + pub fn new(container_name: String, network: String, entrypoint: String, image: String) -> Self { + Self { + container_name, + network, + network_alias: None, + platform: None, + workdir: None, + entrypoint, + image, + args: Vec::new(), + env: Vec::new(), + ports: Vec::new(), + mounts: Vec::new(), + } + } + + #[must_use] + pub fn with_network_alias(mut self, alias: String) -> Self { + self.network_alias = Some(alias); + self + } + + #[must_use] + pub fn with_platform(mut self, platform: Option) -> Self { + self.platform = platform; + self + } + + #[must_use] + pub fn with_workdir(mut self, workdir: String) -> Self { + self.workdir = Some(workdir); + self + } + + #[must_use] + pub fn with_args(mut self, args: Vec) -> Self { + self.args = args; + self + } + + #[must_use] + pub fn with_env(mut self, env: Vec<(String, String)>) -> Self { + self.env = env; + self + } + + #[must_use] + pub fn with_ports(mut self, ports: Vec) -> Self { + self.ports = ports; + self + } + + #[must_use] + pub fn with_mounts(mut self, mounts: Vec) -> Self { + self.mounts = mounts; + self + } +} + +#[derive(Debug)] +pub struct DockerConfigServerHandle { + name: String, + stopped: bool, +} + +impl DockerConfigServerHandle { + #[must_use] + pub fn new(name: String) -> Self { + Self { + name, + stopped: false, + } + } +} + +impl ConfigServerHandle for DockerConfigServerHandle { + fn shutdown(&mut self) { + if self.stopped { + return; + } + + let name = self.name.clone(); + let status = StdCommand::new("docker") + .arg("rm") + .arg("-f") + .arg(&name) + .status(); + match status { + Ok(status) if status.success() => { + debug!(container = name, "removed config server container"); + } + Ok(status) => { + warn!(container = name, status = ?status, "failed to remove config server container"); + } + Err(err) => { + warn!(container = name, error = ?err, "failed to spawn docker rm for config server container"); + } + } + + self.stopped = true; + } + + fn mark_preserved(&mut self) { + self.stopped = true; + } + + fn container_name(&self) -> Option<&str> { + Some(self.name.as_str()) + } +} + +pub async fn start_docker_config_server( + spec: &DockerConfigServerSpec, + timeout: Duration, + description: &str, +) -> Result { + run_docker_command(build_docker_run_command(spec), timeout, description).await?; + info!(container = %spec.container_name, image = %spec.image, "docker config server started"); + Ok(DockerConfigServerHandle::new(spec.container_name.clone())) +} + +fn build_docker_run_command(spec: &DockerConfigServerSpec) -> Command { + let mut command = Command::new("docker"); + command + .arg("run") + .arg("-d") + .arg("--name") + .arg(&spec.container_name) + .arg("--network") + .arg(&spec.network); + + if let Some(platform) = &spec.platform { + command.arg("--platform").arg(platform); + } + + command.arg("--entrypoint").arg(&spec.entrypoint); + + if let Some(alias) = &spec.network_alias { + command.arg("--network-alias").arg(alias); + } + + if let Some(workdir) = &spec.workdir { + command.arg("--workdir").arg(workdir); + } + + for (key, value) in &spec.env { + command.arg("-e").arg(format!("{key}={value}")); + } + + for port in &spec.ports { + command + .arg("-p") + .arg(format!("{}:{}", port.host_port, port.container_port)); + } + + for mount in &spec.mounts { + command + .arg("-v") + .arg(volume_mount_arg(mount, mount.host_path.as_path())); + } + + command.arg(&spec.image).args(&spec.args); + command +} + +fn volume_mount_arg(mount: &DockerVolumeMount, host_path: &Path) -> String { + let resolved_host_path = host_path + .canonicalize() + .unwrap_or_else(|_| host_path.to_path_buf()); + let mode = if mount.read_only { ":ro" } else { "" }; + format!( + "{}:{}{}", + resolved_host_path.display(), + mount.container_path, + mode + ) +} diff --git a/testing-framework/deployers/compose/src/docker/mod.rs b/testing-framework/deployers/compose/src/docker/mod.rs index c1b4581..f9d56cb 100644 --- a/testing-framework/deployers/compose/src/docker/mod.rs +++ b/testing-framework/deployers/compose/src/docker/mod.rs @@ -1,29 +1,21 @@ pub mod attached; pub mod commands; +pub mod config_server; pub mod control; pub mod platform; pub mod workspace; -use std::{ - env, io, - path::{Path, PathBuf}, - process::{ExitStatus, Stdio}, - time::Duration, -}; +use std::{process::Stdio, time::Duration}; use testing_framework_core::adjust_timeout; use tokio::{process::Command, time::timeout}; -use tracing::{debug, info, warn}; +use tracing::{debug, warn}; -use crate::{ - docker::commands::ComposeCommandError, errors::ComposeRunnerError, - infrastructure::template::repository_root, -}; +use crate::{docker::commands::ComposeCommandError, errors::ComposeRunnerError}; -const IMAGE_BUILD_TIMEOUT: Duration = Duration::from_secs(600); const DOCKER_INFO_TIMEOUT: Duration = Duration::from_secs(15); const IMAGE_INSPECT_TIMEOUT: Duration = Duration::from_secs(60); -pub(super) const DEFAULT_ASSETS_STACK_DIR: &str = "logos/infra/assets/stack"; +pub(super) const DEFAULT_ASSETS_STACK_DIR: &str = "testing-framework/assets/stack"; /// Checks that `docker info` succeeds within a timeout. pub async fn ensure_docker_available() -> Result<(), ComposeRunnerError> { @@ -50,20 +42,16 @@ pub async fn ensure_docker_available() -> Result<(), ComposeRunnerError> { /// Verify an image exists locally, optionally building it for the default tag. pub async fn ensure_image_present( image: &str, - platform: Option<&str>, + _platform: Option<&str>, ) -> Result<(), ComposeRunnerError> { if docker_image_exists(image).await? { debug!(image, "docker image already present"); return Ok(()); } - if !is_local_test_image(image) { - return Err(ComposeRunnerError::MissingImage { - image: image.to_owned(), - }); - } - - build_local_image(image, platform).await + Err(ComposeRunnerError::MissingImage { + image: image.to_owned(), + }) } /// Returns true when `docker image inspect` succeeds for the image. @@ -87,132 +75,3 @@ pub async fn docker_image_exists(image: &str) -> Result, -) -> Result<(), ComposeRunnerError> { - let repo_root = - repository_root().map_err(|source| ComposeRunnerError::ImageBuild { source })?; - info!( - image, - "building compose test image via scripts/build/build_test_image.sh" - ); - let mut cmd = build_local_image_command(&repo_root, image, platform)?; - - match run_build_command_with_timeout(image, &mut cmd).await? { - Ok(code) if code.success() => { - info!(image, platform = ?platform, "test image build completed"); - Ok(()) - } - - Ok(code) => { - warn!(image, status = ?code, "test image build failed"); - Err(ComposeRunnerError::Compose(ComposeCommandError::Failed { - command: String::from("scripts/build/build_test_image.sh"), - status: code, - })) - } - - Err(err) => { - warn!(image, error = ?err, "test image build spawn failed"); - Err(ComposeRunnerError::ImageBuild { source: err.into() }) - } - } -} - -fn build_local_image_command( - repo_root: &Path, - image: &str, - platform: Option<&str>, -) -> Result { - let runtime_dockerfile = stack_assets_root(repo_root).join("Dockerfile.runtime"); - let mut cmd = Command::new("bash"); - - cmd.arg(repo_root.join("scripts/build/build_test_image.sh")) - .arg("--tag") - .arg(image) - .arg("--dockerfile") - .arg(runtime_dockerfile) - // Make the build self-contained (don't require a local bundle tar). - .arg("--no-restore") - .current_dir(repo_root); - - if let Some(build_platform) = select_build_platform(platform) { - cmd.env("DOCKER_DEFAULT_PLATFORM", build_platform); - } - - apply_optional_circuits_flags(&mut cmd); - - Ok(cmd) -} - -async fn run_build_command_with_timeout( - image: &str, - cmd: &mut Command, -) -> Result, ComposeRunnerError> { - let timeout_duration = adjust_timeout(IMAGE_BUILD_TIMEOUT); - - timeout(timeout_duration, cmd.status()).await.map_err(|_| { - warn!( - image, - timeout = ?IMAGE_BUILD_TIMEOUT, - "test image build timed out" - ); - ComposeRunnerError::Compose(ComposeCommandError::Timeout { - command: String::from("scripts/build/build_test_image.sh"), - timeout: timeout_duration, - }) - }) -} - -fn select_build_platform(platform: Option<&str>) -> Option { - platform.map(String::from).or_else(|| { - let host_arch = env::consts::ARCH; - match host_arch { - "aarch64" | "arm64" => Some(String::from("linux/arm64")), - "x86_64" => Some(String::from("linux/amd64")), - _ => None, - } - }) -} - -fn apply_optional_circuits_flags(cmd: &mut Command) { - if let Some(circuits_platform) = nonempty_env("COMPOSE_CIRCUITS_PLATFORM") { - cmd.arg("--circuits-platform").arg(circuits_platform); - } - - if let Some(value) = nonempty_env("CIRCUITS_OVERRIDE") { - cmd.arg("--circuits-override").arg(value); - } -} - -fn nonempty_env(key: &str) -> Option { - env::var(key).ok().filter(|value| !value.is_empty()) -} - -fn stack_assets_root(repo_root: &Path) -> PathBuf { - if let Some(override_dir) = assets_override_dir(repo_root) - && override_dir.exists() - { - return override_dir; - } - - repo_root.join(DEFAULT_ASSETS_STACK_DIR) -} - -fn is_local_test_image(image: &str) -> bool { - image == "logos-blockchain-testing:local" -} - -fn assets_override_dir(repo_root: &Path) -> Option { - env::var("REL_ASSETS_STACK_DIR").ok().map(|value| { - let path = PathBuf::from(value); - if path.is_absolute() { - path - } else { - repo_root.join(path) - } - }) -} diff --git a/testing-framework/deployers/compose/src/docker/workspace.rs b/testing-framework/deployers/compose/src/docker/workspace.rs index 0ac767d..6bcdaff 100644 --- a/testing-framework/deployers/compose/src/docker/workspace.rs +++ b/testing-framework/deployers/compose/src/docker/workspace.rs @@ -103,7 +103,12 @@ fn stack_assets_root(repo_root: &Path) -> PathBuf { return override_dir; } - repo_root.join(DEFAULT_ASSETS_STACK_DIR) + let default_stack = repo_root.join(DEFAULT_ASSETS_STACK_DIR); + if default_stack.exists() { + return default_stack; + } + + current_dir_runtime_assets().unwrap_or(default_stack) } fn stack_scripts_root(repo_root: &Path, stack_source: &Path) -> PathBuf { @@ -130,6 +135,14 @@ fn resolve_workspace_relative_path(repo_root: &Path, path: PathBuf) -> PathBuf { repo_root.join(path) } +fn current_dir_runtime_assets() -> Option { + let candidate = env::current_dir() + .ok()? + .join("tests/testing_framework/assets/runtime"); + + candidate.exists().then_some(candidate) +} + fn copy_dir_recursive(source: &Path, target: &Path) -> Result<()> { fs::create_dir_all(target) .with_context(|| format!("creating target dir {}", target.display()))?; diff --git a/testing-framework/deployers/compose/src/env.rs b/testing-framework/deployers/compose/src/env.rs index 42de069..ff9692d 100644 --- a/testing-framework/deployers/compose/src/env.rs +++ b/testing-framework/deployers/compose/src/env.rs @@ -1,15 +1,24 @@ -use std::{env, path::Path}; +use std::{path::Path, time::Duration}; use async_trait::async_trait; use reqwest::Url; -use testing_framework_core::scenario::{ - Application, DynError, HttpReadinessRequirement, NodeClients, - wait_for_http_ports_with_host_and_requirement, wait_http_readiness, +use testing_framework_core::{ + cfgsync::{ + CfgsyncOutputPaths, MaterializedArtifacts, RegistrationServerRenderOptions, + StaticArtifactRenderer, render_and_write_registration_server, + }, + scenario::{ + Application, DynError, HttpReadinessRequirement, NodeClients, + wait_for_http_ports_with_host_and_requirement, wait_http_readiness, + }, }; use crate::{ descriptor::{ComposeDescriptor, NodeDescriptor}, - infrastructure::ports::{HostPortMapping, NodeContainerPorts, NodeHostPorts}, + docker::config_server::DockerConfigServerSpec, + infrastructure::ports::{ + HostPortMapping, NodeContainerPorts, NodeHostPorts, compose_runner_host, + }, }; /// Handle returned by a compose config server (cfgsync or equivalent). @@ -24,14 +33,17 @@ pub trait ConfigServerHandle: Send + Sync { /// Compose-specific topology surface needed by the runner. #[async_trait] pub trait ComposeDeployEnv: Application { - type ConfigHandle: ConfigServerHandle; - /// Produce the compose descriptor for the given topology. - fn compose_descriptor(topology: &Self::Deployment, cfgsync_port: u16) -> ComposeDescriptor; + fn compose_descriptor( + topology: &::Deployment, + cfgsync_port: u16, + ) -> ComposeDescriptor; /// Container ports (API/testing) per node, used for docker-compose port /// discovery. - fn node_container_ports(topology: &Self::Deployment) -> Vec { + fn node_container_ports( + topology: &::Deployment, + ) -> Vec { let descriptor = Self::compose_descriptor(topology, 0); descriptor .nodes() @@ -41,20 +53,60 @@ pub trait ComposeDeployEnv: Application { .collect() } - /// Update the config server template based on topology. - fn update_cfgsync_config( + /// Hostnames used when rewriting node configs for cfgsync delivery. + fn cfgsync_hostnames(topology: &::Deployment) -> Vec; + + /// App-specific cfgsync artifact enrichment. + fn enrich_cfgsync_artifacts( + _topology: &::Deployment, + _artifacts: &mut MaterializedArtifacts, + ) -> Result<(), DynError> { + Ok(()) + } + + /// Render and write cfgsync runtime files for the current topology. + fn write_cfgsync_config( path: &Path, - topology: &Self::Deployment, + topology: &::Deployment, port: u16, metrics_otlp_ingest_url: Option<&Url>, - ) -> Result<(), DynError>; + ) -> Result<(), DynError> + where + Self: Sized + StaticArtifactRenderer::Deployment>, + { + let _ = metrics_otlp_ingest_url; + let options = RegistrationServerRenderOptions { + port: Some(port), + artifacts_path: None, + }; + let artifacts_path = cfgsync_artifacts_path(path); + let output = CfgsyncOutputPaths { + config_path: path, + artifacts_path: &artifacts_path, + }; - /// Start the config server and return its handle. - async fn start_cfgsync( + render_and_write_registration_server::( + topology, + &Self::cfgsync_hostnames(topology), + options, + output, + |artifacts| Self::enrich_cfgsync_artifacts(topology, artifacts), + )?; + + Ok(()) + } + + /// Build the config server container specification. + fn cfgsync_container_spec( cfgsync_path: &Path, port: u16, network: &str, - ) -> Result; + ) -> Result; + + /// Timeout used when launching the config server container. + fn cfgsync_start_timeout() -> Duration { + Duration::from_secs(180) + } /// Build node clients from discovered host ports. fn node_client_from_ports( @@ -64,7 +116,7 @@ pub trait ComposeDeployEnv: Application { /// Build node clients from discovered host ports. fn build_node_clients( - _topology: &Self::Deployment, + _topology: &::Deployment, host_ports: &HostPortMapping, host: &str, ) -> Result, DynError> @@ -79,17 +131,6 @@ pub trait ComposeDeployEnv: Application { Ok(NodeClients::new(clients)) } - /// Return the compose image name and optional platform override. - /// - /// Defaults: - /// - image: `COMPOSE_RUNNER_IMAGE` or `logos-blockchain-testing:local` - /// - platform: `COMPOSE_RUNNER_PLATFORM` when set - fn compose_image() -> (String, Option) { - let image = compose_image_from_env(); - let platform = env::var("COMPOSE_RUNNER_PLATFORM").ok(); - (image, platform) - } - /// Path used by default readiness checks. fn readiness_path() -> &'static str { "/" @@ -97,12 +138,12 @@ pub trait ComposeDeployEnv: Application { /// Host used by default remote readiness checks. fn compose_runner_host() -> String { - "127.0.0.1".to_string() + compose_runner_host() } /// Remote readiness probe for node APIs. async fn wait_remote_readiness( - _topology: &Self::Deployment, + _topology: &::Deployment, mapping: &HostPortMapping, requirement: HttpReadinessRequirement, ) -> Result<(), DynError> { @@ -129,20 +170,25 @@ pub trait ComposeDeployEnv: Application { } } -fn parse_container_port(entry: &str) -> Option { - entry.rsplit(':').next()?.parse().ok() +pub trait ComposeCfgsyncEnv: + ComposeDeployEnv + StaticArtifactRenderer::Deployment> +{ } -fn compose_image_from_env() -> String { - env::var("COMPOSE_RUNNER_IMAGE") - .unwrap_or_else(|_| String::from("logos-blockchain-testing:local")) +impl ComposeCfgsyncEnv for T where + T: ComposeDeployEnv + StaticArtifactRenderer::Deployment> +{ +} + +fn cfgsync_artifacts_path(config_path: &Path) -> std::path::PathBuf { + config_path + .parent() + .unwrap_or(config_path) + .join("cfgsync.artifacts.yaml") } fn parse_node_container_ports(index: usize, node: &NodeDescriptor) -> Option { - let mut ports = node - .ports() - .iter() - .filter_map(|entry| parse_container_port(entry)); + let mut ports = node.container_ports().iter().copied(); let api = ports.next()?; let testing = ports.next()?; diff --git a/testing-framework/deployers/compose/src/infrastructure/environment.rs b/testing-framework/deployers/compose/src/infrastructure/environment.rs index b4bb6bd..5612aba 100644 --- a/testing-framework/deployers/compose/src/infrastructure/environment.rs +++ b/testing-framework/deployers/compose/src/infrastructure/environment.rs @@ -1,4 +1,5 @@ use std::{ + collections::BTreeSet, net::{Ipv4Addr, TcpListener as StdTcpListener}, path::{Path, PathBuf}, time::Duration, @@ -6,7 +7,12 @@ use std::{ use anyhow::anyhow; use reqwest::Url; -use testing_framework_core::{scenario::internal::CleanupGuard, topology::DeploymentDescriptor}; +use testing_framework_core::{ + adjust_timeout, + cfgsync::StaticArtifactRenderer, + scenario::{Application, internal::CleanupGuard}, + topology::DeploymentDescriptor, +}; use tokio::{net::TcpStream, process::Command}; use tokio_retry::{Retry, strategy::FixedInterval}; use tracing::{debug, error, info, warn}; @@ -15,10 +21,11 @@ use uuid::Uuid; use crate::{ docker::{ commands::{compose_create, compose_up, dump_compose_logs}, + config_server::start_docker_config_server, ensure_image_present, workspace::ComposeWorkspace, }, - env::{ComposeDeployEnv, ConfigServerHandle}, + env::{ComposeCfgsyncEnv, ComposeDeployEnv, ConfigServerHandle}, errors::{ComposeRunnerError, ConfigError, WorkspaceError}, infrastructure::template::write_compose_file, lifecycle::cleanup::RunnerCleanup, @@ -183,12 +190,15 @@ pub fn prepare_workspace_logged() -> Result } /// Update cfgsync config and emit setup logs. -pub fn update_cfgsync_logged( +pub fn update_cfgsync_logged( workspace: &WorkspaceState, - descriptors: &E::Deployment, + descriptors: &::Deployment, cfgsync_port: u16, metrics_otlp_ingest_url: Option<&Url>, -) -> Result<(), ComposeRunnerError> { +) -> Result<(), ComposeRunnerError> +where + E: ComposeCfgsyncEnv, +{ info!(cfgsync_port, "updating cfgsync configuration"); configure_cfgsync::( @@ -210,14 +220,26 @@ pub async fn start_cfgsync_stage( info!(cfgsync_port = cfgsync_port, "launching cfgsync server"); let network = compose_network_name(project_name); - let handle = E::start_cfgsync(&workspace.cfgsync_path, cfgsync_port, &network) - .await - .map_err(|source| { + let spec = E::cfgsync_container_spec(&workspace.cfgsync_path, cfgsync_port, &network).map_err( + |source| { ComposeRunnerError::Config(ConfigError::CfgsyncStart { port: cfgsync_port, source, }) - })?; + }, + )?; + let handle = start_docker_config_server( + &spec, + adjust_timeout(E::cfgsync_start_timeout()), + "docker run cfgsync server", + ) + .await + .map_err(|source| { + ComposeRunnerError::Config(ConfigError::CfgsyncStart { + port: cfgsync_port, + source: source.into(), + }) + })?; wait_for_cfgsync_ready(cfgsync_port, Some(&handle)).await?; log_cfgsync_started(&handle); @@ -226,13 +248,16 @@ pub async fn start_cfgsync_stage( } /// Write cfgsync YAML from topology data. -pub fn configure_cfgsync( +pub fn configure_cfgsync( workspace: &WorkspaceState, - descriptors: &E::Deployment, + descriptors: &::Deployment, cfgsync_port: u16, metrics_otlp_ingest_url: Option<&Url>, -) -> Result<(), ConfigError> { - E::update_cfgsync_config( +) -> Result<(), ConfigError> +where + E: ComposeCfgsyncEnv, +{ + E::write_cfgsync_config( &workspace.cfgsync_path, descriptors, cfgsync_port, @@ -323,10 +348,13 @@ pub async fn bring_up_stack_logged( } /// Prepare workspace, cfgsync, compose artifacts, and launch the stack. -pub async fn prepare_environment( - descriptors: &E::Deployment, +pub async fn prepare_environment( + descriptors: &::Deployment, metrics_otlp_ingest_url: Option<&Url>, -) -> Result { +) -> Result +where + E: ComposeCfgsyncEnv, +{ let prepared = prepare_stack_artifacts::(descriptors, metrics_otlp_ingest_url).await?; let mut cfgsync_handle = start_cfgsync_for_prepared::(&prepared).await?; start_compose_stack(&prepared, cfgsync_handle.as_mut()).await?; @@ -339,10 +367,13 @@ pub async fn prepare_environment( } /// Prepare workspace, cfgsync, and compose artifacts without starting services. -pub async fn prepare_environment_manual( - descriptors: &E::Deployment, +pub async fn prepare_environment_manual( + descriptors: &::Deployment, metrics_otlp_ingest_url: Option<&Url>, -) -> Result { +) -> Result +where + E: ComposeCfgsyncEnv, +{ let prepared = prepare_stack_artifacts::(descriptors, metrics_otlp_ingest_url).await?; let cfgsync_handle = start_cfgsync_for_prepared::(&prepared).await?; @@ -354,10 +385,13 @@ pub async fn prepare_environment_manual( )) } -async fn prepare_stack_artifacts( - descriptors: &E::Deployment, +async fn prepare_stack_artifacts( + descriptors: &::Deployment, metrics_otlp_ingest_url: Option<&Url>, -) -> Result { +) -> Result +where + E: ComposeDeployEnv + StaticArtifactRenderer::Deployment>, +{ let workspace = prepare_workspace_logged()?; let cfgsync_port = allocate_cfgsync_port()?; update_cfgsync_logged::( @@ -366,7 +400,7 @@ async fn prepare_stack_artifacts( cfgsync_port, metrics_otlp_ingest_url, )?; - ensure_compose_image_present::().await?; + ensure_compose_images_present::(&workspace, descriptors, cfgsync_port).await?; let compose_path = render_compose_logged::(&workspace, descriptors, cfgsync_port)?; let project_name = create_project_name(); compose_create(&compose_path, &project_name, &workspace.root).await?; @@ -379,9 +413,36 @@ async fn prepare_stack_artifacts( }) } -async fn ensure_compose_image_present() -> Result<(), ComposeRunnerError> { - let (image, platform) = E::compose_image(); - ensure_image_present(&image, platform.as_deref()).await +async fn ensure_compose_images_present( + workspace: &WorkspaceState, + descriptors: &E::Deployment, + cfgsync_port: u16, +) -> Result<(), ComposeRunnerError> { + let descriptor = E::compose_descriptor(descriptors, 0); + let mut images = descriptor + .nodes() + .iter() + .map(|node| (node.image().to_owned(), node.platform().map(str::to_owned))) + .collect::>(); + let cfgsync_spec = E::cfgsync_container_spec( + &workspace.cfgsync_path, + cfgsync_port, + &compose_network_name("compose-image-check"), + ) + .map_err(|source| { + ComposeRunnerError::Config(ConfigError::CfgsyncStart { + port: cfgsync_port, + source, + }) + })?; + + images.insert((cfgsync_spec.image, cfgsync_spec.platform)); + + for (image, platform) in images { + ensure_image_present(&image, platform.as_deref()).await?; + } + + Ok(()) } fn create_project_name() -> String { diff --git a/testing-framework/deployers/compose/src/infrastructure/ports.rs b/testing-framework/deployers/compose/src/infrastructure/ports.rs index e6e7bbd..ae531d2 100644 --- a/testing-framework/deployers/compose/src/infrastructure/ports.rs +++ b/testing-framework/deployers/compose/src/infrastructure/ports.rs @@ -102,11 +102,11 @@ pub(crate) async fn resolve_service_port_with( parse_port_from_output(service, container_port, &output) } -pub(crate) fn node_identifier(index: usize) -> String { +pub fn node_identifier(index: usize) -> String { format!("node-{index}") } -pub(crate) fn compose_runner_host() -> String { +pub fn compose_runner_host() -> String { let host = env::var("COMPOSE_RUNNER_HOST").unwrap_or_else(|_| "127.0.0.1".to_string()); debug!(host, "compose runner host resolved for readiness URLs"); host diff --git a/testing-framework/deployers/compose/src/lib.rs b/testing-framework/deployers/compose/src/lib.rs index 8cf715e..7cc118e 100644 --- a/testing-framework/deployers/compose/src/lib.rs +++ b/testing-framework/deployers/compose/src/lib.rs @@ -10,11 +10,15 @@ pub use deployer::{ComposeDeployer, ComposeDeploymentMetadata}; pub use descriptor::{ComposeDescriptor, EnvEntry, NodeDescriptor}; pub use docker::{ commands::{ComposeCommandError, compose_down, compose_up, dump_compose_logs}, + config_server::{ + DockerConfigServerHandle, DockerConfigServerSpec, DockerPortBinding, DockerVolumeMount, + start_docker_config_server, + }, platform::host_gateway_entry, }; pub use env::{ComposeDeployEnv, ConfigServerHandle}; pub use errors::ComposeRunnerError; pub use infrastructure::{ - ports::{HostPortMapping, NodeHostPorts}, + ports::{HostPortMapping, NodeHostPorts, compose_runner_host, node_identifier}, template::{TemplateError, repository_root, write_compose_file}, }; diff --git a/testing-framework/deployers/k8s/Cargo.toml b/testing-framework/deployers/k8s/Cargo.toml index b629a1b..f78e442 100644 --- a/testing-framework/deployers/k8s/Cargo.toml +++ b/testing-framework/deployers/k8s/Cargo.toml @@ -18,6 +18,9 @@ async-trait = { workspace = true } k8s-openapi = { features = ["latest"], version = "0.20" } kube = { default-features = false, features = ["client", "runtime", "rustls-tls"], version = "0.87" } reqwest = { features = ["json"], workspace = true } +serde = { workspace = true } +serde_yaml = { workspace = true } +tempfile = { workspace = true } testing-framework-core = { path = "../../core" } thiserror = { workspace = true } tokio = { features = ["macros", "net", "process", "rt-multi-thread", "sync", "time"], workspace = true } diff --git a/testing-framework/deployers/k8s/assets/helm/tf-runner/Chart.yaml b/testing-framework/deployers/k8s/assets/helm/tf-runner/Chart.yaml new file mode 100644 index 0000000..19a684e --- /dev/null +++ b/testing-framework/deployers/k8s/assets/helm/tf-runner/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: tf-runner +description: Generic Helm chart for testing-framework Kubernetes node runners +type: application +version: 0.1.0 +appVersion: "0.1.0" diff --git a/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/_helpers.tpl b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/_helpers.tpl new file mode 100644 index 0000000..37f5687 --- /dev/null +++ b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/_helpers.tpl @@ -0,0 +1,34 @@ +{{- define "tf-runner.chart" -}} +{{- .Chart.Name -}} +{{- end -}} + +{{- define "tf-runner.name" -}} +{{- include "tf-runner.chart" . -}} +{{- end -}} + +{{- define "tf-runner.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- printf "%s" .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} + +{{- define "tf-runner.labels" -}} +app.kubernetes.io/name: {{ include "tf-runner.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{- define "tf-runner.selectorLabels" -}} +app.kubernetes.io/name: {{ include "tf-runner.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{- define "tf-runner.nodeLabels" -}} +{{- $root := index . "root" -}} +{{- $index := index . "index" -}} +app.kubernetes.io/name: {{ include "tf-runner.chart" $root }} +app.kubernetes.io/instance: {{ $root.Release.Name }} +testing-framework/component: node +testing-framework/node-index: "{{ $index }}" +{{- end -}} diff --git a/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/bootstrap-deployment.yaml b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/bootstrap-deployment.yaml new file mode 100644 index 0000000..d62db89 --- /dev/null +++ b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/bootstrap-deployment.yaml @@ -0,0 +1,61 @@ +{{- if .Values.bootstrap.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "tf-runner.fullname" . }}-{{ .Values.bootstrap.serviceName }} + labels: + {{- include "tf-runner.labels" . | nindent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + {{- include "tf-runner.selectorLabels" . | nindent 6 }} + testing-framework/component: bootstrap + template: + metadata: + labels: + {{- include "tf-runner.selectorLabels" . | nindent 8 }} + testing-framework/component: bootstrap + spec: + containers: + - name: bootstrap + image: {{ .Values.bootstrap.image }} + imagePullPolicy: {{ .Values.bootstrap.imagePullPolicy }} + command: ["/bin/sh", "{{ .Values.assetMountPath }}/{{ .Values.bootstrap.scripts.startPath }}"] + ports: + - name: http + containerPort: {{ .Values.bootstrap.port }} + env: + {{- range $key, $value := .Values.bootstrap.env }} + - name: {{ $key }} + value: "{{ $value }}" + {{- end }} + volumeMounts: + - name: assets + mountPath: {{ .Values.assetMountPath }} + readOnly: true + {{- if .Values.bootstrap.writableMountPath }} + - name: bootstrap-storage + mountPath: {{ .Values.bootstrap.writableMountPath }} + {{- end }} + volumes: + - name: assets + configMap: + name: {{ include "tf-runner.fullname" . }}-assets + defaultMode: 0755 + items: + - key: bootstrap.primary.yaml + path: {{ .Values.bootstrap.files.primaryConfigPath }} + - key: bootstrap.artifacts.yaml + path: {{ .Values.bootstrap.files.artifactsConfigPath }} + {{- range $file := .Values.bootstrap.files.extraFiles }} + - key: {{ $file.key }} + path: {{ $file.path }} + {{- end }} + - key: bootstrap-start.sh + path: {{ .Values.bootstrap.scripts.startPath }} + {{- if .Values.bootstrap.writableMountPath }} + - name: bootstrap-storage + emptyDir: {} + {{- end }} +{{- end }} diff --git a/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/bootstrap-service.yaml b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/bootstrap-service.yaml new file mode 100644 index 0000000..071cb23 --- /dev/null +++ b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/bootstrap-service.yaml @@ -0,0 +1,17 @@ +{{- if .Values.bootstrap.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "tf-runner.fullname" . }}-{{ .Values.bootstrap.serviceName }} + labels: + {{- include "tf-runner.labels" . | nindent 4 }} +spec: + type: ClusterIP + selector: + {{- include "tf-runner.selectorLabels" . | nindent 4 }} + testing-framework/component: bootstrap + ports: + - name: http + port: {{ .Values.bootstrap.port }} + targetPort: http +{{- end }} diff --git a/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/configmap.yaml b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/configmap.yaml new file mode 100644 index 0000000..2eacd6d --- /dev/null +++ b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/configmap.yaml @@ -0,0 +1,45 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "tf-runner.fullname" . }}-assets + labels: + {{- include "tf-runner.labels" . | nindent 4 }} +data: + bootstrap.primary.yaml: | +{{- if .Values.bootstrap.files.primaryConfig }} +{{ .Values.bootstrap.files.primaryConfig | indent 4 }} +{{- else }} +{{ "" | indent 4 }} +{{- end }} + bootstrap.artifacts.yaml: | +{{- if .Values.bootstrap.files.artifactsConfig }} +{{ .Values.bootstrap.files.artifactsConfig | indent 4 }} +{{- else }} +{{ "" | indent 4 }} +{{- end }} +{{- range $file := .Values.bootstrap.files.extraFiles }} + {{ $file.key }}: | +{{- if $file.content }} +{{ $file.content | indent 4 }} +{{- else }} +{{ "" | indent 4 }} +{{- end }} +{{- end }} + bootstrap-start.sh: | +{{- if .Values.bootstrap.scripts.start }} +{{ .Values.bootstrap.scripts.start | indent 4 }} +{{- else }} +{{ "" | indent 4 }} +{{- end }} + runner-common-start.sh: | +{{- if .Values.runner.files.commonStart }} +{{ .Values.runner.files.commonStart | indent 4 }} +{{- else }} +{{ "" | indent 4 }} +{{- end }} + runner-node-start.sh: | +{{- if .Values.runner.files.nodeStart }} +{{ .Values.runner.files.nodeStart | indent 4 }} +{{- else }} +{{ "" | indent 4 }} +{{- end }} diff --git a/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/node-deployments.yaml b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/node-deployments.yaml new file mode 100644 index 0000000..9dea511 --- /dev/null +++ b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/node-deployments.yaml @@ -0,0 +1,69 @@ +{{- $root := . -}} +{{- $nodes := default (list) .Values.nodes.entries }} +{{- range $i, $node := $nodes }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "tf-runner.fullname" $root }}-node-{{ $i }} + labels: + {{- include "tf-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + {{- include "tf-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 6 }} + template: + metadata: + labels: + {{- include "tf-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 8 }} + spec: + containers: + - name: node + image: {{ $root.Values.nodeImage }} + imagePullPolicy: {{ $root.Values.nodeImagePullPolicy }} + command: ["/bin/sh", "{{ $root.Values.assetMountPath }}/{{ $root.Values.runner.files.nodeStartPath }}"] + ports: + {{- range $port := $node.ports }} + - name: {{ $port.name }} + containerPort: {{ $port.containerPort }} + {{- if $port.protocol }} + protocol: {{ $port.protocol }} + {{- end }} + {{- end }} + env: + {{- if $root.Values.bootstrap.enabled }} + - name: CFG_SERVER_ADDR + value: http://{{ include "tf-runner.fullname" $root }}-{{ $root.Values.bootstrap.serviceName }}:{{ $root.Values.bootstrap.port }} + {{- end }} + {{- range $key, $value := $node.env }} + - name: {{ $key }} + value: "{{ $value }}" + {{- end }} + volumeMounts: + - name: assets + mountPath: {{ $root.Values.assetMountPath }} + readOnly: true + volumes: + - name: assets + configMap: + name: {{ include "tf-runner.fullname" $root }}-assets + defaultMode: 0755 + items: + {{- if $root.Values.bootstrap.enabled }} + - key: bootstrap.primary.yaml + path: {{ $root.Values.bootstrap.files.primaryConfigPath }} + - key: bootstrap.artifacts.yaml + path: {{ $root.Values.bootstrap.files.artifactsConfigPath }} + {{- range $file := $root.Values.bootstrap.files.extraFiles }} + - key: {{ $file.key }} + path: {{ $file.path }} + {{- end }} + - key: bootstrap-start.sh + path: {{ $root.Values.bootstrap.scripts.startPath }} + {{- end }} + - key: runner-common-start.sh + path: {{ $root.Values.runner.files.commonStartPath }} + - key: runner-node-start.sh + path: {{ $root.Values.runner.files.nodeStartPath }} +{{- end }} diff --git a/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/node-services.yaml b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/node-services.yaml new file mode 100644 index 0000000..bc8fb1c --- /dev/null +++ b/testing-framework/deployers/k8s/assets/helm/tf-runner/templates/node-services.yaml @@ -0,0 +1,24 @@ +{{- $root := . -}} +{{- $nodes := default (list) .Values.nodes.entries }} +{{- range $i, $node := $nodes }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "tf-runner.fullname" $root }}-node-{{ $i }} + labels: + {{- include "tf-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 4 }} +spec: + type: NodePort + selector: + {{- include "tf-runner.nodeLabels" (dict "root" $root "index" $i) | nindent 4 }} + ports: + {{- range $port := $node.ports }} + - name: {{ $port.name }} + port: {{ $port.servicePort }} + targetPort: {{ $port.name }} + {{- if $port.protocol }} + protocol: {{ $port.protocol }} + {{- end }} + {{- end }} +{{- end }} diff --git a/testing-framework/deployers/k8s/assets/helm/tf-runner/values.yaml b/testing-framework/deployers/k8s/assets/helm/tf-runner/values.yaml new file mode 100644 index 0000000..2a01571 --- /dev/null +++ b/testing-framework/deployers/k8s/assets/helm/tf-runner/values.yaml @@ -0,0 +1,33 @@ +nodeImage: "" +nodeImagePullPolicy: IfNotPresent +fullnameOverride: "" +assetMountPath: /etc/testing-framework + +bootstrap: + enabled: false + image: "" + imagePullPolicy: IfNotPresent + serviceName: bootstrap + port: 4400 + env: {} + writableMountPath: "" + files: + primaryConfig: "" + artifactsConfig: "" + primaryConfigPath: bootstrap/primary.yaml + artifactsConfigPath: bootstrap/artifacts.yaml + extraFiles: [] + scripts: + start: "" + startPath: scripts/bootstrap-start.sh + +runner: + files: + commonStart: "" + nodeStart: "" + commonStartPath: scripts/runner-common-start.sh + nodeStartPath: scripts/runner-node-start.sh + +nodes: + count: 1 + entries: [] diff --git a/testing-framework/deployers/k8s/src/deployer/attach_provider.rs b/testing-framework/deployers/k8s/src/deployer/attach_provider.rs index dbc1bcc..6107d09 100644 --- a/testing-framework/deployers/k8s/src/deployer/attach_provider.rs +++ b/testing-framework/deployers/k8s/src/deployer/attach_provider.rs @@ -221,14 +221,6 @@ fn api_port_candidates(ports: Vec<(String, u16)>) -> Vec { return explicit_api; } - let non_testing: Vec = ports - .iter() - .filter_map(|(name, port)| (!name.contains("testing")).then_some(*port)) - .collect(); - if !non_testing.is_empty() { - return non_testing; - } - ports.into_iter().map(|(_, port)| port).collect() } diff --git a/testing-framework/deployers/k8s/src/deployer/orchestrator.rs b/testing-framework/deployers/k8s/src/deployer/orchestrator.rs index 279f035..612c97a 100644 --- a/testing-framework/deployers/k8s/src/deployer/orchestrator.rs +++ b/testing-framework/deployers/k8s/src/deployer/orchestrator.rs @@ -24,7 +24,7 @@ use crate::{ K8sDeploymentMetadata, attach_provider::{K8sAttachProvider, K8sAttachedClusterWait}, }, - env::K8sDeployEnv, + env::{HelmReleaseAssets, K8sDeployEnv}, infrastructure::cluster::{ ClusterEnvironment, ClusterEnvironmentError, NodeClientError, PortSpecs, RemoteReadinessError, build_node_clients, collect_port_specs, ensure_cluster_readiness, @@ -72,6 +72,7 @@ impl K8sDeployer { scenario: &Scenario, ) -> Result<(Runner, K8sDeploymentMetadata), K8sRunnerError> where + E::Assets: HelmReleaseAssets, Caps: RequiresNodeControl + ObservabilityCapabilityProvider + Send + Sync, { deploy_with_observability(self, scenario).await @@ -130,6 +131,7 @@ pub enum K8sRunnerError { impl Deployer for K8sDeployer where E: K8sDeployEnv, + E::Assets: HelmReleaseAssets, Caps: RequiresNodeControl + ObservabilityCapabilityProvider + Send + Sync, { type Error = K8sRunnerError; @@ -172,6 +174,7 @@ async fn deploy_with_observability( ) -> Result<(Runner, K8sDeploymentMetadata), K8sRunnerError> where E: K8sDeployEnv, + E::Assets: HelmReleaseAssets, Caps: ObservabilityCapabilityProvider + Send + Sync, { validate_supported_cluster_mode(scenario) @@ -394,6 +397,7 @@ async fn build_k8s_deployment( ) -> Result where E: K8sDeployEnv, + E::Assets: HelmReleaseAssets, Caps: ObservabilityCapabilityProvider, { let descriptors = scenario.deployment(); @@ -435,7 +439,10 @@ async fn setup_cluster( readiness_checks: bool, readiness_requirement: HttpReadinessRequirement, observability: &ObservabilityInputs, -) -> Result { +) -> Result +where + E::Assets: HelmReleaseAssets, +{ let (setup, cleanup) = prepare_cluster_setup::(client, descriptors, observability).await?; let mut cleanup_guard = Some(cleanup); @@ -468,7 +475,10 @@ async fn prepare_cluster_setup( client: &Client, descriptors: &E::Deployment, observability: &ObservabilityInputs, -) -> Result<(ClusterSetup, RunnerCleanup), K8sRunnerError> { +) -> Result<(ClusterSetup, RunnerCleanup), K8sRunnerError> +where + E::Assets: HelmReleaseAssets, +{ let assets = E::prepare_assets(descriptors, observability.metrics_otlp_ingest_url.as_ref()) .map_err(|source| K8sRunnerError::Assets { source })?; let nodes = descriptors.node_count(); diff --git a/testing-framework/deployers/k8s/src/env.rs b/testing-framework/deployers/k8s/src/env.rs index 353d7e9..44cf698 100644 --- a/testing-framework/deployers/k8s/src/env.rs +++ b/testing-framework/deployers/k8s/src/env.rs @@ -1,5 +1,5 @@ use std::{ - process, + env, process, time::{Duration, SystemTime, UNIX_EPOCH}, }; @@ -11,7 +11,36 @@ use testing_framework_core::scenario::{ wait_http_readiness, }; -use crate::{infrastructure::cluster::PortSpecs, lifecycle::cleanup::RunnerCleanup}; +use crate::{ + HelmReleaseBundle, + infrastructure::{cluster::PortSpecs, helm::install_release}, + lifecycle::cleanup::RunnerCleanup, +}; + +pub trait HelmReleaseAssets { + fn release_bundle(&self) -> HelmReleaseBundle; +} + +pub async fn install_helm_release_with_cleanup( + client: &Client, + assets: &A, + namespace: &str, + release: &str, +) -> Result { + let spec = assets + .release_bundle() + .install_spec(release.to_owned(), namespace.to_owned()); + + install_release(&spec).await?; + + let preserve = env::var("K8S_RUNNER_PRESERVE").is_ok(); + Ok(RunnerCleanup::new( + client.clone(), + namespace.to_owned(), + release.to_owned(), + preserve, + )) +} #[async_trait] pub trait K8sDeployEnv: Application { @@ -20,7 +49,7 @@ pub trait K8sDeployEnv: Application { /// Collect container port specs from the topology. fn collect_port_specs(topology: &Self::Deployment) -> PortSpecs; - /// Build deploy-time assets (charts, cfgsync config, scripts). + /// Build deploy-time assets (charts, config payloads, scripts). fn prepare_assets( topology: &Self::Deployment, metrics_otlp_ingest_url: Option<&Url>, @@ -33,7 +62,13 @@ pub trait K8sDeployEnv: Application { namespace: &str, release: &str, nodes: usize, - ) -> Result; + ) -> Result + where + Self::Assets: HelmReleaseAssets, + { + let _ = nodes; + install_helm_release_with_cleanup(client, assets, namespace, release).await + } /// Provide a namespace/release identifier pair. fn cluster_identifiers() -> (String, String) { @@ -49,20 +84,20 @@ pub trait K8sDeployEnv: Application { fn node_client_from_ports( host: &str, api_port: u16, - testing_port: u16, + auxiliary_port: u16, ) -> Result; /// Build node clients from forwarded ports. fn build_node_clients( host: &str, node_api_ports: &[u16], - node_testing_ports: &[u16], + node_auxiliary_ports: &[u16], ) -> Result, DynError> { node_api_ports .iter() - .zip(node_testing_ports.iter()) - .map(|(&api_port, &testing_port)| { - Self::node_client_from_ports(host, api_port, testing_port) + .zip(node_auxiliary_ports.iter()) + .map(|(&api_port, &auxiliary_port)| { + Self::node_client_from_ports(host, api_port, auxiliary_port) }) .collect() } diff --git a/testing-framework/deployers/k8s/src/infrastructure/chart_values.rs b/testing-framework/deployers/k8s/src/infrastructure/chart_values.rs new file mode 100644 index 0000000..c419980 --- /dev/null +++ b/testing-framework/deployers/k8s/src/infrastructure/chart_values.rs @@ -0,0 +1,255 @@ +use std::collections::BTreeMap; + +use serde::Serialize; + +#[derive(Debug, Clone, Serialize)] +pub struct RunnerChartValues { + #[serde(rename = "nodeImage")] + pub node_image: String, + #[serde(rename = "nodeImagePullPolicy")] + pub node_image_pull_policy: String, + #[serde(rename = "fullnameOverride")] + pub fullname_override: String, + #[serde(rename = "assetMountPath")] + pub asset_mount_path: String, + pub bootstrap: BootstrapValues, + pub runner: RunnerValues, + pub nodes: NodeGroup, +} + +impl RunnerChartValues { + #[must_use] + pub fn new( + node_image: String, + node_image_pull_policy: String, + fullname_override: String, + asset_mount_path: String, + nodes: NodeGroup, + ) -> Self { + Self { + node_image, + node_image_pull_policy, + fullname_override, + asset_mount_path, + bootstrap: BootstrapValues::disabled(), + runner: RunnerValues::default(), + nodes, + } + } +} + +#[derive(Debug, Clone)] +pub struct RunnerAssetLayout { + pub asset_mount_path: String, + pub bootstrap_primary_config_path: String, + pub bootstrap_artifacts_config_path: String, + pub bootstrap_start_path: String, + pub runner_common_start_path: String, + pub runner_node_start_path: String, +} + +impl RunnerAssetLayout { + #[must_use] + pub fn under_mount(mount_path: &str) -> Self { + Self { + asset_mount_path: mount_path.to_string(), + bootstrap_primary_config_path: "bootstrap/primary.yaml".to_string(), + bootstrap_artifacts_config_path: "bootstrap/artifacts.yaml".to_string(), + bootstrap_start_path: "scripts/bootstrap-start.sh".to_string(), + runner_common_start_path: "scripts/runner-common-start.sh".to_string(), + runner_node_start_path: "scripts/runner-node-start.sh".to_string(), + } + } + + #[must_use] + pub fn with_paths( + mount_path: &str, + bootstrap_primary_config_path: &str, + bootstrap_artifacts_config_path: &str, + bootstrap_start_path: &str, + runner_common_start_path: &str, + runner_node_start_path: &str, + ) -> Self { + Self { + asset_mount_path: mount_path.to_string(), + bootstrap_primary_config_path: bootstrap_primary_config_path.to_string(), + bootstrap_artifacts_config_path: bootstrap_artifacts_config_path.to_string(), + bootstrap_start_path: bootstrap_start_path.to_string(), + runner_common_start_path: runner_common_start_path.to_string(), + runner_node_start_path: runner_node_start_path.to_string(), + } + } +} + +#[derive(Debug, Clone, Serialize)] +pub struct BootstrapValues { + pub enabled: bool, + pub image: String, + #[serde(rename = "imagePullPolicy")] + pub image_pull_policy: String, + #[serde(rename = "serviceName")] + pub service_name: String, + pub port: u16, + pub env: BTreeMap, + #[serde(rename = "writableMountPath")] + pub writable_mount_path: String, + pub files: BootstrapFiles, + pub scripts: BootstrapScripts, +} + +impl BootstrapValues { + #[must_use] + pub fn disabled() -> Self { + Self { + enabled: false, + image: String::new(), + image_pull_policy: "IfNotPresent".to_string(), + service_name: "bootstrap".to_string(), + port: 0, + env: BTreeMap::new(), + writable_mount_path: String::new(), + files: BootstrapFiles::default(), + scripts: BootstrapScripts::default(), + } + } + + #[must_use] + pub fn enabled( + service_name: String, + image: String, + image_pull_policy: String, + port: u16, + ) -> Self { + Self { + enabled: true, + image, + image_pull_policy, + service_name, + port, + env: BTreeMap::new(), + writable_mount_path: String::new(), + files: BootstrapFiles::default(), + scripts: BootstrapScripts::default(), + } + } + + pub fn apply_layout(&mut self, layout: &RunnerAssetLayout) { + self.files.primary_config_path = layout.bootstrap_primary_config_path.clone(); + self.files.artifacts_config_path = layout.bootstrap_artifacts_config_path.clone(); + self.scripts.start_path = layout.bootstrap_start_path.clone(); + } +} + +#[derive(Debug, Clone, Default, Serialize)] +pub struct BootstrapFiles { + #[serde(rename = "primaryConfig")] + pub primary_config: String, + #[serde(rename = "artifactsConfig")] + pub artifacts_config: String, + #[serde(rename = "primaryConfigPath")] + pub primary_config_path: String, + #[serde(rename = "artifactsConfigPath")] + pub artifacts_config_path: String, + #[serde(rename = "extraFiles")] + pub extra_files: Vec, +} + +#[derive(Debug, Clone, Serialize)] +pub struct BootstrapExtraFile { + pub key: String, + pub path: String, + pub content: String, +} + +#[derive(Debug, Clone, Default, Serialize)] +pub struct BootstrapScripts { + pub start: String, + #[serde(rename = "startPath")] + pub start_path: String, +} + +#[derive(Debug, Clone, Default, Serialize)] +pub struct RunnerValues { + pub files: RunnerFiles, +} + +impl RunnerValues { + pub fn apply_layout(&mut self, layout: &RunnerAssetLayout) { + self.files.common_start_path = layout.runner_common_start_path.clone(); + self.files.node_start_path = layout.runner_node_start_path.clone(); + } +} + +#[derive(Debug, Clone, Default, Serialize)] +pub struct RunnerFiles { + #[serde(rename = "commonStart")] + pub common_start: String, + #[serde(rename = "nodeStart")] + pub node_start: String, + #[serde(rename = "commonStartPath")] + pub common_start_path: String, + #[serde(rename = "nodeStartPath")] + pub node_start_path: String, +} + +#[derive(Debug, Clone, Serialize)] +pub struct NodeGroup { + pub count: usize, + pub entries: Vec, +} + +impl NodeGroup { + #[must_use] + pub fn new(entries: Vec) -> Self { + Self { + count: entries.len(), + entries, + } + } +} + +#[derive(Debug, Clone, Serialize)] +pub struct NodeValues { + pub ports: Vec, + pub env: BTreeMap, +} + +impl NodeValues { + #[must_use] + pub fn new(ports: Vec, env: BTreeMap) -> Self { + Self { ports, env } + } +} + +#[derive(Debug, Clone, Serialize)] +pub struct NodePortValues { + pub name: String, + #[serde(rename = "containerPort")] + pub container_port: u16, + #[serde(rename = "servicePort")] + pub service_port: u16, + #[serde(skip_serializing_if = "Option::is_none")] + pub protocol: Option, +} + +impl NodePortValues { + #[must_use] + pub fn tcp(name: &str, port: u16) -> Self { + Self { + name: name.to_string(), + container_port: port, + service_port: port, + protocol: None, + } + } + + #[must_use] + pub fn udp(name: &str, port: u16) -> Self { + Self { + name: name.to_string(), + container_port: port, + service_port: port, + protocol: Some("UDP".to_string()), + } + } +} diff --git a/testing-framework/deployers/k8s/src/infrastructure/cluster.rs b/testing-framework/deployers/k8s/src/infrastructure/cluster.rs index 66574d4..7bc4298 100644 --- a/testing-framework/deployers/k8s/src/infrastructure/cluster.rs +++ b/testing-framework/deployers/k8s/src/infrastructure/cluster.rs @@ -27,7 +27,7 @@ pub struct ClusterEnvironment { cleanup: Option, node_host: String, node_api_ports: Vec, - node_testing_ports: Vec, + node_auxiliary_ports: Vec, port_forwards: Vec, } @@ -47,7 +47,7 @@ impl ClusterEnvironment { port_forwards: Vec, ) -> Self { let node_api_ports = ports.nodes.iter().map(|ports| ports.api).collect(); - let node_testing_ports = ports.nodes.iter().map(|ports| ports.testing).collect(); + let node_auxiliary_ports = ports.nodes.iter().map(|ports| ports.auxiliary).collect(); Self { client, @@ -56,7 +56,7 @@ impl ClusterEnvironment { cleanup: Some(cleanup), node_host: ports.node_host.clone(), node_api_ports, - node_testing_ports, + node_auxiliary_ports, port_forwards, } } @@ -99,7 +99,7 @@ impl ClusterEnvironment { } pub fn node_ports(&self) -> (&[u16], &[u16]) { - (&self.node_api_ports, &self.node_testing_ports) + (&self.node_api_ports, &self.node_auxiliary_ports) } } @@ -142,7 +142,7 @@ pub fn build_node_clients( let nodes = E::build_node_clients( &cluster.node_host, &cluster.node_api_ports, - &cluster.node_testing_ports, + &cluster.node_auxiliary_ports, ) .map_err(|source| NodeClientError::Build { source })?; @@ -157,7 +157,7 @@ pub async fn ensure_cluster_readiness( requirement: HttpReadinessRequirement, ) -> Result<(), RemoteReadinessError> { info!("waiting for remote readiness (API + membership)"); - let (node_api, _node_testing) = cluster.node_ports(); + let (node_api, _node_auxiliary) = cluster.node_ports(); let node_urls = readiness_urls(node_api, E::node_role(), &cluster.node_host)?; diff --git a/testing-framework/deployers/k8s/src/infrastructure/helm.rs b/testing-framework/deployers/k8s/src/infrastructure/helm.rs index 36c05ef..d372be2 100644 --- a/testing-framework/deployers/k8s/src/infrastructure/helm.rs +++ b/testing-framework/deployers/k8s/src/infrastructure/helm.rs @@ -1,11 +1,90 @@ use std::{ io, + path::PathBuf, process::{Output, Stdio}, }; use thiserror::Error; use tokio::process::Command; -use tracing::info; +use tracing::{debug, info}; + +#[derive(Debug, Clone)] +pub struct HelmValueSetting { + pub key: String, + pub value: String, +} + +#[derive(Debug, Clone)] +pub struct HelmFileSetting { + pub key: String, + pub path: PathBuf, +} + +#[derive(Debug, Clone)] +pub struct HelmInstallSpec { + pub release: String, + pub chart_path: PathBuf, + pub namespace: String, + pub values_files: Vec, + pub set_values: Vec, + pub set_files: Vec, + pub current_dir: Option, + pub wait_timeout: String, +} + +impl HelmInstallSpec { + #[must_use] + pub fn new(release: String, chart_path: PathBuf, namespace: String) -> Self { + Self { + release, + chart_path, + namespace, + values_files: Vec::new(), + set_values: Vec::new(), + set_files: Vec::new(), + current_dir: None, + wait_timeout: "5m".to_string(), + } + } +} + +#[derive(Debug, Clone)] +pub struct HelmReleaseBundle { + pub chart_path: PathBuf, + pub values_files: Vec, + pub set_values: Vec, + pub set_files: Vec, + pub current_dir: Option, + pub wait_timeout: String, +} + +impl HelmReleaseBundle { + #[must_use] + pub fn new(chart_path: PathBuf) -> Self { + Self { + chart_path, + values_files: Vec::new(), + set_values: Vec::new(), + set_files: Vec::new(), + current_dir: None, + wait_timeout: "5m".to_string(), + } + } + + #[must_use] + pub fn install_spec(&self, release: String, namespace: String) -> HelmInstallSpec { + HelmInstallSpec { + release, + chart_path: self.chart_path.clone(), + namespace, + values_files: self.values_files.clone(), + set_values: self.set_values.clone(), + set_files: self.set_files.clone(), + current_dir: self.current_dir.clone(), + wait_timeout: self.wait_timeout.clone(), + } + } +} /// Errors returned from Helm invocations. #[derive(Debug, Error)] @@ -41,6 +120,63 @@ pub async fn uninstall_release(release: &str, namespace: &str) -> Result<(), Hel Ok(()) } +pub async fn install_release(spec: &HelmInstallSpec) -> Result { + let command = format!("helm install {}", spec.release); + let output = run_helm_command(build_install_command(spec), &command).await?; + maybe_log_install_output(&command, &output); + Ok(output) +} + +fn build_install_command(spec: &HelmInstallSpec) -> Command { + let mut cmd = Command::new("helm"); + cmd.arg("install") + .arg(&spec.release) + .arg(&spec.chart_path) + .arg("--namespace") + .arg(&spec.namespace) + .arg("--create-namespace") + .arg("--wait") + .arg("--timeout") + .arg(&spec.wait_timeout); + + for value in &spec.set_values { + cmd.arg("--set") + .arg(format!("{}={}", value.key, value.value)); + } + + for values_file in &spec.values_files { + cmd.arg("-f").arg(values_file); + } + + for file in &spec.set_files { + cmd.arg("--set-file") + .arg(format!("{}={}", file.key, file.path.display())); + } + + if let Some(current_dir) = &spec.current_dir { + cmd.current_dir(current_dir); + } + + cmd +} + +fn maybe_log_install_output(command: &str, output: &Output) { + if std::env::var("K8S_RUNNER_DEBUG").is_err() { + return; + } + + debug!( + command, + stdout = %String::from_utf8_lossy(&output.stdout), + "helm install stdout" + ); + debug!( + command, + stderr = %String::from_utf8_lossy(&output.stderr), + "helm install stderr" + ); +} + async fn run_helm_command(mut cmd: Command, command: &str) -> Result { cmd.stdout(Stdio::piped()).stderr(Stdio::piped()); let output = cmd.output().await.map_err(|source| HelmError::Spawn { diff --git a/testing-framework/deployers/k8s/src/infrastructure/mod.rs b/testing-framework/deployers/k8s/src/infrastructure/mod.rs index 2ff4fb3..a7f181b 100644 --- a/testing-framework/deployers/k8s/src/infrastructure/mod.rs +++ b/testing-framework/deployers/k8s/src/infrastructure/mod.rs @@ -1,2 +1,4 @@ +pub mod chart_values; pub mod cluster; pub mod helm; +pub mod runtime_spec; diff --git a/testing-framework/deployers/k8s/src/infrastructure/runtime_spec.rs b/testing-framework/deployers/k8s/src/infrastructure/runtime_spec.rs new file mode 100644 index 0000000..be99a94 --- /dev/null +++ b/testing-framework/deployers/k8s/src/infrastructure/runtime_spec.rs @@ -0,0 +1,232 @@ +use std::{collections::BTreeMap, path::PathBuf}; + +use crate::{ + BootstrapExtraFile, HelmFileSetting, HelmReleaseBundle, HelmValueSetting, NodeGroup, + RunnerAssetLayout, RunnerChartValues, RunnerFiles, RunnerValues, write_temp_file, +}; + +#[derive(Debug, Clone)] +pub struct SharedServiceSpec { + pub service_name: String, + pub image: String, + pub image_pull_policy: String, + pub port: u16, + pub env: BTreeMap, + pub writable_mount_path: String, + pub primary_config: String, + pub artifacts_config: String, + pub primary_config_file: PathBuf, + pub start_script_file: PathBuf, + pub extra_files: Vec, +} + +#[derive(Debug, Clone)] +pub struct SharedServiceFileSpec { + pub key: String, + pub path: String, + pub content: String, +} + +impl SharedServiceFileSpec { + #[must_use] + pub fn inline(key: String, path: String, content: String) -> Self { + Self { key, path, content } + } +} + +#[derive(Debug, Clone)] +pub struct NodeRuntimeSpec { + pub node_image: String, + pub node_image_pull_policy: String, + pub fullname_override: String, + pub layout: RunnerAssetLayout, + pub nodes: NodeGroup, + pub shared_service: Option, + pub node_start_script_file: PathBuf, + pub common_start_script_file: PathBuf, + pub chart_path: PathBuf, + pub current_dir: Option, +} + +impl SharedServiceSpec { + #[must_use] + pub fn new( + service_name: String, + image: String, + image_pull_policy: String, + port: u16, + primary_config: String, + artifacts_config: String, + primary_config_file: PathBuf, + start_script_file: PathBuf, + ) -> Self { + Self { + service_name, + image, + image_pull_policy, + port, + env: BTreeMap::new(), + writable_mount_path: String::new(), + primary_config, + artifacts_config, + primary_config_file, + start_script_file, + extra_files: Vec::new(), + } + } + + #[must_use] + pub fn with_env(mut self, env: BTreeMap) -> Self { + self.env = env; + self + } + + #[must_use] + pub fn with_writable_mount_path(mut self, path: String) -> Self { + self.writable_mount_path = path; + self + } + + #[must_use] + pub fn with_extra_files(mut self, files: Vec) -> Self { + self.extra_files = files; + self + } +} + +impl NodeRuntimeSpec { + #[must_use] + pub fn chart_values(&self) -> RunnerChartValues { + let mut values = RunnerChartValues::new( + self.node_image.clone(), + self.node_image_pull_policy.clone(), + self.fullname_override.clone(), + self.layout.asset_mount_path.clone(), + self.nodes.clone(), + ); + + values.runner = self.runner_values(); + + if let Some(shared) = self.bootstrap_values() { + values.bootstrap = shared; + } + + values + } + + #[must_use] + pub fn release_bundle(&self) -> HelmReleaseBundle { + let mut bundle = HelmReleaseBundle::new(self.chart_path.clone()); + bundle.set_values.extend([ + HelmValueSetting { + key: "nodeImage".to_string(), + value: self.node_image.clone(), + }, + HelmValueSetting { + key: "nodes.count".to_string(), + value: self.nodes.count.to_string(), + }, + ]); + bundle.set_files.extend([ + HelmFileSetting { + key: "runner.files.nodeStart".to_string(), + path: self.node_start_script_file.clone(), + }, + HelmFileSetting { + key: "runner.files.commonStart".to_string(), + path: self.common_start_script_file.clone(), + }, + ]); + + if let Some(shared) = &self.shared_service { + bundle.set_values.push(HelmValueSetting { + key: "bootstrap.port".to_string(), + value: shared.port.to_string(), + }); + bundle.set_files.extend([ + HelmFileSetting { + key: "bootstrap.files.primaryConfig".to_string(), + path: shared.primary_config_file.clone(), + }, + HelmFileSetting { + key: "bootstrap.scripts.start".to_string(), + path: shared.start_script_file.clone(), + }, + ]); + } + + bundle.current_dir = self.current_dir.clone(); + bundle + } + + pub fn write_values_file( + &self, + dir: &std::path::Path, + name: &str, + ) -> Result { + let values = self.chart_values(); + let yaml = serde_yaml::to_string(&values).map_err(RuntimeSpecError::Serialize)?; + write_temp_file(dir, name, yaml).map_err(|source| RuntimeSpecError::Write { + path: dir.join(name), + source, + }) + } + + fn runner_values(&self) -> RunnerValues { + let mut runner = RunnerValues { + files: RunnerFiles { + common_start: String::new(), + node_start: String::new(), + common_start_path: String::new(), + node_start_path: String::new(), + }, + }; + + runner.apply_layout(&self.layout); + runner + } + + fn bootstrap_values(&self) -> Option { + let shared = self.shared_service.as_ref()?; + let mut bootstrap = crate::BootstrapValues::enabled( + shared.service_name.clone(), + shared.image.clone(), + shared.image_pull_policy.clone(), + shared.port, + ); + + bootstrap.env = shared.env.clone(); + bootstrap.writable_mount_path = shared.writable_mount_path.clone(); + bootstrap.files.primary_config = shared.primary_config.clone(); + bootstrap.files.artifacts_config = shared.artifacts_config.clone(); + bootstrap.files.extra_files = collect_bootstrap_extra_files(shared); + bootstrap.scripts.start = String::new(); + bootstrap.apply_layout(&self.layout); + + Some(bootstrap) + } +} + +fn collect_bootstrap_extra_files(shared: &SharedServiceSpec) -> Vec { + shared + .extra_files + .iter() + .map(|file| BootstrapExtraFile { + key: file.key.clone(), + path: file.path.clone(), + content: file.content.clone(), + }) + .collect() +} + +#[derive(Debug, thiserror::Error)] +pub enum RuntimeSpecError { + #[error("failed to serialize runtime spec values: {0}")] + Serialize(#[source] serde_yaml::Error), + #[error("failed to write runtime spec values to {}: {source}", path.display())] + Write { + path: PathBuf, + #[source] + source: std::io::Error, + }, +} diff --git a/testing-framework/deployers/k8s/src/lib.rs b/testing-framework/deployers/k8s/src/lib.rs index 0c331a5..dfbf524 100644 --- a/testing-framework/deployers/k8s/src/lib.rs +++ b/testing-framework/deployers/k8s/src/lib.rs @@ -3,11 +3,28 @@ mod env; mod host; mod infrastructure; mod lifecycle; +mod workspace; pub mod wait { pub use crate::lifecycle::wait::*; } pub use deployer::{K8sDeployer, K8sDeploymentMetadata, K8sRunnerError}; -pub use env::K8sDeployEnv; -pub use infrastructure::cluster::PortSpecs; +pub use env::{HelmReleaseAssets, K8sDeployEnv, install_helm_release_with_cleanup}; +pub use infrastructure::{ + chart_values::{ + BootstrapExtraFile, BootstrapFiles, BootstrapScripts, BootstrapValues, NodeGroup, + NodePortValues, NodeValues, RunnerAssetLayout, RunnerChartValues, RunnerFiles, + RunnerValues, + }, + cluster::PortSpecs, + helm::{ + HelmError, HelmFileSetting, HelmInstallSpec, HelmReleaseBundle, HelmValueSetting, + install_release, + }, + runtime_spec::{NodeRuntimeSpec, RuntimeSpecError, SharedServiceFileSpec, SharedServiceSpec}, +}; pub use lifecycle::cleanup::RunnerCleanup; +pub use workspace::{ + RequiredPathError, bundled_runner_chart_path, create_temp_workspace, require_existing_paths, + resolve_optional_relative_dir, resolve_workspace_root, write_temp_file, +}; diff --git a/testing-framework/deployers/k8s/src/lifecycle/wait/mod.rs b/testing-framework/deployers/k8s/src/lifecycle/wait/mod.rs index ecbcfbb..63f3d31 100644 --- a/testing-framework/deployers/k8s/src/lifecycle/wait/mod.rs +++ b/testing-framework/deployers/k8s/src/lifecycle/wait/mod.rs @@ -20,14 +20,14 @@ pub use orchestrator::wait_for_cluster_ready; #[derive(Clone, Copy, Debug)] pub struct NodeConfigPorts { pub api: u16, - pub testing: u16, + pub auxiliary: u16, } /// Host-facing NodePorts for a node. #[derive(Clone, Copy, Debug)] pub struct NodePortAllocation { pub api: u16, - pub testing: u16, + pub auxiliary: u16, } /// Host/port pair reachable from the machine running the runner. diff --git a/testing-framework/deployers/k8s/src/lifecycle/wait/orchestrator.rs b/testing-framework/deployers/k8s/src/lifecycle/wait/orchestrator.rs index 858c957..5f0f954 100644 --- a/testing-framework/deployers/k8s/src/lifecycle/wait/orchestrator.rs +++ b/testing-framework/deployers/k8s/src/lifecycle/wait/orchestrator.rs @@ -133,12 +133,12 @@ async fn spawn_port_forwards( for (index, ports) in node_ports.iter().enumerate() { let service = E::node_service_name(&release, index); let api_forward = port_forward_service(&namespace, &service, ports.api)?; - let testing_forward = port_forward_service(&namespace, &service, ports.testing)?; + let auxiliary_forward = port_forward_service(&namespace, &service, ports.auxiliary)?; register_forward_pair( &mut allocations, &mut forwards, api_forward, - testing_forward, + auxiliary_forward, ); } @@ -171,12 +171,12 @@ fn register_forward_pair( allocations: &mut Vec, forwards: &mut Vec, api_forward: PortForwardSpawn, - testing_forward: PortForwardSpawn, + auxiliary_forward: PortForwardSpawn, ) { allocations.push(NodePortAllocation { api: api_forward.local_port, - testing: testing_forward.local_port, + auxiliary: auxiliary_forward.local_port, }); forwards.push(api_forward.handle); - forwards.push(testing_forward.handle); + forwards.push(auxiliary_forward.handle); } diff --git a/testing-framework/deployers/k8s/src/lifecycle/wait/ports.rs b/testing-framework/deployers/k8s/src/lifecycle/wait/ports.rs index 5b7bb25..c9d1a4b 100644 --- a/testing-framework/deployers/k8s/src/lifecycle/wait/ports.rs +++ b/testing-framework/deployers/k8s/src/lifecycle/wait/ports.rs @@ -41,12 +41,12 @@ pub async fn discover_node_ports( config_ports: NodeConfigPorts, ) -> Result { let api_port = find_node_port(client, namespace, service_name, config_ports.api).await?; - let testing_port = - find_node_port(client, namespace, service_name, config_ports.testing).await?; + let auxiliary_port = + find_node_port(client, namespace, service_name, config_ports.auxiliary).await?; Ok(NodePortAllocation { api: api_port, - testing: testing_port, + auxiliary: auxiliary_port, }) } diff --git a/testing-framework/deployers/k8s/src/workspace.rs b/testing-framework/deployers/k8s/src/workspace.rs new file mode 100644 index 0000000..f5d3e7f --- /dev/null +++ b/testing-framework/deployers/k8s/src/workspace.rs @@ -0,0 +1,109 @@ +use std::{ + env, fs, io, + path::{Path, PathBuf}, +}; + +use anyhow::{Result, anyhow}; +use tempfile::TempDir; +use thiserror::Error; + +const DEFAULT_RUNNER_HELM_CHART_DIR: &str = "testing-framework/deployers/k8s/assets/helm/tf-runner"; + +fn crate_runner_chart_path() -> PathBuf { + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("assets/helm/tf-runner") +} + +pub fn resolve_workspace_root( + manifest_dir: &Path, + env_override_var: &str, + is_workspace_root: F, +) -> Result +where + F: Fn(&Path) -> bool, +{ + if let Ok(var) = env::var(env_override_var) { + return Ok(PathBuf::from(var)); + } + + let candidate_roots = [ + manifest_dir + .parent() + .and_then(Path::parent) + .and_then(Path::parent), + manifest_dir.parent().and_then(Path::parent), + ]; + + for candidate in candidate_roots.iter().flatten() { + if is_workspace_root(candidate) { + return Ok(candidate.to_path_buf()); + } + } + + Err(anyhow!( + "resolving workspace root from manifest dir: {manifest_dir:?}" + )) +} + +#[must_use] +pub fn bundled_runner_chart_path(workspace_root: &Path) -> PathBuf { + let workspace_path = workspace_root.join(DEFAULT_RUNNER_HELM_CHART_DIR); + if workspace_path.exists() { + workspace_path + } else { + crate_runner_chart_path() + } +} + +#[must_use] +pub fn resolve_optional_relative_dir(workspace_root: &Path, env_key: &str) -> Option { + env::var(env_key).ok().map(|value| { + let path = PathBuf::from(value); + if path.is_absolute() { + path + } else { + workspace_root.join(path) + } + }) +} + +#[derive(Debug, Error)] +pub enum RequiredPathError { + #[error("missing required path at {}", path.display())] + MissingPath { path: PathBuf }, + #[error("failed to read {}: {source}", path.display())] + Io { + path: PathBuf, + #[source] + source: io::Error, + }, +} + +pub fn require_existing_paths( + paths: impl IntoIterator, +) -> Result, RequiredPathError> { + let mut collected = Vec::new(); + + for path in paths { + match path.try_exists() { + Ok(true) => collected.push(path), + Ok(false) => return Err(RequiredPathError::MissingPath { path }), + Err(source) => return Err(RequiredPathError::Io { path, source }), + } + } + + Ok(collected) +} + +pub fn create_temp_workspace(prefix: &str) -> Result { + tempfile::Builder::new().prefix(prefix).tempdir() +} + +pub fn write_temp_file( + dir: &Path, + name: &str, + contents: impl AsRef<[u8]>, +) -> Result { + let path = dir.join(name); + fs::write(&path, contents)?; + Ok(path) +} diff --git a/versions.env b/versions.env deleted file mode 100644 index 6763fb2..0000000 --- a/versions.env +++ /dev/null @@ -1,7 +0,0 @@ -VERSION=v0.4.1 -LOGOS_BLOCKCHAIN_BUNDLE_VERSION=v4 -# Pinned logos-blockchain-node revision used for CI builds and binary bundles. -LOGOS_BLOCKCHAIN_NODE_REV=5ebe88a6e89ec6d7dd89e123c46f6b26dd1e4667 - -# Local logos-blockchain-node checkout override. -# LOGOS_BLOCKCHAIN_NODE_PATH=