Lightchain
Mainnet live

Run a Worker.
Power AI. Earn $LCAI.

Stake LCAI, serve llama3-8b inference jobs, and connect to the worker gateway. The full setup runs from a single Docker image, and rewards land directly in your worker wallet.

What is a Lightchain Node?

What is a Lightchain Node?

Unlike traditional blockchain nodes that only validate ledgers, Lightchain workers execute real AI workloads. Powered by Proof of Intelligence (PoI), every node runs the AIVM to process training, inference, and optimization tasks that help secure the network.

Why Run a Node?

Earn $LCAI rewards

Get paid in LCAI for every inference job your worker completes on the network.

Secure the network

Stake LCAI and contribute compute to a censorship-resistant AI layer.

Run real AI workloads

Serve llama3-8b inference jobs to requesters routed through the worker gateway.

Before you onboard

Stand up these four prerequisites before you touch the worker image. Every step in the onboarding flow assumes they are already in place.

Docker

Required to pull the worker image and run the sidecar with --restart always. On Linux, add yourself to the docker group (sudo usermod -aG docker $USER && newgrp docker), or prefix the docker commands below with sudo.

GPU with 8GB+ VRAM

Enough headroom to serve llama3-8b through Ollama on the host.

Foundry (cast)

Used for key generation, contract reads, balance checks, and funding the worker.

Funder wallet (50,001+ LCAI)

An existing wallet you control. It pays the 50,000 stake plus roughly 1 LCAI of gas, and never doubles as the worker key.

Onboard in nine steps

From a fresh worker key to a running container connected to the worker gateway. Run each command top to bottom, since most steps depend on env vars exported in the previous one.

Phase 00

Generate a fresh worker key

Always use a brand-new key for the worker. Never reuse your funder. The worker key sits in a Docker container next to the keystore password, so it should hold only the working capital you are comfortable exposing on that machine.

  • Run cast wallet new and copy both the address and the private key.
  • Export them as WORKER_ADDR and WORKER_PRIVKEY for later steps.
  • Sanity check that the privkey derives back to the same address before funding it.
Generate worker key
cast wallet new export WORKER_ADDR=0x... # Address line from cast wallet new export WORKER_PRIVKEY=... # Private key line cast wallet address --private-key "$WORKER_PRIVKEY"

Phase 01

Resolve mainnet contract addresses

AIConfig and JobRegistry are resolved from the predeployed WorkerRegistry. The docker run steps below pick them up from your shell.

  • Set the mainnet RPC URL and predeployed WorkerRegistry address.
  • Read AIConfig and JobRegistry from WorkerRegistry via cast call.
  • Echo the values to confirm they exported successfully.
Resolve & export addresses
export RPC_URL=https://rpc.mainnet.lightchain.ai export WORKER_REGISTRY_ADDRESS=0x0000000000000000000000000000000000001002 export AI_CONFIG_ADDRESS=$(cast call $WORKER_REGISTRY_ADDRESS "aiConfig()(address)" --rpc-url $RPC_URL) export JOB_REGISTRY_ADDRESS=$(cast call $WORKER_REGISTRY_ADDRESS "jobRegistry()(address)" --rpc-url $RPC_URL) echo "AI_CONFIG_ADDRESS=$AI_CONFIG_ADDRESS" echo "JOB_REGISTRY_ADDRESS=$JOB_REGISTRY_ADDRESS"

Phase 02

Install Ollama and pull a model

The worker calls Ollama on the host to serve inference. Install the runtime, start the server, pull llama3:8b, then alias it to llama3-8b so SUPPORTED_MODELS resolves.

  • Install Ollama and run ollama serve in the background.
  • Pull llama3:8b, the model the worker advertises by default.
  • Alias it as llama3-8b to match SUPPORTED_MODELS.
Install runtime + pull model
curl -fsSL https://ollama.com/install.sh | sh ollama serve & ollama pull llama3:8b ollama cp llama3:8b llama3-8b

Phase 03

Pull the worker Docker image

Pull the official mainnet worker image. The same image runs the CLI subcommands (import-key, keygen, register, status, deregister) and the long-running sidecar.

Pull worker image
docker pull us-central1-docker.pkg.dev/lightchain/lightchain-mainnet-public-docker/worker:latest

Phase 04

Import the worker private key

Encrypt $WORKER_PRIVKEY into a keystore the container can mount. The Address printed by import-key must equal $WORKER_ADDR. If they differ, stop, because the wrong key was imported.

  • Create the keystore directory the container will mount.
  • Run import-key with the private key and your chosen password.
  • Confirm the printed address matches $WORKER_ADDR exactly.
Import key into keystore
mkdir -p ~/lightchain-worker/keys docker run --rm -v ~/lightchain-worker/keys:/data --entrypoint /bin/lightchain-worker us-central1-docker.pkg.dev/lightchain/lightchain-mainnet-public-docker/worker:latest import-key --private-key "$WORKER_PRIVKEY" --password <YOUR_PASSWORD> --output /data/eth-keystore

Phase 05

Generate the ECDH encryption key

The worker registers an ECDH public key on-chain so requesters can encrypt jobs to it. Run keygen once to derive and persist the encryption keystore alongside the eth keystore.

Generate ECDH key
docker run --rm -v ~/lightchain-worker/keys:/data -e WORKER_KEYSTORE_PATH=/data/eth-keystore/$(ls ~/lightchain-worker/keys/eth-keystore/ | head -1) -e WORKER_KEYSTORE_PASSWORD=<YOUR_PASSWORD> -e ENCRYPTION_KEYSTORE_PATH=/data/worker-encryption.key -e RPC_URL=https://rpc.mainnet.lightchain.ai -e CHAIN_ID=9200 -e WORKER_REGISTRY_ADDRESS=0x0000000000000000000000000000000000001002 -e AI_CONFIG_ADDRESS=$AI_CONFIG_ADDRESS -e SUPPORTED_MODELS=llama3-8b --entrypoint /bin/lightchain-worker us-central1-docker.pkg.dev/lightchain/lightchain-mainnet-public-docker/worker:latest keygen

Phase 06

Fund the worker from your funder wallet

Send LCAI from your funder wallet to $WORKER_ADDR. The worker needs at least 50,001 LCAI: 50,000 for the minimum stake plus roughly 1 LCAI for gas (the register tx, plus per-job ack and complete txs over the worker's lifetime). Funding 50,005 LCAI gives a comfortable buffer.

  • Set FUNDER_PRIVKEY to your existing funder wallet, never the worker key.
  • Send 50,005 LCAI to $WORKER_ADDR with cast send.
  • Verify the worker received the funds with cast balance.
Send LCAI to worker
export FUNDER_PRIVKEY=... cast send "$WORKER_ADDR" --value 50005ether --rpc-url "$RPC_URL" --private-key "$FUNDER_PRIVKEY" cast balance "$WORKER_ADDR" --rpc-url "$RPC_URL" | awk '{printf "%.4f LCAI\n", $1/1e18}'

Phase 07

Register on-chain

Submit the registration transaction. This stakes 50,000 LCAI (auto-queried from AIConfig), registers your ECDH public key on-chain, and adds llama3-8b to your supported models.

Register worker
docker run --rm -v ~/lightchain-worker/keys:/data -e WORKER_KEYSTORE_PATH=/data/eth-keystore/$(ls ~/lightchain-worker/keys/eth-keystore/ | head -1) -e WORKER_KEYSTORE_PASSWORD=<YOUR_PASSWORD> -e ENCRYPTION_KEYSTORE_PATH=/data/worker-encryption.key -e RPC_URL=https://rpc.mainnet.lightchain.ai -e CHAIN_ID=9200 -e WORKER_REGISTRY_ADDRESS=0x0000000000000000000000000000000000001002 -e AI_CONFIG_ADDRESS=$AI_CONFIG_ADDRESS -e SUPPORTED_MODELS=llama3-8b --entrypoint /bin/lightchain-worker us-central1-docker.pkg.dev/lightchain/lightchain-mainnet-public-docker/worker:latest register

Phase 08

Run the worker and verify

Start the long-running sidecar in detached mode. The --add-host flag is a no-op on macOS and Windows, but it makes host.docker.internal resolve on Linux. Tail the logs to confirm the worker is fully online.

  • Launch the worker container with --restart always so it recovers from reboots.
  • Tail the logs and look for registration validated, authenticated with worker-gateway, and websocket connected.
  • Once those three lines appear, the worker is sending heartbeats every 10s and receiving jobs over the gateway WebSocket.
Run worker (detached) + tail logs
docker run -d --restart always --user root --name lightchain-worker --add-host=host.docker.internal:host-gateway -v ~/lightchain-worker/keys:/data -e WORKER_KEYSTORE_PATH=/data/eth-keystore/$(ls ~/lightchain-worker/keys/eth-keystore/ | head -1) -e WORKER_KEYSTORE_PASSWORD=<YOUR_PASSWORD> -e ENCRYPTION_KEYSTORE_PATH=/data/worker-encryption.key -e RPC_URL=https://rpc.mainnet.lightchain.ai -e CHAIN_ID=9200 -e WORKER_REGISTRY_ADDRESS=0x0000000000000000000000000000000000001002 -e AI_CONFIG_ADDRESS=$AI_CONFIG_ADDRESS -e JOB_REGISTRY_ADDRESS=$JOB_REGISTRY_ADDRESS -e SUPPORTED_MODELS=llama3-8b -e OLLAMA_URL=http://host.docker.internal:11434 -e BEACON_API_URL=https://beacon.mainnet.lightchain.ai -e BLOB_MODE=beacon -e SESSION_KEY_FILE=/data/session-keys.enc -e WORKER_GATEWAY_URL=https://worker-gateway.mainnet.lightchain.ai us-central1-docker.pkg.dev/lightchain/lightchain-mainnet-public-docker/worker:latest docker logs -f lightchain-worker

Launch checklist

If you can tick every box before docker run, the worker should come online without surprises.

Launch checklist

I generated a brand-new worker key, separate from my funder.

cast wallet address --private-key "$WORKER_PRIVKEY" returns $WORKER_ADDR.

AI_CONFIG_ADDRESS and JOB_REGISTRY_ADDRESS are exported.

Both resolved from the predeployed WorkerRegistry on mainnet.

My funder wallet sent 50,001+ LCAI to $WORKER_ADDR.

cast balance confirms the worker has stake plus a small gas buffer.

Ollama is running and llama3-8b is pulled and aliased.

ollama list shows llama3-8b. The worker reaches it via host.docker.internal:11434.

Logs show registration validated, gateway auth, and websocket connected.

Those three lines confirm the worker is fully online and ready for jobs.

Network reference

Contract addresses and public endpoints for the selected network. Switch tabs at the top of the page to view mainnet or testnet.

Mainnet reference

Mainnet protocol contract addresses and public endpoints used by the onboarding flow above when Mainnet is selected.

Contract addresses

Predeploys live at the genesis slots; protocol contracts are upgradeable proxies. All 5 protocol contracts are deployer-owned today; multisig handover is in flight.

  • WorkerRegistryGenesis predeploy

    0x0000000000000000000000000000000000001002

  • FeePoolGenesis predeploy

    0x0000000000000000000000000000000000001004

  • NativeVotesGenesis predeploy

    0x0000000000000000000000000000000000001001

  • AIConfig (proxy)Proxy

    0x24D11533C354092ed6E18b964257819cE78Ce77D

  • JobRegistry (proxy)Proxy

    0xfB15F90298e4CcD7106E76fFB5e520315cC42B0b

  • Treasury (proxy)Proxy

    0x786eDe8C42Ca54E54c9dCECa9b30052CF4743389

  • LightChainGovernor (proxy)Proxy

    0x262E9f9232933E8565253918db703baD58DE93aB

  • TimelockController48h delay

    0x79e571420c5473Ca9b0FCd599B1b0062D7793c97

Public endpoints

The RPC, beacon, and gateway URLs the worker uses out of the box.

  • Chain RPC

    https://rpc.mainnet.lightchain.ai

  • Archive RPC

    https://archive.mainnet.lightchain.ai

  • Beacon API

    https://beacon.mainnet.lightchain.ai

  • Worker Gateway

    https://worker-gateway.mainnet.lightchain.ai

  • Dispatcher

    https://dispatcher.mainnet.lightchain.ai

  • Status page

    https://status.mainnet.lightchain.ai

Operate, monitor, and exit

Once the worker is live, these are the commands and flows you will come back to. They use the same image and env vars from the onboarding steps.

Check registration status

Run the status subcommand against the same keystore you used to register. It confirms stake, supported models, and on-chain worker health without restarting the sidecar.

Check status
docker run --rm -v ~/lightchain-worker/keys:/data -e WORKER_KEYSTORE_PATH=/data/eth-keystore/$(ls ~/lightchain-worker/keys/eth-keystore/ | head -1) -e WORKER_KEYSTORE_PASSWORD=<YOUR_PASSWORD> -e ENCRYPTION_KEYSTORE_PATH=/data/worker-encryption.key -e RPC_URL=https://rpc.mainnet.lightchain.ai -e CHAIN_ID=9200 -e WORKER_REGISTRY_ADDRESS=0x0000000000000000000000000000000000001002 -e AI_CONFIG_ADDRESS=$AI_CONFIG_ADDRESS -e SUPPORTED_MODELS=llama3-8b --entrypoint /bin/lightchain-worker us-central1-docker.pkg.dev/lightchain/lightchain-mainnet-public-docker/worker:latest status

Tail jobs in real time

Filter docker logs for ws_job_received, stage [1-8], job completed, and job failed to watch jobs flow through the gateway WebSocket.

Tail job logs
docker logs -f --tail=0 lightchain-worker | grep -E "ws_job_received|stage [1-8]|job completed|job failed"

Stop the worker

Stop and remove the running sidecar container. Your keystore and encryption key stay on disk under ~/lightchain-worker/keys, and your registration plus stake remain on-chain. Restart with the same docker run command from Phase 08 to come back online.

Stop & remove container
docker stop lightchain-worker && docker rm lightchain-worker

Deregister and withdraw stake

Run deregister with the same keystore env vars used in Phase 07. It removes the worker from the registry and returns the 50,000 LCAI stake (minus any slashing penalties) to the worker wallet. From there, transfer it to your designated wallet using cast send or a wallet UI.

Deregister worker
docker run --rm -v ~/lightchain-worker/keys:/data -e WORKER_KEYSTORE_PATH=/data/eth-keystore/$(ls ~/lightchain-worker/keys/eth-keystore/ | head -1) -e WORKER_KEYSTORE_PASSWORD=<YOUR_PASSWORD> -e ENCRYPTION_KEYSTORE_PATH=/data/worker-encryption.key -e RPC_URL=https://rpc.mainnet.lightchain.ai -e CHAIN_ID=9200 -e WORKER_REGISTRY_ADDRESS=0x0000000000000000000000000000000000001002 -e AI_CONFIG_ADDRESS=$AI_CONFIG_ADDRESS -e SUPPORTED_MODELS=llama3-8b --entrypoint /bin/lightchain-worker us-central1-docker.pkg.dev/lightchain/lightchain-mainnet-public-docker/worker:latest deregister
Hardware requirements

Hardware Requirements

Confirm your hardware clears the minimum spec, or matches the recommended spec for headroom, before you start onboarding.

SpecificationMinimumRecommended
CPU4 Cores (x86_64)16 Cores (AMD/Intel)
RAM16GB DDR464GB+ DDR5
Storage512GB NVMe SSD2TB NVMe Gen4
GPU8GB VRAM (llama3-8b)24GB+ VRAM (RTX 4090/A100)
Internet100 Mbps Up/Down1 Gbps Symmetric
FAQ

Frequently Asked Questions