luxd-boot.sh boots local/devnet/testnet/mainnet identically — the binary (database >= v1.20.3) restores-on-boot from the S3 snapshot stream, so this replaces the per-network startup scripts' RLP-import / peer-keysync / genesis-root surgery with: pick network -> stage plugins -> exec luxd. Same script runs locally and as the k8s StatefulSet entrypoint. - luxd-boot.sh: NETWORK->id map (local|3|2|1), REPLICATE_* defaults, plugin stage. - <net>.env: per-network config (local self-contained w/ out-of-box PQ; cluster nets take creds + PQ identity from KMS secrets via the operator). - README: local + in-cluster usage. Proven booting localnet end-to-end on luxd v1.30.6 + database v1.20.3 (P-chain up, PQ-encrypted CDC incremental shipped). Co-authored-by: Hanzo Dev <[email protected]>
1.9 KiB
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).