Expanded solutions (10 new industries) and products (Compliance & Data section) to cover full docs.lux.financial capability surface.
49 lines
1.4 KiB
Bash
49 lines
1.4 KiB
Bash
#!/bin/bash
|
|
# Join Lux Testnet as a validator
|
|
# Usage: ./join-testnet.sh [data-dir]
|
|
|
|
set -e
|
|
|
|
DATA_DIR="${1:-$HOME/.lux-validator/testnet}"
|
|
LUXD="${LUXD_PATH:-$(which luxd 2>/dev/null || echo ~/.lux/bin/luxd)}"
|
|
|
|
# Testnet Bootstrap Node (SFO3) - dev mode with snapshot
|
|
BOOTSTRAP_IP="24.199.70.106:9641"
|
|
BOOTSTRAP_ID="NodeID-Mf3JfSY91oDwfBqf7rCLmhg4NDtDghw1f"
|
|
|
|
# Network Config (servers running in dev mode with network-id=1337)
|
|
NETWORK_ID=1337
|
|
HTTP_PORT=9640
|
|
STAKING_PORT=9641
|
|
|
|
# Create directories
|
|
mkdir -p "$DATA_DIR/staking"
|
|
|
|
# Generate staking keys if not present
|
|
if [ ! -f "$DATA_DIR/staking/staker.crt" ]; then
|
|
echo "Generating staking keys..."
|
|
openssl req -x509 -newkey rsa:4096 -keyout "$DATA_DIR/staking/staker.key" \
|
|
-out "$DATA_DIR/staking/staker.crt" -days 365000 -nodes \
|
|
-subj "/CN=lux-validator"
|
|
fi
|
|
|
|
echo "Starting Lux Testnet Validator..."
|
|
echo " Bootstrap: $BOOTSTRAP_IP ($BOOTSTRAP_ID)"
|
|
echo " Data Dir: $DATA_DIR"
|
|
echo " HTTP: http://localhost:$HTTP_PORT"
|
|
echo " Staking: localhost:$STAKING_PORT"
|
|
|
|
exec "$LUXD" \
|
|
--network-id=$NETWORK_ID \
|
|
--http-host=0.0.0.0 \
|
|
--http-port=$HTTP_PORT \
|
|
--staking-port=$STAKING_PORT \
|
|
--bootstrap-ips=$BOOTSTRAP_IP \
|
|
--bootstrap-ids=$BOOTSTRAP_ID \
|
|
--staking-tls-cert-file="$DATA_DIR/staking/staker.crt" \
|
|
--staking-tls-key-file="$DATA_DIR/staking/staker.key" \
|
|
--data-dir="$DATA_DIR" \
|
|
--log-level=info \
|
|
--index-enabled \
|
|
--api-admin-enabled
|