Olympus

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-chain

Create your .env file from the example:

cp .env.example .env

Edit .env and set your configuration:

OLYMPUS_ENV=dev
OLYMPUS_PORT=3000
CARGO_REGISTRY_TOKEN=your-artifactory-token-here

Corporate 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 run

The server starts two listeners:

ListenerPortPurpose
Main API3000 (dev) / 8080 (prod)REST API, metrics
EVM RPC8545Ethereum 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 port

Running with Docker Compose

The Makefile provides shortcuts for common operations:

CommandWhat it does
make upStart core services (app, prometheus, grafana)
make up-allStart everything including Blockscout (contracts auto-verified)
make downStop core services
make cleanStop and delete all data volumes
make logsTail app logs
make testRun all tests
make web-installInstall frontend dependencies
make web-devStart frontend dev server (port 5173)
make web-buildProduction 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 down

Trading 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-dev

Open http://localhost:5173 — the dev server proxies API and WebSocket requests to port 3000. See Trading Frontend for details.

Services and Ports

PortServiceURLDescription
3000Olympus APIhttp://localhost:3000REST API + WebSocket + metrics
5173Trading Frontendhttp://localhost:5173React trading UI (dev server)
3001Blockscout UIhttp://localhost:3001Block explorer (requires overlay)
4000Grafanahttp://localhost:4000Metrics dashboard (admin/admin)
8545EVM JSON-RPChttp://localhost:8545Ethereum RPC
9090Prometheushttp://localhost:9090Metrics 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

  1. Open MetaMask > Settings > Networks > Add Network
  2. Fill in:
    • Network Name: Olympus
    • RPC URL: http://localhost:8545
    • Chain ID: 1337
    • Currency Symbol: OLP
  3. 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 -- --nocapture

Environment Modes

SettingDevProduction
OLYMPUS_ENVdevproduction
API port30008080
EVM RPC port85458545
Cargo registryArtifactorycrates.io

On this page