igneum/infra/cloud-devnet/start.sh
igneum-labs 0b713429ef Cloud devnet: private-network mode (4 zone networks, 4 gateways), 12 nodes up, first latency measurement
A new Hetzner account is capped at 10 primary IPs (IPv4 and IPv6 both count), 20 shared vCPUs, 8 dedicated
vCPUs and no Arm, and a network cannot span zones. So: one private network per zone (10.20.<zone>.0/24),
the lowest-index node of each zone keeps a public IPv4 and is its gateway (NAT, MSS clamp, one DNAT port
27000+index per private node, persisted as igneum-nat.service), every other node has no public address.
nodes.tsv gains access, pub and port columns; lib resolves same-zone vs cross-zone dial addresses and jumps
ssh through the gateway for private nodes. All nodes.tsv loops read on fd 3 (a backgrounded ssh drained the
file). TYPE_BY_INDEX puts nodes 8 to 11 on ccx13; node 12 is the last shared one the account allows.
create.sh prints the plan's cost from the live API. provision.sh install takes node names and skips binaries
whose sha256 matches. Binaries copied from the seed's staged v4 build (same sources), no vCPU for a builder.

Results 2026-10-04: RTT matrix (hel1-fsn1 35 ms, ash-sin 289 ms) and a 10-minute propagation window of 644
blocks: p50 343 ms, p90 497 ms, p99 666 ms across 12 nodes in 5 locations.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-04 10:41:23 +00:00

30 lines
1.5 KiB
Bash
Executable file

#!/usr/bin/env bash
# Start the network: nodes and block logs first, miners once every RPC answers.
# ./start.sh nodes, then miners
# ./start.sh nodes nodes and block logs only
# ./start.sh miners miners only
. "$(dirname "$0")/lib/common.sh"
require_nodes
what="${1:-all}"
if [ "$what" = all ] || [ "$what" = nodes ]; then
log "starting igneumd and igneum-blocklog on $(node_count) nodes"
on_all 'systemctl restart igneumd && sleep 1 && systemctl restart igneum-blocklog && systemctl is-active igneumd'
log "waiting for the RPC on every node"
for try in $(seq 1 24); do
bad=0
while IFS=$'\t' read -r -u 3 name idx reg ip access pub port; do
nssh "$ip" "python3 /opt/igneum/bin/wrpc.py call getInfo >/dev/null 2>&1" </dev/null || bad=$((bad + 1))
done 3< "$NODES_FILE"
[ "$bad" = 0 ] && break
log "$bad nodes not answering yet (try $try), 5 s"; sleep 5
done
[ "$bad" = 0 ] || log "WARNING: $bad nodes still not answering; check: ./status.sh and journalctl -u igneumd on the node"
fi
if [ "$what" = all ] || [ "$what" = miners ]; then
log "starting the trickle miners ($MINER_THREADS thread each; the first block needs the 256 MiB cache built, about 10 to 30 s on one vCPU, approximate)"
on_all 'systemctl restart igneum-miner && systemctl is-active igneum-miner'
fi
log "started at $(date -u +%Y-%m-%dT%H:%M:%SZ). Watch with ./status.sh (every 30 s: watch -n 30 ./status.sh)"
printf '%s\tstart %s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$what" >> "$(results_dir_for)/events.log"