Lux Docs

Architecture

Single-binary Go explorer architecture

Overview

The explorer is a single statically-linked Go binary with three concurrent subsystems:

explorer binary
├── Indexer goroutines (one per chain)
│   └── Writes to per-chain SQLite + BadgerDB
├── API server (HTTP)
│   └── Reads from all chain databases
│   └── Serves /v1/explorer/{chain}/* endpoints
└── Replicator (optional)
    └── Streams WAL to S3 with PQ encryption

Per-Chain Storage

{data_dir}/{chain_slug}/
  query/indexer.db    # SQLite: blocks, txs, tokens, contracts
  kv/                 # BadgerDB: hash->data, height->block

Each chain is isolated. No shared database. Zero write contention.

Key Packages

PackagePurpose
cmd/explorer/CLI entrypoint
evm/Full EVM indexer (blocks, txs, tokens, traces, contracts)
evm/api/REST API server
evm/api/repository.goDatabase query layer
storage/Dual-layer SQLite + BadgerDB
{x,a,b,q,t,z,k}chain/Native DAG chain adapters
multichain/100+ external chain indexer

Build Process

# Development
go run ./cmd/explorer --rpc=...

# Production release
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o explorer ./cmd/explorer

The binary is fully self-contained. No external runtime, no Redis, no PostgreSQL required.

On this page