Refactor generic compose and k8s runners

This commit is contained in:
andrussal 2026-03-27 10:42:47 +01:00
parent ab816a8614
commit 79037d7279
177 changed files with 1832 additions and 21807 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

5130
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -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" }

View File

@ -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/*`.

View File

@ -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

View File

@ -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

View File

@ -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<Scenario<()>> {
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()
}

View File

@ -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<Scenario<NodeControlCapability>> {
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()
}

View File

@ -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())
}
}

View File

@ -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<Box<dyn Expectation>> {
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())
}
}

View File

@ -1,8 +0,0 @@
use testing_framework_core::scenario::{Scenario, ScenarioBuilder};
use testing_framework_workflows::ScenarioBuilderExt;
use crate::SnippetResult;
pub fn build_plan() -> SnippetResult<Scenario<()>> {
ScenarioBuilder::topology_with(|t| t.network_star().nodes(1)).build() // Construct the final Scenario
}

View File

@ -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(())
}

View File

@ -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();
}

View File

@ -1,10 +0,0 @@
use testing_framework_core::scenario::{Scenario, ScenarioBuilder};
use testing_framework_workflows::ScenarioBuilderExt;
use crate::SnippetResult;
pub fn expectations_plan() -> SnippetResult<Scenario<()>> {
ScenarioBuilder::topology_with(|t| t.network_star().nodes(1))
.expect_consensus_liveness() // Assert blocks are produced continuously
.build()
}

View File

@ -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};

View File

@ -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<Scenario<()>> {
ScenarioBuilder::topology_with(|t| t.network_star().nodes(1))
.with_run_duration(Duration::from_secs(120)) // Run for 120 seconds
.build()
}

View File

@ -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
})
}

View File

@ -1,14 +0,0 @@
use testing_framework_core::scenario::{Scenario, ScenarioBuilder};
use testing_framework_workflows::ScenarioBuilderExt;
use crate::SnippetResult;
pub fn transactions_plan() -> SnippetResult<Scenario<()>> {
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()
}

View File

@ -1,10 +0,0 @@
use testing_framework_core::scenario::{Scenario, ScenarioBuilder};
use testing_framework_workflows::ScenarioBuilderExt;
use crate::SnippetResult;
pub fn wallets_plan() -> SnippetResult<Scenario<()>> {
ScenarioBuilder::topology_with(|t| t.network_star().nodes(1))
.wallets(50) // Seed 50 funded wallet accounts
.build()
}

View File

@ -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<testing_framework_core::scenario::Scenario<NodeControlCapability>> {
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()
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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<Runner, Self::Error> {
// Provision infrastructure
// Wait for readiness
// Return Runner
todo!()
}
}

View File

@ -1,20 +0,0 @@
use testing_framework_core::scenario::ScenarioBuilder;
use crate::SnippetResult;
pub trait YourExpectationDslExt: Sized {
fn expect_your_condition(self) -> Self;
}
impl<Caps> YourExpectationDslExt for testing_framework_core::scenario::Builder<Caps> {
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(())
}

View File

@ -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(())
}
}

View File

@ -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;
}

View File

@ -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(())
}
}

View File

@ -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<F>(self, configurator: F) -> Self
where
F: FnOnce(YourWorkloadBuilder) -> YourWorkloadBuilder;
}
impl<Caps> YourWorkloadDslExt for testing_framework_core::scenario::Builder<Caps> {
fn your_workload_with<F>(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(())
}

View File

@ -1,47 +0,0 @@
#![allow(dead_code, unused_imports, unused_variables)]
pub type SnippetResult<T> = Result<T, testing_framework_core::scenario::ScenarioBuildError>;
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;

View File

@ -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(())
}

View File

@ -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<u64> = 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(())
}

View File

@ -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(())
}
}

View File

@ -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>;
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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
})
}

View File

@ -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
}

View File

@ -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
})
}

View File

@ -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.
}

View File

@ -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))
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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(())
}

View File

@ -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<LbcExtEnv> = 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(())
}

View File

@ -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<LbcExtEnv> = 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(())
}

View File

@ -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<LbcEnv> = 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(())
}

View File

@ -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")))
}

View File

@ -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;

View File

@ -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<T>(keys: &[&str], default: T) -> T
where
T: FromStr + Copy,
{
keys.iter()
.find_map(|key| env::var(key).ok().and_then(|raw| raw.parse::<T>().ok()))
.unwrap_or(default)
}
pub fn read_topology_seed() -> Option<DeploymentSeed> {
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))
}

View File

@ -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,
}

View File

@ -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<LbcExtEnv>, 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<LbcExtEnv> = 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(())
}

View File

@ -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<testing_framework_core::scenario::Scenario<LbcEnv>> {
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<testing_framework_core::scenario::Scenario<LbcExtEnv>> {
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<LbcEnv> = 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<LbcExtEnv> = 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<LbcExtEnv> = deployer.deploy(&scenario).await?;
runner.run(&mut scenario).await?;
Ok(())
}

View File

@ -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<String>) -> Self {
Self { name: name.into() }
}
}
#[async_trait]
impl Workload<LbcEnv> for JoinNodeWorkload {
fn name(&self) -> &str {
"dynamic_join"
}
async fn start(&self, ctx: &RunContext<LbcEnv>) -> 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<String>,
}
impl JoinNodeWithPeersWorkload {
fn new(name: impl Into<String>, peers: Vec<String>) -> Self {
Self {
name: name.into(),
peers,
}
}
}
#[async_trait]
impl Workload<LbcEnv> for JoinNodeWithPeersWorkload {
fn name(&self) -> &str {
"dynamic_join_with_peers"
}
async fn start(&self, ctx: &RunContext<LbcEnv>) -> 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::<LbcEnv>::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::<LbcEnv>::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::<LbcEnv>::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(())
}

View File

@ -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<LbcEnv> for FailFastDuringCaptureExpectation {
fn name(&self) -> &str {
"fail_fast_during_capture"
}
async fn check_during_capture(&mut self, _ctx: &RunContext<LbcEnv>) -> 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<LbcEnv>) -> 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")),
}
}

View File

@ -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<String>,
}
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::<LbcEnv>::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::<LbcEnv>::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<String> = [
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<String> = 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::<LbcExtEnv>::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<String> = [
seed_cluster.node_a.base_url().to_string(),
seed_cluster.node_b.base_url().to_string(),
]
.into_iter()
.collect();
let actual_endpoints: HashSet<String> = 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<SeedCluster> {
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<LbcEnv> {
let mut options = StartNodeOptions::<LbcEnv>::default();
options.peers = peers;
options
}
async fn collect_loopback_peer_addresses(
node_a: &lb_framework::NodeHttpClient,
node_b: &lb_framework::NodeHttpClient,
) -> Result<Vec<String>> {
let mut peers = Vec::new();
for info in [node_a.network_info().await?, node_b.network_info().await?] {
let addresses: Vec<String> = info
.listen_addresses
.into_iter()
.map(|addr| addr.to_string())
.collect();
let mut loopback: Vec<String> = 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<T>(addresses: &[String]) -> Result<Vec<T>>
where
T: std::str::FromStr,
T::Err: std::error::Error + Send + Sync + 'static,
{
addresses
.iter()
.map(|address| address.parse::<T>().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;
}
}

View File

@ -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<LbcExtEnv>, 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<LbcExtEnv> = 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(())
}

View File

@ -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(())
}

View File

@ -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<LbcEnv> {
let mut options = StartNodeOptions::<LbcEnv>::default();
options.peers = peers;
options
}

View File

@ -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::<LbcEnv>::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")
}

View File

@ -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::<LbcEnv>::default(),
START_NODE_TIMEOUT,
)
.await?
.client;
let node_b = start_node_with_timeout(
&cluster,
"b",
StartNodeOptions::<LbcEnv>::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::<LbcEnv>::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<u64> {
let info = node
.consensus_info()
.await
.map_err(|error| anyhow!("{name} consensus_info failed: {error}"))?;
Ok(info.height)
}

View File

@ -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

View File

@ -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"]

View File

@ -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"]

View File

@ -1,8 +0,0 @@
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: 'file'
options:
path: '/var/lib/grafana/dashboards'

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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": ""
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +0,0 @@
global:
evaluation_interval: 15s
external_labels:
monitor: "Monitoring"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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}"

View File

@ -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"

View File

@ -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 -}}

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More