Usage
Description
Thedoctor 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
rustcandcargoare available - Simulator binary: Locates the
erst-simexecutable - 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
boolean
default:"false"
Show detailed diagnostic information including file paths and version checksAlias:
-vExamples
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.modrequirements
Rust (rustc)
Verifies:rustcis in PATH- Version is available
Cargo
Verifies:cargois in PATH- Version is available
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
TOML config
Verifies:- Configuration files (
.erst.toml,~/.erst.toml,/etc/erst/config.toml) have valid syntax - Non-comment lines contain
=for key-value pairs
.erst.toml or remove the malformed file
RPC endpoint
Verifies:- Configured RPC endpoint is reachable
- Health check endpoint responds within 5 seconds
ERST_RPC_URL or ensure the default RPC is reachable
Verbose mode
With--verbose, the doctor shows additional information:
Exit codes
0- All checks passed0- 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: