2025-12-01 12:48:39 +01:00
|
|
|
# Annotated Tree
|
|
|
|
|
|
|
|
|
|
Directory structure with key paths annotated:
|
|
|
|
|
|
|
|
|
|
```
|
2025-12-10 15:15:34 +01:00
|
|
|
logos-blockchain-testing/
|
2025-12-01 12:48:39 +01:00
|
|
|
├─ testing-framework/ # Core library crates
|
|
|
|
|
│ ├─ configs/ # Node config builders, topology generation, tracing/logging config
|
|
|
|
|
│ ├─ core/ # Scenario model (ScenarioBuilder), runtime (Runner, Deployer), topology, node spawning
|
|
|
|
|
│ ├─ workflows/ # Workloads (transactions, DA, chaos), expectations (liveness), builder DSL extensions
|
|
|
|
|
│ ├─ runners/ # Deployment backends
|
|
|
|
|
│ │ ├─ local/ # LocalDeployer (spawns local processes)
|
|
|
|
|
│ │ ├─ compose/ # ComposeDeployer (Docker Compose + Prometheus)
|
|
|
|
|
│ │ └─ k8s/ # K8sDeployer (Kubernetes Helm)
|
|
|
|
|
│ └─ assets/ # Docker/K8s stack assets
|
|
|
|
|
│ └─ stack/
|
2025-12-09 09:43:49 +01:00
|
|
|
│ ├─ kzgrs_test_params/ # KZG circuit parameters directory
|
|
|
|
|
│ │ └─ kzgrs_test_params # Actual proving key file (note repeated name)
|
2025-12-01 12:48:39 +01:00
|
|
|
│ ├─ monitoring/ # Prometheus config
|
2025-12-16 21:20:27 +01:00
|
|
|
│ ├─ scripts/ # Container entrypoints
|
2025-12-01 12:48:39 +01:00
|
|
|
│ └─ cfgsync.yaml # Config sync server template
|
|
|
|
|
│
|
|
|
|
|
├─ examples/ # PRIMARY ENTRY POINT: runnable binaries
|
|
|
|
|
│ └─ src/bin/
|
2025-12-09 09:43:49 +01:00
|
|
|
│ ├─ local_runner.rs # Host processes demo (LocalDeployer)
|
|
|
|
|
│ ├─ compose_runner.rs # Docker Compose demo (ComposeDeployer)
|
|
|
|
|
│ └─ k8s_runner.rs # Kubernetes demo (K8sDeployer)
|
2025-12-01 12:48:39 +01:00
|
|
|
│
|
|
|
|
|
├─ scripts/ # Helper utilities
|
2025-12-09 09:43:49 +01:00
|
|
|
│ ├─ run-examples.sh # Convenience script (handles setup + runs examples)
|
|
|
|
|
│ ├─ build-bundle.sh # Build prebuilt binaries+circuits bundle
|
|
|
|
|
│ ├─ setup-circuits-stack.sh # Fetch KZG parameters (Linux + host)
|
|
|
|
|
│ └─ setup-nomos-circuits.sh # Legacy circuit fetcher
|
2025-12-01 12:48:39 +01:00
|
|
|
│
|
|
|
|
|
└─ book/ # This documentation (mdBook)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Key Directories Explained
|
|
|
|
|
|
|
|
|
|
### `testing-framework/`
|
|
|
|
|
Core library crates providing the testing API.
|
|
|
|
|
|
|
|
|
|
| Crate | Purpose | Key Exports |
|
|
|
|
|
|-------|---------|-------------|
|
|
|
|
|
| `configs` | Node configuration builders | Topology generation, tracing config |
|
|
|
|
|
| `core` | Scenario model & runtime | `ScenarioBuilder`, `Deployer`, `Runner` |
|
|
|
|
|
| `workflows` | Workloads & expectations | `ScenarioBuilderExt`, `ChaosBuilderExt` |
|
|
|
|
|
| `runners/local` | Local process deployer | `LocalDeployer` |
|
|
|
|
|
| `runners/compose` | Docker Compose deployer | `ComposeDeployer` |
|
|
|
|
|
| `runners/k8s` | Kubernetes deployer | `K8sDeployer` |
|
|
|
|
|
|
|
|
|
|
### `testing-framework/assets/stack/`
|
|
|
|
|
Docker/K8s deployment assets:
|
2025-12-09 09:43:49 +01:00
|
|
|
- **`kzgrs_test_params/kzgrs_test_params`**: Circuit parameters file (note repeated name; override via `NOMOS_KZGRS_PARAMS_PATH`)
|
2025-12-01 12:48:39 +01:00
|
|
|
- **`monitoring/`**: Prometheus config
|
2025-12-16 21:20:27 +01:00
|
|
|
- **`scripts/`**: Container entrypoints
|
2025-12-09 09:43:49 +01:00
|
|
|
|
|
|
|
|
### `scripts/`
|
|
|
|
|
Convenience utilities:
|
|
|
|
|
- **`run-examples.sh`**: All-in-one script for host/compose/k8s modes (recommended)
|
|
|
|
|
- **`build-bundle.sh`**: Create prebuilt binaries+circuits bundle for compose/k8s
|
2025-12-16 21:20:27 +01:00
|
|
|
- **`build_test_image.sh`**: Build the compose/k8s Docker image (bakes in assets)
|
2025-12-09 09:43:49 +01:00
|
|
|
- **`setup-circuits-stack.sh`**: Fetch KZG parameters for both Linux and host
|
2025-12-01 12:48:39 +01:00
|
|
|
- **`cfgsync.yaml`**: Configuration sync server template
|
|
|
|
|
|
|
|
|
|
### `examples/` (Start Here!)
|
|
|
|
|
**Runnable binaries** demonstrating framework usage:
|
|
|
|
|
- `local_runner.rs` — Local processes
|
|
|
|
|
- `compose_runner.rs` — Docker Compose (requires `NOMOS_TESTNET_IMAGE` built)
|
|
|
|
|
- `k8s_runner.rs` — Kubernetes (requires cluster + image)
|
|
|
|
|
|
|
|
|
|
**Run with:** `POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin <name>`
|
|
|
|
|
|
|
|
|
|
**All runners require `POL_PROOF_DEV_MODE=true`** to avoid expensive proof generation.
|
|
|
|
|
|
|
|
|
|
### `scripts/`
|
|
|
|
|
Helper utilities:
|
|
|
|
|
- **`setup-nomos-circuits.sh`**: Fetch KZG parameters from releases
|
|
|
|
|
|
|
|
|
|
## Observability
|
|
|
|
|
|
|
|
|
|
**Compose runner** includes:
|
|
|
|
|
- **Prometheus** at `http://localhost:9090` (metrics scraping)
|
|
|
|
|
- Node metrics exposed per validator/executor
|
2025-12-16 06:23:49 +01:00
|
|
|
- Access in expectations: `ctx.telemetry().prometheus().map(|p| p.base_url())`
|
2025-12-01 12:48:39 +01:00
|
|
|
|
|
|
|
|
**Logging** controlled by:
|
|
|
|
|
- `NOMOS_LOG_DIR` — Write per-node log files
|
|
|
|
|
- `NOMOS_LOG_LEVEL` — Global log level (error/warn/info/debug/trace)
|
2025-12-16 21:20:27 +01:00
|
|
|
- `NOMOS_LOG_FILTER` — Target-specific filtering (e.g., `cryptarchia=trace,nomos_da_sampling=debug`)
|
2025-12-01 12:48:39 +01:00
|
|
|
- `NOMOS_TESTS_TRACING` — Enable file logging for local runner
|
|
|
|
|
|
2025-12-18 17:26:02 +01:00
|
|
|
See [Logging & Observability](logging-observability.md) for details.
|
2025-12-01 12:48:39 +01:00
|
|
|
|
|
|
|
|
## Navigation Guide
|
|
|
|
|
|
|
|
|
|
| To Do This | Go Here |
|
|
|
|
|
|------------|---------|
|
|
|
|
|
| **Run an example** | `examples/src/bin/` → `cargo run -p runner-examples --bin <name>` |
|
|
|
|
|
| **Write a custom scenario** | `testing-framework/core/` → Implement using `ScenarioBuilder` |
|
|
|
|
|
| **Add a new workload** | `testing-framework/workflows/src/workloads/` → Implement `Workload` trait |
|
|
|
|
|
| **Add a new expectation** | `testing-framework/workflows/src/expectations/` → Implement `Expectation` trait |
|
|
|
|
|
| **Modify node configs** | `testing-framework/configs/src/topology/configs/` |
|
|
|
|
|
| **Extend builder DSL** | `testing-framework/workflows/src/builder/` → Add trait methods |
|
|
|
|
|
| **Add a new deployer** | `testing-framework/runners/` → Implement `Deployer` trait |
|
|
|
|
|
|
|
|
|
|
For detailed guidance, see [Internal Crate Reference](internal-crate-reference.md).
|