Chains
Create and deploy custom chains on Lux Network
Chains
Chains are sovereign networks within Lux that define their own rules for membership, consensus parameters, and virtual machine implementations. Every chain is validated by a dynamic set of validators who also validate the Lux Primary Network.
What Are Chains?
A chain is an independent network with its own:
- Validator set - Choose which validators participate
- Consensus parameters - Tune finality speed and throughput
- Virtual machine - Run EVM, Sovereign L1 EVM, or a fully custom VM
- Gas token - Use LUX or a custom native token
- Access control - Public or permissioned networks
Chains do not share state or execution with other chains. They are isolated environments that leverage the Lux Primary Network for validator coordination and security.
Create a Chain
Using the CLI
Install the Lux CLI
npm install -g @luxfi/cliCreate the Chain Configuration
lux chain create my-chainYou will be prompted to select:
- VM type: Sovereign L1 EVM (recommended), Custom
- Chain ID: A unique EVM chain identifier
- Gas configuration: Fee structure and limits
- Airdrop: Optional initial token distribution
Deploy to Local Network
lux chain deploy my-chain --localThis starts a local multi-node network with your chain for testing.
Deploy to Testnet
lux chain deploy my-chain --testnetThis creates the chain on-chain and registers validators on the Lux testnet.
Deploy to Mainnet
lux chain deploy my-chain --mainnetSovereign L1 EVM Configuration
Sovereign L1 EVM is the most common VM for chains. It is a configurable fork of the Lux C-Chain EVM.
Genesis Configuration
{
"config": {
"chainId": 12345,
"feeConfig": {
"gasLimit": 15000000,
"targetBlockRate": 2,
"minBaseFee": 25000000000,
"targetGas": 15000000,
"baseFeeChangeDenominator": 36,
"minBlockGasCost": 0,
"maxBlockGasCost": 1000000,
"blockGasCostStep": 200000
},
"allowFeeRecipients": false
},
"alloc": {
"0xYourAddress": {
"balance": "0x52B7D2DCC80CD2E4000000"
}
},
"nonce": "0x0",
"timestamp": "0x0",
"gasLimit": "0xE4E1C0"
}Key Configuration Options
| Option | Description | Default |
|---|---|---|
chainId | Unique chain identifier | Required |
gasLimit | Maximum gas per block | 15,000,000 |
targetBlockRate | Target seconds between blocks | 2 |
minBaseFee | Minimum gas price in Wei | 25 Gwei |
allowFeeRecipients | Allow validators to collect fees | false |
Precompiles
Enable optional precompiles in your chain genesis:
{
"config": {
"contractNativeMinterConfig": {
"blockTimestamp": 0,
"adminAddresses": ["0xAdminAddress"]
},
"contractDeployerAllowListConfig": {
"blockTimestamp": 0,
"adminAddresses": ["0xAdminAddress"]
},
"txAllowListConfig": {
"blockTimestamp": 0,
"adminAddresses": ["0xAdminAddress"]
}
}
}Validator Management
Adding Validators
Validators validate networks, not chains. Chains live on a network and inherit the network's validator set. To add a validator to a network — whether the Lux primary network or your own sovereign L1's primary network — use AddValidatorTx (the universal "add validator to a network" transaction). The CLI helper:
lux network addValidator my-network \
--node-id=NodeID-... \
--stake-amount=2000 \
--start-time="2025-01-01T00:00:00Z" \
--end-time="2026-01-01T00:00:00Z"Validator Requirements
| Requirement | Value |
|---|---|
| Primary Network stake | Minimum 2,000 LUX |
| Network stake | Defined by network creator |
| Uptime | Network-specific (recommended 80%+) |
| Duration | Must overlap with Primary Network validation period |
Custom Virtual Machines
For use cases that require non-EVM execution, you can build a custom VM.
A Lux VM implements the block.ChainVM interface:
type ChainVM interface {
Initialize(ctx *consensus.Context, db database.Database, genesisBytes []byte, ...) error
BuildBlock() (Block, error)
ParseBlock([]byte) (Block, error)
GetBlock(ids.ID) (Block, error)
SetPreference(ids.ID) error
LastAccepted() (ids.ID, error)
}Custom VMs are powerful but require careful design. For most applications, Sovereign L1 EVM with custom precompiles provides sufficient flexibility without the complexity of a fully custom VM.
Chain Architecture
┌──────────────────────────────────────────────┐
│ Primary Network │
│ ┌──────────┬──────────┬──────────┐ │
│ │ P-Chain │ X-Chain │ C-Chain │ │
│ └──────────┴──────────┴──────────┘ │
│ Validators: {A, B, C, D, E} │
└──────────────────────────────────────────────┘
│ │
┌──────┴──────┐ ┌──────┴──────┐
│ Chain-1 │ │ Chain-2 │
│ EVM-based │ │ Custom VM │
│ Validators:│ │ Validators:│
│ {A, B, C} │ │ {B, D, E} │
└─────────────┘ └─────────────┘Use Cases
DeFi Chains
High-throughput chains optimized for decentralized finance with custom gas tokens and fee structures.
Gaming Networks
Low-latency chains with fast block times and permissioned validator sets for predictable performance.
Enterprise Chains
Permissioned chains with transaction allow-lists and KYC-compliant validator sets.
AI Compute
Specialized chains for decentralized AI inference and training coordination.
Further Reading
- Architecture - How chains fit into the Lux architecture
- Run a Validator - Become a network validator
- Platform API - Programmatic chain management