Lux Skills Reference
Lux Deploy Blockchain Network Deployment System
Lux Deploy (github.com/luxfi/deploy) is the production deployment system for Lux blockchain networks. It provides two layers: (1) a comprehensive Makefile-based orchestration system for local and dev network lifecycle management (5-node validator bootstrap, multi-chain deployment, RLP block import, snapshots), and (2) a Go tool (deploy-subnets) that programmatically creates subnets and blockchains on remote Lux nodes via P-chain wallet transactions. Supports mainnet and testnet configurations for five chains: C-Chain, Zoo, Hanzo, SPC, and Pars.
Item Value Repo github.com/luxfi/deployLocal ~/work/lux/deploy/Go Module github.com/luxfi/deploy-subnets (Go 1.26.1)Dependencies github.com/luxfi/sdk, github.com/luxfi/crypto, github.com/luxfi/idsLicense See LICENSE
~/work/lux/deploy/
Makefile # Full deployment orchestration (698 lines)
DESIGN.md # Architecture design document
README.md # Usage documentation
cmd/
deploy-subnets/
main.go # Go tool for P-chain subnet/blockchain creation
go.mod # Module: github.com/luxfi/deploy-subnets
go.sum
deploy-subnets # Compiled binary
config/
networks/
mainnet.json # Mainnet network configuration
testnet.json # Testnet network configuration
node/
default.json # Default node configuration
lib/ # Shell library functions
common.sh # Shared utilities (paths, logging, error handling)
chains.sh # Chain-specific operations
network.sh # Network management
import.sh # RLP block import operations
snapshot.sh # Snapshot create/restore
scripts/ # High-level deployment scripts
deploy.sh # Full deployment orchestration
health.sh # Health check scripts
monitor.sh # Progress monitoring
Configuration Layer -- Environment variables, network/chain configs
Plugin Layer -- EVM plugin installation and VMID mapping
Network Layer -- 5-node validator bootstrap, port management, health monitoring
Chain Layer -- Subnet/L2 deployment, genesis configuration
Data Layer -- RLP block import, progress monitoring, state verification
Persistence Layer -- Snapshot creation, restoration, archival
Setting Mainnet Testnet Network ID 1 2 HTTP Port 9630 9640 Staking Port 9631 9641 gRPC Port 8369 8368
Chain Mainnet ID Testnet ID Notes C-Chain 96369 96368 Primary EVM chain Zoo 200200 200201 Zoo ecosystem chain Hanzo 36963 36962 Hanzo AI chain SPC 36911 -- Mainnet only Pars 494949 -- Via deploy-subnets tool
VMID: srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
Installed to ~/.lux/plugins/
Built from ~/work/lux/evm/ if not present
Chain Network Hash C-Chain Mainnet 0x3f4fa2a0b0ce089f52bf0ae9199c75ffdd76ecafc987794050cb0d286f1ec61eC-Chain Testnet 0x1c5fe37764b8bc146dc88bc1c2e0259cd8369b07a06439bcfa1782b5d4fb0995Zoo Mainnet 0x7c548af47de27560779ccc67dda32a540944accc71dac3343da3b9cd18f14933Zoo Testnet 0x0652fb2fde1460544a5893e5eba5095ff566861cbc87fcb1c73be2b81d6d1979SPC Mainnet 0x4dc9fd5cf4ee64609f140ba0aa50f320cadf0ae8b59a29415979bc05b17cfac8
# Full lifecycle
make deploy # Full: plugins + network + chains + import
make deploy-quick # Quick: plugins + network + chains (no import)
make dev # Dev setup: testnet + chains, no import
# Network management
make start-mainnet # Start 5-node mainnet (ports 9630-9638)
make start-testnet # Start 5-node testnet (ports 9640-9648)
make stop # Stop all networks
make restart # Stop + start current network
make wait-healthy # Wait for network health
# Chain deployment
make deploy-chains # Deploy all chains (Zoo, Hanzo, SPC)
make deploy-zoo # Deploy Zoo chain
make deploy-hanzo # Deploy Hanzo chain
make deploy-spc # Deploy SPC chain (mainnet only)
# Block import
make import-all # Import all RLP data (background)
make import-cchain # Import C-Chain blocks
make import-zoo # Import Zoo blocks
make import-spc # Import SPC blocks (mainnet only)
make import-status # Show import progress for all chains
# Snapshots
make snapshot # Create point-in-time snapshot
make restore SNAPSHOT=name # Restore from snapshot
make list-snapshots # List available snapshots
# Health and monitoring
make status # Show network and chain status
make health # Run health checks
make verify # Verify chain genesis hashes
make logs # Tail network logs
make logs-import # Show import progress in logs
# Cleanup
make clean # Clean runtime data (preserve snapshots)
make clean-all # Clean everything including snapshots
make clean-chains # Remove chain configurations
# Prerequisites
make check-prerequisites # Verify jq, curl, tar, lux CLI
make install-plugins # Install/update EVM plugin
make build-evm # Build EVM plugin from source
~/.lux/
plugins/ # EVM plugin binary
runs/
mainnet/ # Mainnet node data
testnet/ # Testnet node data
chains/ # Chain configurations
~/work/lux/
state/
rlp/ # RLP block files for import
snapshots/ # Network snapshots
chains/ # Chain genesis files
genesis/configs/ # Genesis configurations
cli/bin/lux # Lux CLI binary
evm/build/evm # Built EVM plugin
Programmatically deploys subnets and blockchains to remote Lux nodes via P-chain transactions.
LUX_MNEMONIC = "word1 word2 ..." ./deploy-subnets \
--endpoint http://24.199.78.71:9650 \
--chains zoo-mainnet,hanzo-mainnet,spc-mainnet \
--state-dir ~/work/lux/state \
--dry-run # Optional: preview without executing
Key Chain Name Genesis Path zoo-mainnetzoo chains/zoo-mainnet/genesis.jsonzoo-testnetzootest chains/zoo-testnet/genesis.jsonzoo-devnetzoodev chains/zoo-devnet/genesis.jsonhanzo-mainnethanzo chains/hanzo-mainnet/genesis.jsonhanzo-testnethanzotest chains/hanzo-testnet/genesis.jsonhanzo-devnethanzodev chains/hanzo-devnet/genesis.jsonspc-mainnetspc chains/spc-mainnet/genesis.jsonspc-testnetspctest chains/spc-testnet/genesis.jsonspc-devnetspcdev chains/spc-devnet/genesis.jsonpars-mainnetpars chains/pars-mainnet/genesis.jsonpars-testnetparstest chains/pars-testnet/genesis.jsonpars-devnetparsdev chains/pars-devnet/genesis.json
Derives secp256k1 keys from BIP39 mnemonic (indices 1-4, skip 0 which is staked)
Key derivation path: m/44'/60'/0'/0/\{index\}
Creates P-chain wallet via github.com/luxfi/sdk/wallet/primary
For each chain:
Reads genesis JSON from state directory
Issues CreateNetworkTx (creates subnet with owner key)
Issues CreateChainTx (creates blockchain on subnet with EVM VMID)
Reports subnet IDs, blockchain IDs, and RPC endpoints
Package Version Purpose github.com/luxfi/sdkv1.16.46 P-chain wallet and transaction building github.com/luxfi/cryptov1.17.40 secp256k1 key operations github.com/luxfi/idsv1.2.9 ID types (SubnetID, BlockchainID, VMID) github.com/luxfi/go-bip32v1.0.2 HD key derivation github.com/luxfi/go-bip39v1.1.2 Mnemonic validation and seed generation github.com/luxfi/utxov0.2.4 UTXO management (secp256k1fx keychain) github.com/luxfi/nodev1.22.81 Node types (indirect) github.com/luxfi/consensusv1.22.62 Consensus types (indirect) github.com/luxfi/gethv1.16.73 Ethereum types (indirect)
ag3GReYPNuSR17rUP8acMdZipQBikdXNRKDyFszAysmy3vDXE (used for all subnet chains)
Script Purpose common.shPaths, logging (colors, timestamps), error handling, set -euo pipefail chains.shChain CRUD, genesis validation, admin API calls network.shNetwork start/stop, health polling, port detection import.shRLP import initiation, progress tracking snapshot.shAtomic snapshot (stop network, tar, restart)
Idempotent operations : Every Makefile target can run multiple times safely
Parallel imports : Block imports run in background with monitoring
Atomic snapshots : Network stopped during snapshot for consistency
Health-first : Operations verify prerequisites before execution
No EWOQ keys : Mnemonic-based key derivation only
Network separation : Mainnet and testnet use different ports, never conflict
CLI-based : Uses lux CLI for network management, never pkill luxd
Repo Purpose github.com/luxfi/nodeNode software being deployed github.com/luxfi/evmEVM plugin built and installed github.com/luxfi/cliCLI tool for network management github.com/luxfi/genesisGenesis configuration files github.com/luxfi/sdkSDK for P-chain wallet transactions