mirror of
https://github.com/luxfi/genesis.git
synced 2026-07-27 05:54:08 +00:00
ad880ffb8dec295931711a06144d95b59fb88ec1
Mainnet primary-network genesis funded 100 P-Chain allocations of 5e17
base units each. Those are stale 9-decimal magnitudes read under the
current 6-decimal LUX unit (units.Lux = 1e6 microLUX), so each was
mis-read as 500B LUX -> P-total 50T = 25x the 2T supply cap, mirrored
on X-Chain. The sum (5e19 base units) also overflows uint64 and wraps,
which is how live mainnet showed ~13.27T P-supply.
Replace the mainnet allocation set with the canonical uniform set that
testnet/devnet already use: 1000 BIP44 wallet keys (m/44'/9000'/0'/0/i,
coin_type 9000) x 50M LUX, re-encoded for mainnet's `lux` HRP via the
canonical address.Format path (NOT hand-rolled bech32). P-total now
50.0B LUX, 40x under the 2T cap.
Authoritative source is the split shard pchain.json (configs.GetGenesis
assembles from network.json + pchain.json + {x,c,...}chain.json shards;
the combined genesis.json is a derived human-facing snapshot). Both are
updated; the combined snapshot is regenerated from the corrected shards
so it faithfully matches what luxd builds (this also un-stales its
cChainGenesis blob, which lagged the cchain.json shard).
Correctness proof:
- generator reproduces devnet's 1000 funded allocations byte-identically
- mainnet regenerated evmAddrs == testnet's 1000 canonical funded
evmAddrs (same mnemonic -> same keys; evmAddr is HRP-independent)
- utxoAddr differs from testnet only by HRP (lux1.. vs test1..);
regenerated lux-HRP addresses validated against the live testnet file
- all 5 initialStakedFunds / initialStakers reward addresses (BIP44
keys 0-4) remain funded -> luxd staked-funds invariant holds
- initialStakers (NodeIDs + BLS PoP) preserved verbatim -> live
validator identity unchanged
Preserved byte-identical: cChainGenesis (2T treasury @
0x9011E888..4714, chainId 96369, immutable), all other chain shards,
networkID 1, startTime, initialStakers, initialStakedFunds.
X-Chain descriptor denomination 9 -> 6 (xchain.json + genesis.json).
denomination is the LUX asset decimal count and is serialized into the
asset definition (feeds AssetIDFromBytes) -> consensus-relevant. The
canonical unit is 6 decimals; the stale 9 is corrected for mainnet
ahead of its fresh re-genesis. testnet/devnet/localnet left unchanged.
Reconciliation: 2T C-Chain treasury + 100B (P+X user accounts) = 2.1T
at genesis, reduced to 2T max by the 2025-12-25 burn fork (not
implemented here; arithmetic is the intended model).
Tooling (reusable, used to produce this fix):
- cmd/genalloc: emit canonical BIP44 allocations for one network,
scoped to the allocations array only (never touches cChainGenesis)
- cmd/assemblegenesis: regenerate the combined genesis.json snapshot
from the embedded shards via the same GetGenesis path luxd uses
Staging only; mainnet re-genesis relaunch is gated separately by the
owner. testnet/devnet/localnet untouched.
Lux Network Genesis Configurations
This repository contains the canonical genesis configurations for all Lux networks.
Directory Structure
genesis/
├── mainnet/ # LUX Mainnet (Chain ID: 96369)
│ ├── cchain.json # C-Chain genesis (EVM compatible)
│ ├── pchain.json # P-Chain genesis (ProtocolVM)
│ ├── xchain.json # X-Chain genesis (Exchange chain)
│ ├── network.json # Network configuration
│ └── genesis.json # Full network genesis
├── testnet/ # LUX Testnet (Chain ID: 96368)
│ ├── cchain.json # C-Chain genesis (EVM compatible)
│ └── genesis.json # Full testnet genesis
├── devnet/ # LUX Devnet (Chain ID: 96370) - Fast iteration network
│ └── cchain.json # C-Chain genesis (EVM compatible)
├── local/ # Local development network (Chain ID: 1337)
│ ├── cchain.json # C-Chain genesis (EVM compatible)
│ └── genesis.json # Local network genesis
├── bootstrappers.json # Network bootstrapper nodes
└── checkpoints.json # Network checkpoints
Mainnet C-Chain Genesis
The mainnet C-Chain was initialized with a single genesis allocation:
| Address | Balance |
|---|---|
0x9011e888251ab053b7bd1cdb598db4f9ded94714 |
2,000,000,000,000,000,000,000,000,000,000 wei (2T LUX) |
Key Parameters
- Chain ID: 96369
- Gas Limit: 30,000,000 (0x1C9C380)
- Min Base Fee: 25 gwei
- Block Rate: 2 seconds
Network IDs
| Network | Chain ID | Network ID | Purpose |
|---|---|---|---|
| LUX Mainnet | 96369 | 96369 | Production network |
| LUX Testnet | 96368 | 96368 | Public test network |
| LUX Devnet | 96370 | 96370 | Fast iteration dev network |
| Local | 1337 | 1337 | Local development |
Network Configurations
Mainnet (96369)
- Block Rate: 2 seconds
- Gas Limit: 30M
- Min Base Fee: 25 gwei
- Genesis Account:
0x9011...with 2T LUX
Testnet (96368)
- Block Rate: 2 seconds
- Gas Limit: 12M
- Min Base Fee: 25 gwei
- Genesis Account:
0x9011...with 2T LUX (same as mainnet)
Devnet (96370)
- Block Rate: 1 second (faster)
- Gas Limit: 20M
- Min Base Fee: 1 gwei (cheaper)
- Genesis Account:
0x9011...with 2T LUX - All upgrades enabled at genesis (Shanghai, Cancun, etc.)
Local (1337)
- Block Rate: 1 second
- Gas Limit: 15M
- Min Base Fee: 1 gwei
- Genesis Account:
0x9011...with 2T LUX - All upgrades enabled at genesis
Usage
These genesis files are used by:
luxdnode for network initializationcorethfor C-Chain configuration- Block explorers for genesis block verification
- Migration tools for state reconstruction
RPC Endpoints
- Mainnet:
http://localhost:9630/ext/bc/C/rpc - Testnet:
http://localhost:9630/ext/bc/C/rpc(testnet node) - Devnet:
http://localhost:9630/ext/bc/C/rpc(devnet node)
Genesis Account
All networks use the same production genesis account:
| Account | Balance | Networks |
|---|---|---|
0x9011e888251ab053b7bd1cdb598db4f9ded94714 |
2T LUX | All networks |
State Data & RLP Exports
Blockchain state exports and RLP-encoded blocks are maintained in a separate repository:
Repository: github.com/luxfi/state
Available Data
| Network | Chain ID | Blocks | RLP Location |
|---|---|---|---|
| Lux Mainnet | 96369 | 1,082,780 | rlp/lux-mainnet/lux-mainnet-96369.rlp |
| Lux Testnet | 96368 | 219 | rlp/lux-testnet/lux-testnet-96368.rlp |
| Zoo Mainnet | 200200 | 799 | rlp/zoo-mainnet/zoo-mainnet-200200.rlp |
| Zoo Testnet | 200201 | 85 | rlp/zoo-testnet/zoo-testnet-200201.rlp |
Import Workflow
# Clone repos
git clone https://github.com/luxfi/genesis
git clone https://github.com/luxfi/state
# Initialize with genesis
geth init --datadir /path/to/db genesis/mainnet/cchain.json
# Import blocks from state repo
geth import --datadir /path/to/db state/rlp/lux-mainnet/lux-mainnet-96369.rlp
Source Data
The state repo also contains:
pebbledb/- Original SubnetEVM PebbleDB databasesdocs/- State verification and recovery documentationpkg/- Go tools for archaeology, bridge, and scanning
Description
Lux Network genesis for Mainnet, Testnet, Devnet, Local/Custom.
20 MiB
Languages
Go
96.6%
Python
3%
Makefile
0.4%