Mine Nexus

Nexus is the root chain of Lattice. Blocks are found by proof of work, and the block's miner names the address its reward pays.

Specification

Proof of workSHA256(prefix || nonce_be64) ≤ target: one SHA-256 over a block prefix of a few hundred bytes followed by the nonce as 8 big-endian bytes. Bitcoin's SHA-256d ASICs cannot mine it.
Block time1 hour target.
DifficultyASERT with a 120-block half-life (about 5 days). No averaging window, no clamp.
Reward1,048,576 NEX per block initially, plus the block's transaction fees.
Premine183,836,344,320 NEX (175,320 blocks' worth, about 10% of the maximum supply), credited in genesis to bafyreiflupnvbnmqaf4v6n4kqrukyxiepynlzy3rd2itjn42jgbkhuqiwa.
HalvingThe premine takes the first 175,320 slots of the schedule, so the first halving is at height 701,280, then every 876,600 blocks.
Max supply1,838,361,518,024 NEX. NEX has no decimal places: 1 NEX is the smallest unit.
Launch2026-10-04 06:19:59 UTC. Genesis bafyreiggtg4ezifboyekbf4gxst2jr3mpjqcxsbmopy7w6fp46g4ngpgxa, committed in the OP_RETURN of Bitcoin transaction 7501f77602b581f605e6bc61c310b540e17324d3cc292c18985d8a3464d23236 (block 970,053).

The protocol specification defines these rules.

Network now

Height…
Difficulty…
Block time…

Read from lattice-mainnet-read.fly.dev. Difficulty is the next block's target, as in the explorer; block time is the average over the last 25 blocks. ASERT sets each block's target from how far the chain is ahead of or behind the 1-hour schedule.

Solo mining only

There is no pool or stratum support: each miner runs a full node, which builds the block templates its worker searches. There is no exchange listing.

How to mine

The command-line node's prebuilt binaries are for macOS on Apple silicon and Linux x86_64. Linux builds need glibc 2.35 or newer (Ubuntu 22.04 or later) and the libcurl and libsqlite3 system libraries. There is no Windows command-line build: on Windows, follow these steps inside WSL2 (NVIDIA GPUs via CUDA), or use the desktop app, which runs its node in WSL and offers OpenCL GPU mining under Node → Mining.

  1. Install the command-line tools.

    curl -fsSL https://lattice.build/install.sh | sh
    export PATH="$HOME/.lattice/bin:$PATH"

    Add the export line to your shell profile (for example ~/.zshrc or ~/.bashrc) so later terminals find lattice.

  2. Create a node directory and start the node. Run every later lattice command from this directory.

    mkdir -p ~/lattice && cd ~/lattice
    lattice init
    lattice up
  3. Wait for the node to catch up. Its height should match the explorer's before mining.

    lattice status
  4. Create the key that receives rewards. Back up the file: its address is the reward recipient, and its private key is the only way to spend what it receives.

    lattice key generate --out ~/lattice/reward-key.json
  5. Download the GPU worker from the lattice-miner-gpu releases and check its checksum. Set P to linux-amd64 (CUDA and OpenCL, glibc 2.31 or newer) or macos-arm64 (Metal).

    cd ~/lattice
    V=0.1.0; P=linux-amd64
    curl -fsSLO https://github.com/0xLattice/lattice-miner-gpu/releases/download/$V/lattice-miner-gpu-$V-$P.tar.gz
    curl -fsSLO https://github.com/0xLattice/lattice-miner-gpu/releases/download/$V/lattice-miner-gpu-$V-$P.tar.gz.sha256
    shasum -a 256 -c lattice-miner-gpu-$V-$P.tar.gz.sha256
    tar -xzf lattice-miner-gpu-$V-$P.tar.gz
    ls "$PWD/lattice-miner-gpu-$V-$P/bin/lattice-miner-gpu"

    The last line prints the worker's absolute path, used in step 6. Where shasum is missing, use sha256sum -c.

    • NVIDIA (CUDA): install NVRTC from CUDA 12 (it is not bundled), and make sure an unversioned libcuda.so exists; if only libcuda.so.1 is present, symlink libcuda.so to it. The worker picks OpenCL by default on Linux, so start mining with LATTICE_MINER_BACKEND=cuda (step 7).
    • AMD, Intel, or NVIDIA via OpenCL: install the GPU driver's OpenCL runtime.
    • macOS: the binary is unsigned. If macOS blocks it (for example after a browser download), clear the quarantine flag: xattr -d com.apple.quarantine <path>.
    • Windows: the release's Windows archive is a standalone worker only, with no node or coordinator. Run these Linux steps inside WSL2 with the Linux archive; WSL2 passes NVIDIA GPUs through for CUDA, but AMD and Intel OpenCL is generally not available there.

    One worker process drives one GPU (CUDA device 0, the first OpenCL GPU, or the default Metal device); more workers share that same device, so one node mines with one GPU. The OpenCL kernel is checked against a CPU reference on a CPU OpenCL device and the CUDA kernel is compile-checked only; neither has been validated on physical GPUs by the release checks.

    To build from source instead (Rust), the binary is target/release/lattice-miner-gpu. On macOS (Metal):

    git clone https://github.com/0xLattice/lattice-miner-gpu.git
    cd lattice-miner-gpu
    cargo build --release

    On Linux (CUDA and OpenCL):

    git clone https://github.com/0xLattice/lattice-miner-gpu.git
    cd lattice-miner-gpu
    cargo build --release --features cuda,opencl
  6. Add a mine section to ~/lattice/lattice.json, with the worker's absolute path and the address from step 4:

    {
      "listen": 4001,
      "rpc": 8080,
      "mine": {
        "worker": "/abs/path/to/lattice-miner-gpu",
        "workers": 1,
        "batchSize": 10000000000,
        "recipients": { "Nexus": "<address>" }
      }
    }

    batchSize is the nonce span of one round, and a worker process starts every round, so set it to about 10 seconds of your GPU's hash rate: hashes per second × 10 (the example's 10,000,000,000 suits about 1 GH/s; the default, 2,000,000,000, is sized for a CPU worker). Keep a round well under 30 seconds: released nodes (4.0.0) discard a template 30 seconds after issuing it, and nonces left in the batch after that are not searched. A round also ends early when the tip changes.

  7. Start mining and check it.

    Metal (macOS) or OpenCL:

    cd ~/lattice
    lattice mine start
    lattice mine status

    NVIDIA via CUDA (set the variable every time mining is started):

    cd ~/lattice
    LATTICE_MINER_BACKEND=cuda lattice mine start
    lattice mine status

    The mining log is ~/lattice/log/mine.log. lattice mine stop stops it.

Docker (Linux, NVIDIA)

One image runs the node, the coordinator and the CUDA worker. It waits until the node reaches the public nodes' height, then mines. Requires the NVIDIA container runtime.

docker run --gpus all -v lattice-data:/data \
  -e RECIPIENTS=Nexus=<address> -e HOSTED_CHAINS= -e BATCH_SIZE=10000000000 \
  ghcr.io/0xlattice/lattice-miner-gpu:main

HOSTED_CHAINS= (empty) mines Nexus only. Other settings are in the image's entrypoint.

Verify, don't trust

Each node release tarball ships with a .sha256 file and an SPDX SBOM, and has a GitHub build-provenance attestation:

gh attestation verify lattice-node-<version>-linux-amd64.tar.gz -R 0xLattice/lattice-node

Linux release binaries are expected to be byte-reproducible from the tagged source; the release workflow rebuilds them twice in clean containers and requires the two rebuilds to match. See Release verification and Reproducible builds.

Compare your node's tip with public nodes. Each /health reports height, tipCID and nexusGenesisCID:

lattice-mainnet-iad · lattice-mainnet-ams · lattice-mainnet-sjc · lattice-mainnet-read

More: Mining workers · Getting started · Questions on GitHub Discussions