Lux Docs
Lux Skills Reference

Lux Universe

Production Network Infrastructure

Overview

Lux Universe is the production-grade infrastructure monorepo for running the Lux Network. It orchestrates triple 5-node validator networks (mainnet, testnet, devnet) using lux cli for node management and Docker Compose for supporting services (explorers, indexers, graph nodes, exchange, bridge, wallet, bank). The repo uses Git submodules to pin versions of core components (node, geth, evm, cli, netrunner, consensus).

Quick Reference

ItemValue
Moduleluxpatch (Go 1.26, minimal)
Networksmainnet, testnet, devnet
Nodes per network5 validators
Node managementlux cli (not Docker)
ServicesDocker Compose profiles
ChainsC-Chain (96369), Zoo (200200), Hanzo (36963)
State dir~/work/lux/state
Snapshot dir~/.lux/snapshots/

Architecture

                ┌────────────────────────────────────────┐
                │            lux universe                │
                │  ┌──────────┐ ┌────────┐ ┌──────────┐ │
                │  │ mainnet  │ │testnet │ │ devnet   │ │
                │  │ 5 nodes  │ │5 nodes │ │ 5 nodes  │ │
                │  │9630-9638 │ │9640-48 │ │ 9650-58  │ │
                │  └────┬─────┘ └───┬────┘ └────┬─────┘ │
                │       │           │            │       │
                │  ┌────▼───────────▼────────────▼─────┐ │
                │  │         Docker Services            │ │
                │  │  Explorers  Graph  Exchange  IAM   │ │
                │  │  Indexers   IPFS   Bridge   Bank   │ │
                │  │  Postgres   Redis  Pricing  Wallet │ │
                │  └───────────────────────────────────┘ │
                └────────────────────────────────────────┘

Port Allocation

NetworkHTTP PortsStaking PortsChain IDZoo Chain ID
Mainnet9630-9638 (even)9631-9639 (odd)96369200200
Testnet9640-9648 (even)9641-9649 (odd)96368200201
Devnet9650-9658 (even)9651-9659 (odd)13371338

Service ports: PostgreSQL 5432, Redis 6380, LUX Explorer 4010, Zoo Explorer 4011, Hanzo Explorer 4012, Graph Node 8000, IPFS 5001, Pricing API 8085, LXD Gateway 8080.

Network Operations

# Start/stop individual networks
make start network=main    # or test, dev
make stop network=main
make restart network=main

# Start everything (all 3 networks + Docker services)
make all
make stop-all

# Health checks
make health network=main
make status network=main
make status-all            # All networks + Docker services

# Chain tracking (ensure tracked chains are deployed)
make track network=main

Snapshot Management

# Save/load snapshots
make snapshot network=main name=pre-upgrade
make resume network=main name=pre-upgrade

# Bootstrap from pre-built snapshots
make bootstrap network=main
make bootstrap-start network=main

# Manual snapshot operations
make snapshot-save network=main name=checkpoint
make snapshot-load network=main name=checkpoint
make snapshot-list
make snapshot-clean

Docker Compose Profiles

The compose.yml uses profiles to selectively start service groups:

ProfileServices
(default)5 validator nodes, postgres, redis, pricing, IPFS, LUX explorer
explorersZoo explorer, Hanzo explorer
graphGraph Protocol node
indexersP-Chain indexer, X-Chain indexer
bridgeBridge NATS, Consul, KMS (Vault)
uiExchange UI, Wallet, Bridge UI, LXD Gateway, Explorer Frontend
bankBank API, Dashboard, Admin, Docs, Marketing Site
iamHanzo IAM (lux.id)
devAdminer (DB admin), Redis Commander
# Start with profiles
docker compose up -d                          # Default services
docker compose --profile explorers up -d      # Add explorers
docker compose --profile graph up -d          # Add Graph Protocol
docker compose --profile ui up -d             # Add frontend UIs
docker compose --profile bank up -d           # Add Lux Bank (lux.financial)

Validator Nodes (Docker)

5 validator nodes run as Docker containers with:

  • Image: ghcr.io/luxfi/node:latest
  • Network: lux-network (172.30.0.0/16)
  • Static IPs: 172.30.0.10-14
  • Bootstrap: Node 1 (172.30.0.10) is the bootstrap node
  • Keys: Mounted from ~/.lux/keys/node\{0-4\}/
  • Genesis: Mounted from ~/work/lux/genesis/configs/mainnet/
  • Health checks: curl http://localhost:9630/ext/health every 30s

Blockchain Explorers

ExplorerChainChain IDPortImage
LUX ExplorerC-Chain963694010Blockscout
Zoo ExplorerZoo Network2002004011Blockscout
Hanzo ExplorerAI Chain369634012Blockscout
Explorer FrontendC-Chain963693100ghcr.io/luxfi/explore

All explorers use shared PostgreSQL with separate databases (explorer_lux, explorer_zoo, explorer_hanzo).

Chain Import

# Import chain data from RLP files
make import network=main    # Imports C-Chain + Zoo via admin_importChain RPC
make import network=test

RLP files stored at ~/work/lux/state/rlp/.

AMM Testing

make amm network=main       # Test AMM on C-chain
make amm-zoo network=main   # Test AMM on Zoo chain

Submodules

Core

SubmoduleDescription
nodeLux consensus node (luxd)
gethGo-Ethereum fork (luxfi/geth)
evmEVM plugin for Lux
cliLux CLI tool
netrunnerNetwork testing/orchestration
consensusConsensus engine library

Application

SubmoduleDescription
bridgeCross-chain bridge
exchangeAMM DEX frontend
explorer-luxLUX block explorer
explorer-zooZoo block explorer
explore-luxExplorer frontend
graph-node-luxGraph Protocol node
v2-subgraphUniswap V2 subgraph
v3-subgraphUniswap V3 subgraph

Data

SubmoduleDescription
stateNetwork state data (snapshots, RLP, keys)
make init       # Initialize all submodules
make update     # Pull latest for all
make sync       # Sync URLs from .gitmodules
make list       # List submodules with commits

Infrastructure Layer

Database

Shared PostgreSQL (ghcr.io/hanzoai/sql) with databases: explorer_lux, explorer_zoo, explorer_hanzo, explorer_pchain, explorer_xchain, graph_node, iam, bank.

Caching

Redis (ghcr.io/hanzoai/kv) with appendonly, 2GB max memory, allkeys-lru eviction.

K8s Manifests (k8s/)

Production Kubernetes manifests for DOKS clusters:

DirectoryPurpose
lux-k8s/Main Lux services cluster
lux-mainnet/Mainnet validator deployment
lux-testnet/Testnet validator deployment
lux-devnet/Devnet deployment
lux-gateway/KrakenD API gateway
lux-explorer/Block explorer
lux-bridge/Bridge infrastructure
lux-mpc/MPC key management
lux-ns/Namespace definitions
bootnode/Bootstrap node
dns/DNS configuration
hanzo-k8s/Hanzo services on Lux cluster

Configuration (configs/)

  • genesis.json -- Network genesis configuration
  • validators.json -- Validator definitions
  • node1.json - node5.json -- Per-node configurations
  • node-template.json -- Node config template
  • chains/ -- Chain-specific configurations
  • gateway/ -- API gateway configuration
  • chain-configs/C/ -- C-Chain configuration

Lux Bank (lux.financial)

B2B stablecoin infrastructure with:

  • Bank API (port 4000) -- Backend services with Currency Cloud integration
  • Dashboard (port 3500) -- Client portal
  • Admin (port 3502) -- Admin dashboard
  • Docs (port 3503) -- Documentation
  • Site (port 3501) -- Marketing site

Domains: lux.financial, app.lux.financial, api.lux.financial, admin.lux.financial, docs.lux.financial.

Build & Test

make build          # Build node + CLI
make build-node     # Build lux node only
make build-cli      # Build lux CLI only
make build-evm      # Build EVM plugin
make build-docker   # Build Docker images
make test           # Run tests for node/geth/evm/cli
make fmt            # Format Go code
make lint           # Run go vet

Key Endpoints (Running)

EndpointURL
Mainnet C-Chain RPChttp://127.0.0.1:9630/ext/bc/C/rpc
Testnet C-Chain RPChttp://127.0.0.1:9640/ext/bc/C/rpc
Devnet C-Chain RPChttp://127.0.0.1:9650/ext/bc/C/rpc
LUX Explorerhttp://127.0.0.1:4010
Zoo Explorerhttp://127.0.0.1:4011
Graph Nodehttp://127.0.0.1:8000
LXD Gatewayhttp://127.0.0.1:8080

Directory Structure

universe/
  compose.yml              # Main Docker Compose (all services)
  compose.mainnet.yml      # Mainnet-specific overrides
  compose.testnet.yml      # Testnet-specific overrides
  compose.devnet.yml       # Devnet overrides
  compose.local.yml        # Local development
  compose.services.yml     # Services-only
  compose.server.yml       # Server deployment
  Makefile                 # Network + service management
  configs/                 # Node configs, genesis, validators
  chain-configs/           # Chain-specific configs (C/)
  docker/                  # Dockerfiles, init SQL, genesis
  k8s/                     # Production K8s manifests
  iam/                     # IAM init data
  scripts/                 # Operational scripts
  docs/                    # Documentation
  node -> (submodule)      # luxfi/node
  geth -> (submodule)      # luxfi/geth
  evm -> (submodule)       # luxfi/evm
  cli -> (submodule)       # luxfi/cli
  netrunner -> (submodule) # luxfi/netrunner
  consensus -> (submodule) # luxfi/consensus
  explore -> (symlink)     # Explorer frontend
  explorer -> (symlink)    # Explorer backend

On this page