Documentation
¶
Overview ¶
Command bootstrap-l2 creates one or more chains on a luxd network using the canonical BIP44 m/44'/9000'/0'/0/<idx> derivation. For each chain it:
- IssueCreateNetworkTx — chain-owner network with threshold=1
- IssueCreateChainTx — vmID=<--vm-id>, genesis read from the configs dir
- IssueAddChainValidatorTx — adds every primary network validator
- Probes eth_blockNumber and info.isBootstrapped — fails if either is bad
Designed to bootstrap the four canonical Lux devnet chains (hanzo, zoo, pars, spc) in one pass, but the list is data-driven so it can bootstrap any subset.
Idempotency: before any P-chain spend, the tool queries platform.getBlockchains and skips any chain whose alias already exists. Re-running the tool is safe — already-bootstrapped chains are detected and only probed for liveness, never re-created.
Vocabulary: this tool speaks "chain" — the polymorphic primitive produced by CreateChainTx, irrespective of L1/L2/L3 level. Three IDs, three roles, never aliased:
- `networkID` — identifies a validator network. Comes in two scopes:
- primary networkID (uint32: 1=mainnet, 2=testnet, 3=local, 1337=dev)
- per-chain networkID (ids.ID 32 bytes) — the CreateNetworkTx ID that owns one or more chains.
- `chainID` — the blockchain's own globally unique ID (ids.ID 32 bytes).
- `evmChainID` — EIP-155 chain ID (uint64). EVM JSON-RPC only.
Usage:
MNEMONIC="..." bootstrap-l2 \ --uri=http://luxd-0.lux-devnet.svc.cluster.local:9650 \ --hrp=dev \ --bip44-idx=5 \ --network-label=devnet \ --configs-dir=/path/to/genesis/configs \ --track-chain-ids=hanzo,zoo,pars,spc \ --output=/dev/stdout