Every network now boots as a real staking validator using keys under <data>/staking (operator-mounted secret; luxd generates locally if absent). Drops the --automine shortcut entirely — the production and local paths are identical. localnet primary-network id is 1337 (C-Chain 31337), not the string "local". - LUXD_NETWORK_ID override so zoo/hanzo universes reuse this script verbatim (same network names, only the id/genesis/S3 path differ). - Optional --staking-tls-cert/key/signer wiring for mounted secrets. - LUXD_DEV=true is the local single-node escape hatch (sybil-off + skip-bootstrap) — never the default. Proven locally on luxd/1.30.6 + database v1.20.3: boots id=1337 with auto-generated ECDSA+ML-KEM+ML-DSA staking keys, restore-on-boot hydrates the physical snapshot, ships PQ-encrypted CDC incrementals. Co-authored-by: Hanzo Dev <[email protected]>
Coherent luxd boot — local, devnet, testnet, mainnet
One entrypoint (luxd-boot.sh) boots every network the same way. The luxd binary
(luxfi/database >= v1.20.3) restores-on-boot itself — a fresh node pulls the
latest physical snapshot + CDC incrementals from S3 and launches on current state.
No RLP import, no peer keysync, no genesis-root surgery: the old per-network
startup scripts are replaced by this one.
Network → id
| network | id | genesis | extra |
|---|---|---|---|
| local | local | embedded / auto-discovered | --automine (single-node) |
| devnet | 3 | embedded (or mounted ConfigMap) | — |
| testnet | 2 | embedded (or mounted ConfigMap) | — |
| mainnet | 1 | embedded (or mounted ConfigMap) | — |
Local
# local hanzo-s3 (MinIO) on :9000, then:
set -a; . local.env; set +a
./luxd-boot.sh
PQ is out of the box (REPLICATE_AGE_KEY_FILE → ML-KEM-768 key generated + persisted).
In-cluster (k8s)
The LuxNetwork operator injects REPLICATE_* (incl. CDC/physical/restore-on-boot +
the source-ordinal election) from spec.replication (see
lux-<net>/snapshot-native/), with creds + the PQ identity from KMS secrets.
Use this script as the StatefulSet entrypoint:
command: ["/scripts/luxd-boot.sh"]
env:
- { name: LUX_NETWORK, value: testnet }
- { name: LUXD_BIN, value: /luxd/build/luxd }
# luxd-boot.sh mounted from a ConfigMap at /scripts/luxd-boot.sh
Restore-on-boot makes a recreated pod hydrate from the snapshot stream — no manual
seed step. sourceNodeIndex (REPLICATE_SOURCE_ORDINAL) keeps one writer; peers
restore-only.
Knobs (env)
LUX_NETWORK · LUXD_BIN · LUXD_DATA_DIR · LUXD_HTTP_PORT · LUXD_STAKING_PORT
· LUXD_GENESIS_FILE (override embedded genesis) · LUXD_EXTRA_ARGS · all REPLICATE_*.
Proven: boots localnet end-to-end (P-chain up, PQ-encrypted CDC incremental shipped) on the production luxd binary (v1.30.6 + database v1.20.3).