Development

Day-to-day tasks (build, test, lint, run a network, soak, monitor) are wrapped by a top-level justfile. Install just (brew install just, cargo install just, or your package manager) and just --list shows the full menu.

Quick reference

# Full CI gate (run this before opening a PR).
just check

# Individual gates
just build                  # cargo build --release --all-targets
just test                   # cargo nextest run --workspace
just test-doc               # cargo test --doc
just clippy                 # cargo clippy --all-targets -- -D warnings
just fmt-check              # cargo fmt --all -- --check
just fmt                    # apply rustfmt

# Run a node
just run-relay preview
just run-bp mainnet
just mithril-import preview

# Local devnet (loopback testnet)
just devnet-setup           # one-time
just devnet-run             # start dugite-bp + dugite-relay + cardano-node-bp
just devnet-soak            # 30-minute soak
just devnet-verify          # check evidence
just devnet-stop

# Preview Sandstone soak
just soak-6h                # Haskell relay + dugite BP, 6h orchestrator
just soak-bare-bp           # dugite BP alone
just soak-status

# Monitoring (Prometheus + Grafana via Docker)
just monitor-start
just monitor-status
just monitor-stop
just watch-metrics          # tail the Prometheus endpoint

# Validation
just compat-n2c             # cardano-cli vs dugite-cli N2C diff
just compat-leader          # leader-schedule N2C diff
just submit-txs n=100       # submit N test transactions
just stress-test
just stress-relay
just benchmark-pipeline

# Dev / release helpers
just licenses               # regenerate docs/src/reference/third-party-licenses.md
just clean-worktrees        # prune stale git worktree branches
just query-tip              # dugite-cli query tip against ./node.sock

Layout

The recipes wrap scripts under scripts/<group>/:

GroupPath
Runscripts/run/{bp,relay}-{mainnet,preview,preprod}.sh, scripts/run/dual-node.sh, scripts/run/haskell-relay-preview.sh
Soakscripts/soak/orchestrator-6h.sh + helpers
Monitoringscripts/monitoring/start.sh, watch-metrics.sh, health-check.sh, bp-watch.sh, relay-watchdog.sh
Validationscripts/validation/n2c-compat-test.sh, leader-schedule-compat.sh, stress-test*.sh, submit-txs.sh, benchmark-pipeline-depth.sh
Mithrilscripts/mithril/import.sh
Devscripts/dev/check.sh, generate-licenses.py, cleanup-worktree-branches.sh, query-tip.sh

Each script does cd "$(dirname "$0")/../.." first, so you can invoke them from anywhere — just, the repo root, or by absolute path. See scripts/README.md and config/README.md for the canonical layout description.

Hard requirements

  • Zero warningscargo clippy --all-targets -- -D warnings (also run by just clippy and just check)
  • Formattedcargo fmt --all -- --check (just fmt-check)
  • All tests passcargo nextest run --workspace and cargo test --doc (just test, just test-doc)
  • CI green before merging
  • Focused commits — stage explicit filenames; the pre-commit hook warns if staged paths span more than two crates (set DUGITE_PRECOMMIT_STRICT=1 to make this fatal)