logos-blockchain-testing/book/src/prerequisites.md
Hansie Odendaal b3d54125ea
chore: merge dev into master (#29)
* Add node config overrides (#14)

* chore: merge master into dev and update configs after merge (#17)

* Sdp config structs from logos blockchain (#15)

* Update configs after main repo merge

---------

Co-authored-by: gusto <bacv@users.noreply.github.com>

* Local deployer allows to stop and restart nodes (#16)

* Unify local node control and restart support

* Add local stop-node support

* Use node names for restart/stop control

* merge

---------

Co-authored-by: hansieodendaal <hansie.odendaal@gmail.com>

* Add orphan manual cluster test utilities

* Update node rev and align consensus/wallet config

* Update node rev and align wallet/KMS configs

* Update main repo ref (#23)

* Fix genesis utxos and scale leader stake

* Document leader stake constants

* feat: add custom persistent dir option for working files (#26)

* chore: config and naming updates (#27)

* Update config and crate naming

- Updated configs to the lates main repo configs.
- Updated all main repo crate namings to be same as the main repo.
- Added `create_dir_all` to `pub(crate) fn create_tempdir(custom_work_dir: Option<PathBuf>) -> std::io::Result<TempDir> {`.
- Wired in optional `persist_dir` when using the local deployer.
- Update `time` vulnerability

**Note:** Unsure about the `service_params` mapping in `pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings {`

* fix ntp server config

---------

Co-authored-by: Andrus Salumets <andrus@status.im>
Co-authored-by: gusto <bacv@users.noreply.github.com>
Co-authored-by: andrussal <salumets.andrus@gmail.com>
2026-02-09 14:12:26 +02:00

5.7 KiB

Prerequisites & Setup

This page covers everything you need before running your first scenario.

Required Files

versions.env (Required)

All helper scripts require a versions.env file at the repository root:

VERSION=v0.3.1
LOGOS_BLOCKCHAIN_NODE_REV=abc123def456789
LOGOS_BLOCKCHAIN_BUNDLE_VERSION=v1

What it defines:

  • VERSION — Circuit assets release tag
  • LOGOS_BLOCKCHAIN_NODE_REV — Git revision of logos-blockchain-node to build/fetch
  • LOGOS_BLOCKCHAIN_BUNDLE_VERSION — Bundle schema version

Where it's used:

  • scripts/run/run-examples.sh
  • scripts/build/build-bundle.sh
  • scripts/setup/setup-logos-blockchain-circuits.sh
  • CI workflows

Error if missing:

ERROR: versions.env not found at repository root
This file is required and should define:
  VERSION=<circuit release tag>
  LOGOS_BLOCKCHAIN_NODE_REV=<logos-blockchain-node git revision>
  LOGOS_BLOCKCHAIN_BUNDLE_VERSION=<bundle schema version>

Fix: Ensure you're in the repository root. The file should already exist in the checked-out repo.

Node Binaries

Scenarios need compiled logos-blockchain-node binaries.

scripts/run/run-examples.sh -t 60 -n 3 host

This automatically:

  • Clones/updates logos-blockchain-node checkout
  • Builds required binaries
  • Sets LOGOS_BLOCKCHAIN_NODE_BIN

Option 2: Manual Build

If you have a sibling logos-blockchain-node checkout:

cd ../logos-blockchain-node
cargo build --release --bin logos-blockchain-node 

# Set environment variables
export LOGOS_BLOCKCHAIN_NODE_BIN=$PWD/target/release/logos-blockchain-node

# Return to testing framework
cd ../nomos-testing

Option 3: Prebuilt Bundles (CI)

CI workflows use prebuilt artifacts:

- name: Download nomos binaries
  uses: actions/download-artifact@v3
  with:
    name: nomos-binaries-linux
    path: .tmp/

- name: Extract bundle
  run: |
    tar -xzf .tmp/nomos-binaries-linux-*.tar.gz -C .tmp/
    export LOGOS_BLOCKCHAIN_NODE_BIN=$PWD/.tmp/logos-blockchain-node

Circuit Assets

Nodes require circuit assets for proof generation. The framework expects a directory containing the circuits, not a single file.

Asset Location

Default path: ~/.logos-blockchain-circuits

Container path (compose/k8s): /opt/circuits (set during image build)

Getting Assets

Option 1: Use helper script (recommended):

scripts/setup/setup-logos-blockchain-circuits.sh v0.3.1 ~/.logos-blockchain-circuits

Option 2: Let run-examples.sh handle it:

scripts/run/run-examples.sh -t 60 -n 3 host

Override Path

Set LOGOS_BLOCKCHAIN_CIRCUITS to use a custom location:

LOGOS_BLOCKCHAIN_CIRCUITS=/custom/path/to/circuits \
cargo run -p runner-examples --bin local_runner

When Are Assets Needed?

Runner When Required
Host (local) Always
Compose During image build (baked into image)
K8s During image build

Error without assets:

Error: circuits directory not found (LOGOS_BLOCKCHAIN_CIRCUITS)

Platform Requirements

Host Runner (Local Processes)

Requires:

  • Rust nightly toolchain
  • Node binaries built
  • Circuit assets for proof generation
  • Available ports (18080+, 3100+, etc.)

No Docker required.

Best for:

  • Quick iteration
  • Development
  • Smoke tests

Compose Runner (Docker Compose)

Requires:

  • Docker daemon running
  • Docker image built: logos-blockchain-testing:local
  • Circuit assets baked into image
  • Docker Desktop (macOS) or Docker Engine (Linux)

Platform notes (macOS / Apple silicon):

  • Prefer LOGOS_BLOCKCHAIN_BUNDLE_DOCKER_PLATFORM=linux/arm64 for native performance
  • Use linux/amd64 only if targeting amd64 environments (slower via emulation)

Best for:

  • Reproducible environments
  • CI testing
  • Chaos workloads (node control support)

K8s Runner (Kubernetes)

Requires:

  • Kubernetes cluster (Docker Desktop K8s, minikube, kind, or remote)
  • kubectl configured
  • Docker image built and loaded/pushed
  • Circuit assets baked into image

Local cluster setup:

# Docker Desktop: Enable Kubernetes in settings

# OR: Use kind
kind create cluster
kind load docker-image logos-blockchain-testing:local

# OR: Use minikube
minikube start
minikube image load logos-blockchain-testing:local

Remote cluster: Push image to registry and set LOGOS_BLOCKCHAIN_TESTNET_IMAGE.

Best for:

  • Production-like testing
  • Resource isolation
  • Large topologies

Quick Setup Check

Run this checklist before your first scenario:

# 1. Verify versions.env exists
cat versions.env

# 2. Check circuit assets
ls -lh "${HOME}/.logos-blockchain-circuits"

# 3. For compose/k8s: verify Docker is running
docker ps

# 4. For compose/k8s: verify image exists
docker images | grep logos-blockchain-testing

# 5. For host runner: verify node binaries (if not using scripts)
$LOGOS_BLOCKCHAIN_NODE_BIN --version

The easiest path is to let the helper scripts handle everything:

# Host runner
scripts/run/run-examples.sh -t 60 -n 3 host

# Compose runner
scripts/run/run-examples.sh -t 60 -n 3 compose

# K8s runner
scripts/run/run-examples.sh -t 60 -n 3 k8s

These scripts:

  • Verify versions.env exists
  • Clone/build logos-blockchain-node if needed
  • Fetch circuit assets if missing
  • Build Docker images (compose/k8s)
  • Load images into cluster (k8s)
  • Run the scenario with proper environment

Next Steps: