Skip to main content
Check the status of required dependencies and development tools.

Usage

Description

The doctor command verifies your development environment is correctly configured for Erst. It checks:
  • Go installation: Verifies Go is installed and version matches go.mod
  • Rust toolchain: Checks rustc and cargo are available
  • Simulator binary: Locates the erst-sim executable
  • Config files: Validates TOML syntax in configuration files
  • RPC endpoint: Tests connectivity to the configured RPC server
Use this command to troubleshoot installation issues or verify your setup before debugging transactions.

Flags

--verbose
boolean
default:"false"
Show detailed diagnostic information including file paths and version checksAlias: -v

Examples

Output

The command displays a checklist of dependencies:

Status indicators

  • [OK] - Dependency is installed and working
  • [FAIL] - Dependency is missing or misconfigured

Failure hints

When a check fails, the doctor provides fix hints:

Dependency checks

Go

Verifies:
  • Go is in PATH
  • Version is installed
  • Version matches go.mod requirements
Fix hint: Install Go from https://go.dev/doc/install

Rust (rustc)

Verifies:
  • rustc is in PATH
  • Version is available
Fix hint: Install Rust from https://rustup.rs/ or run:

Cargo

Verifies:
  • cargo is in PATH
  • Version is available
Fix hint: Cargo is included with Rust. Install from https://rustup.rs/

Simulator Binary (erst-sim)

Verifies:
  • Binary exists in standard locations:
    • simulator/target/release/erst-sim
    • ./erst-sim
    • ../simulator/target/release/erst-sim
    • In system PATH
Fix hint: Build the simulator:

TOML config

Verifies:
  • Configuration files (.erst.toml, ~/.erst.toml, /etc/erst/config.toml) have valid syntax
  • Non-comment lines contain = for key-value pairs
Fix hint: Fix syntax in .erst.toml or remove the malformed file

RPC endpoint

Verifies:
  • Configured RPC endpoint is reachable
  • Health check endpoint responds within 5 seconds
Fix hint: Set ERST_RPC_URL or ensure the default RPC is reachable

Verbose mode

With --verbose, the doctor shows additional information:

Exit codes

  • 0 - All checks passed
  • 0 - Some checks failed (warnings only, does not exit with error)

Common issues

Go version mismatch

Problem: go.mod requests 1.21 but installed 1.20 Solution: Upgrade Go to the required version:

Simulator binary not found

Problem: [FAIL] Simulator Binary (erst-sim) Solution: Build the Rust simulator:

RPC endpoint unreachable

Problem: [FAIL] RPC endpoint Solution: Check network connectivity or configure custom RPC:

TOML syntax error

Problem: [FAIL] TOML config (line 5 missing '=') Solution: Fix the syntax error in .erst.toml:
  • debug - Main debugging command that uses these dependencies
  • cache - Manage cached data (uses RPC endpoint)