Genesis Canonical Shape
What lives in the genesis config tree, what does not, and the field-naming and precompile-activation invariants every allocation entry obeys
Abstract
This LP fixes the shape of ~/work/lux/genesis/configs/. The Lux primary
network has three coordination chains (P, X, C), each with its own genesis
blob keyed by environment (mainnet / testnet / devnet). Each sovereign L1
(Hanzo, Zoo, Pars, Spc) has a single genesis.json per environment carrying
its EVM chain genesis. The lock fixes field names (evmAddr + utxoAddr),
the precompile activation set (the canonical 18-precompile manifest), and the
directory layout. A genesis file outside this shape fails the genesis
verification suite.
Motivation
Genesis directories accrete: ad-hoc fields, mixed conventions for address representation, precompile configs that no longer map to a live precompile binary. This LP freezes:
- The directory layout (which env, which chain, which file)
- The field names (
evmAddr+utxoAddr, nevereth_address/paddr/x_address) - The precompile activation set (the canonical 18-precompile manifest)
- The chain-ID space per environment (canonical assignments table)
A genesis file that drifts from this shape fails the verification suite at
~/work/lux/genesis/configs/getgenesis_test.go.
Specification
Directory layout
~/work/lux/genesis/configs/
mainnet/
pchain.json P-Chain genesis (Lux primary, networkID=1)
xchain.json X-Chain genesis (UTXO, network-wide settlement)
cchain.json C-Chain genesis (Lux primary EVM ONLY)
bootstrappers.json primary network bootstrappers
testnet/
pchain.json (networkID=2)
xchain.json
cchain.json
bootstrappers.json
devnet/
pchain.json (networkID=3)
xchain.json
cchain.json
bootstrappers.json
hanzo-mainnet/genesis.json Hanzo L1 EVM chain genesis (chainID=36963)
hanzo-testnet/genesis.json Hanzo testnet
hanzo-devnet/genesis.json Hanzo devnet
zoo-mainnet/genesis.json Zoo L1 EVM chain genesis (chainID=200200)
zoo-testnet/genesis.json
zoo-devnet/genesis.json
pars-mainnet/genesis.json Pars L1 EVM chain genesis (chainID=494949)
pars-testnet/genesis.json
pars-devnet/genesis.json
spc-mainnet/genesis.json Spc L1 EVM chain genesis (chainID=36911)
spc-testnet/genesis.json
spc-devnet/genesis.json
NO non-Lux L1 has a pchain.json. The P-Chain is Lux primary's validator
registry; sovereign L1s do not need their own. The sovereign L1's validator
set is bound at spawn time via the atomic primitive
(LP-1020) and lives on Lux
primary's P-Chain registration record.
Lux primary P-Chain genesis
~/work/lux/genesis/configs/<env>/pchain.json carries the Lux primary
network's validator set and allocations. Required top-level fields:
{
"networkID": 1,
"allocations": [
{
"utxoAddr": "P-lux1...",
"evmAddr": "0x9011e888...",
"initialAmount": ...,
"unlockSchedule": [ ... ]
},
...
],
"initialStakers": [ ... ],
...
}
The canonical address-field invariant: every allocation entry carries both
utxoAddr (bech32 P-Chain address) and evmAddr (20-byte EVM address, hex).
The ethAddr alias is retained for on-disk decode compatibility; new tooling
reads evmAddr exclusively and never emits ethAddr.
networkID values:
| Environment | networkID |
|---|---|
| mainnet | 1 |
| testnet | 2 |
| devnet | 3 |
Setting networkID to an EVM chain ID value is a violation — EVM chain IDs
and primary network IDs are different spaces (LP-0016).
Lux primary X-Chain genesis
~/work/lux/genesis/configs/<env>/xchain.json carries the X-Chain UTXO
genesis. X-Chain is reserved for network-wide settlement of primary-network
assets. Sovereign L1s do NOT have their own X-Chain.
Lux primary C-Chain genesis
~/work/lux/genesis/configs/<env>/cchain.json carries the C-Chain EVM
genesis. C-Chain runs Lux primary's EVM, with an EVM chain ID distinct from
any sovereign L1 EVM chain ID. The LUX_DISABLE_CCHAIN=1 env knob lives in
~/work/lux/node/config/configs.go; downstream L1 builds set it to harden
against accidental C-Chain spawning on a non-Lux primary.
Sovereign L1 genesis
~/work/lux/genesis/configs/<tenant>-<env>/genesis.json is the ONLY genesis
file each sovereign L1 carries. Its shape is the standard EVM genesis with
Lux-specific extensions:
{
"alloc": {
"0xPRECOMPILE_OR_USER_ADDR": {
"balance": "0x...",
"code": "0x...",
"nonce": "0x..."
},
...
},
"baseFeePerGas": "0x...",
"coinbase": "0x0000000000000000000000000000000000000000",
"config": {
"chainId": <int>, // L1's EVM chain ID, distinct per tenant
"feeConfig": { ... },
"warpConfig": { ... },
"precompileUpgrades": [ ... ] // canonical 18-precompile activation
},
...
}
The alloc map funds genesis accounts to the wei. Per-L1 native funding
lives here; cross-L1 funding (e.g. a tenant treasury seeded from Lux primary)
is a post-spawn bridge tx, not a genesis field.
Canonical chain-ID assignments
| Tenant L1 | EVM chain ID |
|---|---|
| Hanzo | 36963 (mainnet), 36964 (testnet), 36912 (devnet) |
| Zoo | 200200 (mainnet), 200201 (testnet), 200202 (devnet) |
| Pars | 494949 (mainnet), 494950 (testnet), 494951 (devnet) |
| Spc | 36911 (mainnet), and parallel test/dev values |
Cross-grep against
~/work/lux/genesis/configs/<tenant>-<env>/genesis.json:"chainId": verifies
these.
Canonical 18-precompile activation
The lock fixes the precompile manifest a fresh sovereign L1's
precompileUpgrades array must enable. The set is keyed by config name:
aiMiningConfiganchorConfigattestationConfigbabyjubjubConfigblake3Configbls12381G1AddConfig,bls12381G1MulConfig,bls12381G1MSMConfig,bls12381G2AddConfig,bls12381G2MulConfig,bls12381G2MSMConfig,bls12381PairingConfig(counted as one BLS12-381 EIP-2537 precompile-set entry, exposed as 7 sub-configs)bridgeRegistrarConfigcoronaThreshold(Corona PQ precompile)curve25519ConfigdexConfig(only on DEX-bearing L1s)fheConfig(only on FHE-bearing L1s)frostVerifyhpkeConfigmlkemConfig(FIPS 203 ML-KEM)pedersenConfigposeidonConfigvrfConfigzkConfig
Not in the manifest:
eciesConfig— ECIES is superseded byhpkeConfig+mlkemConfigfor PQ-hybrid encapsulation. A fresh L1 SHOULD NOT enableeciesConfig. Existing tenant genesis files carryingeciesConfigare cleanup targets; the precompile binary remains for read-back compatibility but new genesis emission drops it.
DEX-VM-only and FHE-VM-only precompile entries are conditional: a non-DEX L1
SHOULD NOT enable dexConfig; a non-FHE L1 SHOULD NOT enable fheConfig.
Field-naming invariant
evmAddr (lowercase EVM-address hex) and utxoAddr (bech32 P-Chain address)
are the canonical field names across every Lux primary allocation entry. The
test gate at ~/work/lux/genesis/configs/getgenesis_test.go asserts
utxoAddr presence on every allocation; evmAddr presence is asserted in the
same suite.
Downstream tenant case
White-label tenants live outside ~/work/lux/genesis/ in their own trees and
may opt out of C-Chain (LP-0016) with their
own EVM chain ID space. The LUX_DISABLE_CCHAIN=1 env knob in
~/work/lux/node/config/configs.go is the load-bearing guard that keeps
C-Chain off for any node that does not need it.
bootstrap-chain CLI surface
The bootstrap-chain CLI at
~/work/lux/genesis/cmd/bootstrap-chain/main.go consumes these configs to
spin up a fresh chain. Key code paths:
from := evmAddrFromPriv(priv)— the genesis-fund derivation point uses the canonicalevmAddrFromPrivhelper, NOT a bespoke EVM-address derivation.evmAddrFromPrivdefinition:keccak256(pubKey)[-20:].
The genesis CLI at ~/work/lux/genesis/cmd/genesis/main.go emits, edits,
and verifies genesis blobs. Its address-emission path
(addrHex := fmt.Sprintf("0x%s", a.EVMAddr.Hex())) uses the canonical field
name.
The checkkeys CLI at ~/work/lux/genesis/cmd/checkkeys/main.go
cross-checks derived EVM addresses against the genesis allocation map, using
the canonical EVMAddr field name throughout.
Rationale
Why one genesis.json per sovereign L1
A tenant L1 carries one or more chains, but the spawn primitive
(LP-1020) registers all
chains in one block-atomic step. The genesis.json is the EVM chain's
genesis; per-L1 non-EVM chains (DEX, FHE) embed their genesis as
GenesisData inside CreateChainTx, not as a separate config file.
This keeps the on-disk surface minimal: one genesis file per L1 EVM chain, full stop. Non-EVM chain genesis blobs are inputs to the spawn CLI, not standing config artifacts.
Why no per-tenant pchain.json
P-Chain is Lux primary's validator-set registry. A sovereign L1's validator
set is encoded in the spawn tx, not in a separate genesis file. A per-tenant
pchain.json is a workaround for spawning a network as a sequence of txs;
atomic spawn removes the need.
Why evmAddr + utxoAddr over address / eth_addr
Both representations are present in every allocation because Lux primary's
UTXO + EVM bridge needs both views. Naming them evmAddr + utxoAddr makes
the intent explicit and decomplects them from chain-specific aliases
(paddr, xaddr, cAddress) that drift across tooling.
Why drop eciesConfig
ECIES (secp256k1 + AES-GCM with KDF over the shared secret) is not
PQ-secure. Fresh encryption usage takes hpkeConfig (RFC 9180 HPKE,
ML-KEM-768 PQ-hybrid). The ECIES precompile binary remains for historical
bytecode that calls it; new genesis emission omits it.
Test Cases
~/work/lux/genesis/configs/getgenesis_test.goassertsutxoAddrpresence on every allocation in every Lux primarypchain.json, and again on a parallel path through the resolver.~/work/lux/genesis/configs/embed_test.goexercises the go-embed surface against every shipped genesis blob; a new file in the directory must register here.~/work/lux/genesis/configs/chain_shards_test.gocross-checks per-chain genesis shard consistency.
A canonical-shape compliance test at
~/work/lux/genesis/configs/canonical_shape_test.go MUST assert:
- Every
<env>/pchain.jsonparses withnetworkID ∈ {1, 2, 3}. - Every
<tenant>-<env>/genesis.jsonparses withchainId ∈the canonical assignment table. - No fresh
genesis.jsonenableseciesConfig.
Reference Implementation
~/work/lux/genesis/configs/mainnet/pchain.json— canonical Lux primary mainnet P-Chain genesis.networkID = 1.~/work/lux/genesis/configs/testnet/pchain.json—networkID = 2.~/work/lux/genesis/configs/devnet/pchain.json—networkID = 3.~/work/lux/genesis/configs/hanzo-mainnet/genesis.json—"chainId": 36963(Hanzo L1 EVM mainnet).~/work/lux/genesis/configs/zoo-mainnet/genesis.json—"chainId": 200200(Zoo L1 EVM mainnet).~/work/lux/genesis/configs/pars-mainnet/genesis.json—"chainId": 494949(Pars L1 EVM mainnet; live-verifiedeth_chainId=0x78d65).~/work/lux/genesis/configs/spc-mainnet/genesis.json—"chainId": 36911(Spc L1 EVM mainnet).~/work/lux/genesis/configs/getgenesis_test.go— theutxoAddrinvariant.~/work/lux/genesis/cmd/checkkeys/main.go— canonicalEVMAddrfield name in derivation tooling.~/work/lux/genesis/cmd/bootstrap-chain/main.go—evmAddrFromPrivderivation.~/work/lux/genesis/cmd/genesis/main.go— genesis emission usesa.EVMAddr.Hex().
Security Considerations
The canonical 18-precompile activation pin closes a footgun: a genesis blob
that silently enabled an unaudited precompile gave that precompile
EVM-execution semantics from block 0. A pinned manifest means a reviewer
checking the genesis sees exactly which precompiles are active and can
cross-check each against its binary at ~/work/lux/node/precompile/ and its
entry in the address map (LP-1210).
The LUX_DISABLE_CCHAIN=1 env knob is the load-bearing guard against a
downstream tenant accidentally inheriting C-Chain because the daemon is the
upstream luxd. The env knob is checked in
~/work/lux/node/config/configs.go and the resulting build refuses to spawn
C-Chain.
The evmAddr + utxoAddr field-naming invariant prevents a class of
address-confusion bug where tooling reads the wrong address representation
and credits funds to the wrong account-model account. Both representations
refer to the same allocation; the naming pins which is which.
Copyright
Copyright and related rights waived via CC0.