Getting Started
Prerequisites, setup, and running Olympus locally or with Docker.
Prerequisites
- Rust 1.85+ (
rustup update stable) - Bun 1.0+ (for frontend and docs apps)
- Docker with Docker Compose
- Git
Clone and Configure
git clone <repo-url> olympus-chain
cd olympus-chainCreate your .env file from the example:
cp .env.example .envEdit .env and set your configuration:
OLYMPUS_ENV=dev
OLYMPUS_PORT=3000
CARGO_REGISTRY_TOKEN=your-artifactory-token-hereCorporate Proxy Setup (Artifactory)
If you're behind a corporate proxy (Zscaler, etc.), Cargo needs to pull crates through Artifactory.
Local Cargo Config
Create or update ~/.cargo/config.toml:
[net]
git-fetch-with-cli = true
[registry]
default = "artifactory"
global-credential-providers = ["cargo:token"]
[registries.artifactory]
index = "sparse+https://artifactory.lseg.com/artifactory/api/cargo/cargo-crates-remote/index/"
[source.artifactory-remote]
registry = "sparse+https://artifactory.lseg.com/artifactory/api/cargo/cargo-crates-remote/index/"
[source.crates-io]
replace-with = "artifactory-remote"Create ~/.cargo/credentials.toml:
[registries.artifactory]
token = "Bearer <your-token>"Docker Builds
Docker builds read the raw token (without Bearer prefix) from CARGO_REGISTRY_TOKEN in .env. The Dockerfile adds the Bearer prefix and writes credentials.toml automatically when OLYMPUS_ENV=dev.
Running Locally (without Docker)
# Build
cargo build
# Run tests
cargo test --workspace
# Start the server
OLYMPUS_ENV=dev cargo runThe server starts two listeners:
| Listener | Port | Purpose |
|---|---|---|
| Main API | 3000 (dev) / 8080 (prod) | REST API, metrics |
| EVM RPC | 8545 | Ethereum JSON-RPC |
Override with environment variables:
OLYMPUS_LISTEN_ADDR=0.0.0.0:9999 cargo run # override API port
OLYMPUS_EVM_RPC_ADDR=0.0.0.0:9545 cargo run # override EVM RPC portRunning with Docker Compose
The Makefile provides shortcuts for common operations:
| Command | What it does |
|---|---|
make up | Start core services (app, prometheus, grafana) |
make up-all | Start everything including Blockscout (contracts auto-verified) |
make down | Stop core services |
make clean | Stop and delete all data volumes |
make logs | Tail app logs |
make test | Run all tests |
make web-install | Install frontend dependencies |
make web-dev | Start frontend dev server (port 5173) |
make web-build | Production build of frontend |
Quick Start
# Start core services
make up
# Check it's running
curl localhost:3000/health
# View logs
make logs
# Stop everything
make downTrading Frontend
The frontend is a Vite + React app that connects to the backend via REST and WebSocket:
# Install and start the dev server
make web-install
make web-devOpen http://localhost:5173 — the dev server proxies API and WebSocket requests to port 3000. See Trading Frontend for details.
Services and Ports
| Port | Service | URL | Description |
|---|---|---|---|
| 3000 | Olympus API | http://localhost:3000 | REST API + WebSocket + metrics |
| 5173 | Trading Frontend | http://localhost:5173 | React trading UI (dev server) |
| 3001 | Blockscout UI | http://localhost:3001 | Block explorer (requires overlay) |
| 4000 | Grafana | http://localhost:4000 | Metrics dashboard (admin/admin) |
| 8545 | EVM JSON-RPC | http://localhost:8545 | Ethereum RPC |
| 9090 | Prometheus | http://localhost:9090 | Metrics collection |
Data is persisted to a olympus_data Docker volume mounted at /data/olympus-chain (RocksDB). The OLYMPUS_DATA_DIR environment variable controls the path.
Connecting MetaMask
- Open MetaMask > Settings > Networks > Add Network
- Fill in:
- Network Name: Olympus
- RPC URL:
http://localhost:8545 - Chain ID:
1337 - Currency Symbol:
OLP
- Save and switch to the network
Running Tests
# All tests
cargo test --workspace
# Specific crate
cargo test -p olympus-core
cargo test -p olympus-evm
cargo test -p olympus-bridge
# E2E integration tests
cargo test --test e2e_test
# With output
cargo test --workspace -- --nocaptureEnvironment Modes
| Setting | Dev | Production |
|---|---|---|
OLYMPUS_ENV | dev | production |
| API port | 3000 | 8080 |
| EVM RPC port | 8545 | 8545 |
| Cargo registry | Artifactory | crates.io |