2025-12-18 17:26:02 +01:00
|
|
|
# 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:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
VERSION=v0.3.1
|
2026-01-26 16:36:51 +01:00
|
|
|
LOGOS_BLOCKCHAIN_NODE_REV=abc123def456789
|
|
|
|
|
LOGOS_BLOCKCHAIN_BUNDLE_VERSION=v1
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**What it defines:**
|
2026-01-26 16:36:51 +01:00
|
|
|
- `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
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
**Where it's used:**
|
|
|
|
|
- `scripts/run/run-examples.sh`
|
|
|
|
|
- `scripts/build/build-bundle.sh`
|
2026-01-26 16:36:51 +01:00
|
|
|
- `scripts/setup/setup-logos-blockchain-circuits.sh`
|
2025-12-18 17:26:02 +01:00
|
|
|
- CI workflows
|
|
|
|
|
|
|
|
|
|
**Error if missing:**
|
2025-12-20 09:16:23 +01:00
|
|
|
```text
|
2025-12-18 17:26:02 +01:00
|
|
|
ERROR: versions.env not found at repository root
|
|
|
|
|
This file is required and should define:
|
|
|
|
|
VERSION=<circuit release tag>
|
2026-01-26 16:36:51 +01:00
|
|
|
LOGOS_BLOCKCHAIN_NODE_REV=<logos-blockchain-node git revision>
|
|
|
|
|
LOGOS_BLOCKCHAIN_BUNDLE_VERSION=<bundle schema version>
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Fix:** Ensure you're in the repository root. The file should already exist in the checked-out repo.
|
|
|
|
|
|
|
|
|
|
## Node Binaries
|
|
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
Scenarios need compiled `logos-blockchain-node` binaries.
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
### Option 1: Use Helper Scripts (Recommended)
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-01-26 16:36:51 +01:00
|
|
|
scripts/run/run-examples.sh -t 60 -n 3 host
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This automatically:
|
2026-01-26 16:36:51 +01:00
|
|
|
- Clones/updates logos-blockchain-node checkout
|
2025-12-18 17:26:02 +01:00
|
|
|
- Builds required binaries
|
2026-01-26 16:36:51 +01:00
|
|
|
- Sets `LOGOS_BLOCKCHAIN_NODE_BIN`
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
### Option 2: Manual Build
|
|
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
If you have a sibling `logos-blockchain-node` checkout:
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
```bash
|
2026-01-26 16:36:51 +01:00
|
|
|
cd ../logos-blockchain-node
|
|
|
|
|
cargo build --release --bin logos-blockchain-node
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
# Set environment variables
|
2026-01-26 16:36:51 +01:00
|
|
|
export LOGOS_BLOCKCHAIN_NODE_BIN=$PWD/target/release/logos-blockchain-node
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
# Return to testing framework
|
|
|
|
|
cd ../nomos-testing
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Option 3: Prebuilt Bundles (CI)
|
|
|
|
|
|
|
|
|
|
CI workflows use prebuilt artifacts:
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
- 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/
|
2026-01-26 16:36:51 +01:00
|
|
|
export LOGOS_BLOCKCHAIN_NODE_BIN=$PWD/.tmp/logos-blockchain-node
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
## Circuit Assets
|
2025-12-18 17:26:02 +01:00
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
Nodes require circuit assets for proof generation. The framework expects a
|
|
|
|
|
directory containing the circuits, not a single file.
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
### Asset Location
|
|
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
**Default path:** `~/.logos-blockchain-circuits`
|
2025-12-18 17:26:02 +01:00
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
**Container path (compose/k8s):** `/opt/circuits` (set during image build)
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
### Getting Assets
|
|
|
|
|
|
|
|
|
|
**Option 1: Use helper script** (recommended):
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-01-26 16:36:51 +01:00
|
|
|
scripts/setup/setup-logos-blockchain-circuits.sh v0.3.1 ~/.logos-blockchain-circuits
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Option 2: Let `run-examples.sh` handle it**:
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-01-26 16:36:51 +01:00
|
|
|
scripts/run/run-examples.sh -t 60 -n 3 host
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Override Path
|
|
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
Set `LOGOS_BLOCKCHAIN_CIRCUITS` to use a custom location:
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
```bash
|
2026-01-26 16:36:51 +01:00
|
|
|
LOGOS_BLOCKCHAIN_CIRCUITS=/custom/path/to/circuits \
|
2025-12-18 17:26:02 +01:00
|
|
|
cargo run -p runner-examples --bin local_runner
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### When Are Assets Needed?
|
|
|
|
|
|
|
|
|
|
| Runner | When Required |
|
|
|
|
|
|--------|---------------|
|
2026-01-26 16:36:51 +01:00
|
|
|
| **Host (local)** | Always |
|
2025-12-18 17:26:02 +01:00
|
|
|
| **Compose** | During image build (baked into image) |
|
2026-01-26 16:36:51 +01:00
|
|
|
| **K8s** | During image build |
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
**Error without assets:**
|
|
|
|
|
|
2025-12-20 09:16:23 +01:00
|
|
|
```text
|
2026-01-26 16:36:51 +01:00
|
|
|
Error: circuits directory not found (LOGOS_BLOCKCHAIN_CIRCUITS)
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Platform Requirements
|
|
|
|
|
|
|
|
|
|
### Host Runner (Local Processes)
|
|
|
|
|
|
|
|
|
|
**Requires:**
|
|
|
|
|
- Rust nightly toolchain
|
|
|
|
|
- Node binaries built
|
2026-01-26 16:36:51 +01:00
|
|
|
- Circuit assets for proof generation
|
2025-12-18 17:26:02 +01:00
|
|
|
- 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`
|
2026-01-26 16:36:51 +01:00
|
|
|
- Circuit assets baked into image
|
2025-12-18 17:26:02 +01:00
|
|
|
- Docker Desktop (macOS) or Docker Engine (Linux)
|
|
|
|
|
|
|
|
|
|
**Platform notes (macOS / Apple silicon):**
|
2026-01-26 16:36:51 +01:00
|
|
|
- Prefer `LOGOS_BLOCKCHAIN_BUNDLE_DOCKER_PLATFORM=linux/arm64` for native performance
|
2025-12-18 17:26:02 +01:00
|
|
|
- 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
|
2026-01-26 16:36:51 +01:00
|
|
|
- Circuit assets baked into image
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
**Local cluster setup:**
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# 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
|
|
|
|
|
```
|
|
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
**Remote cluster:** Push image to registry and set `LOGOS_BLOCKCHAIN_TESTNET_IMAGE`.
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
**Best for:**
|
|
|
|
|
- Production-like testing
|
|
|
|
|
- Resource isolation
|
|
|
|
|
- Large topologies
|
|
|
|
|
|
|
|
|
|
## Quick Setup Check
|
|
|
|
|
|
|
|
|
|
Run this checklist before your first scenario:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# 1. Verify versions.env exists
|
|
|
|
|
cat versions.env
|
|
|
|
|
|
2026-01-26 16:36:51 +01:00
|
|
|
# 2. Check circuit assets
|
|
|
|
|
ls -lh "${HOME}/.logos-blockchain-circuits"
|
2025-12-18 17:26:02 +01:00
|
|
|
|
2026-02-09 14:12:26 +02:00
|
|
|
# 3. For compose/k8s: verify Docker is running
|
2025-12-18 17:26:02 +01:00
|
|
|
docker ps
|
|
|
|
|
|
2026-02-09 14:12:26 +02:00
|
|
|
# 4. For compose/k8s: verify image exists
|
2025-12-18 17:26:02 +01:00
|
|
|
docker images | grep logos-blockchain-testing
|
|
|
|
|
|
2026-02-09 14:12:26 +02:00
|
|
|
# 5. For host runner: verify node binaries (if not using scripts)
|
2026-01-26 16:36:51 +01:00
|
|
|
$LOGOS_BLOCKCHAIN_NODE_BIN --version
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Recommended: Use Helper Scripts
|
|
|
|
|
|
|
|
|
|
The easiest path is to let the helper scripts handle everything:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Host runner
|
2026-01-26 16:36:51 +01:00
|
|
|
scripts/run/run-examples.sh -t 60 -n 3 host
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
# Compose runner
|
2026-01-26 16:36:51 +01:00
|
|
|
scripts/run/run-examples.sh -t 60 -n 3 compose
|
2025-12-18 17:26:02 +01:00
|
|
|
|
|
|
|
|
# K8s runner
|
2026-01-26 16:36:51 +01:00
|
|
|
scripts/run/run-examples.sh -t 60 -n 3 k8s
|
2025-12-18 17:26:02 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
These scripts:
|
|
|
|
|
- Verify `versions.env` exists
|
2026-01-26 16:36:51 +01:00
|
|
|
- Clone/build logos-blockchain-node if needed
|
2025-12-18 17:26:02 +01:00
|
|
|
- Fetch circuit assets if missing
|
|
|
|
|
- Build Docker images (compose/k8s)
|
|
|
|
|
- Load images into cluster (k8s)
|
|
|
|
|
- Run the scenario with proper environment
|
|
|
|
|
|
|
|
|
|
**Next Steps:**
|
|
|
|
|
- [Running Examples](running-examples.md) — Learn how to run scenarios
|
|
|
|
|
- [Environment Variables](environment-variables.md) — Full variable reference
|
|
|
|
|
- [Troubleshooting](troubleshooting.md) — Common issues and fixes
|