igneum/infra/cloud-devnet/config.sh
igneum-labs d8dc8c6ba3 infra: cloud devnet (20 nodes), rented GPU bench and seed node scripts; plans for both
infra/cloud-devnet: hcloud (doctl variant) create, builder-VM provision from a git-archive source tarball,
systemd units for igneumd --devnet-suffix with a sparse --addpeer mesh and a CPU trickle miner per node,
stdlib wRPC client, experiments (latency, partition, hop, collect, observer hookup), README with the command
sequence and the Hetzner API prices of 3 Oct 2026.
infra/gpu-bench: RunPod image recipes (CUDA 12.8, ROCm), bundle, run.sh (vectors gate, 10-min raw, sweep,
inline shortcut ratio, nvcc/NVRTC/OpenCL recompile timings, results row, intake upload), bench-log template.
infra/seed-nodes: create-seed (persistent IPv4, firewall), provision on the VM, health check, addPeer from the
Mac over grpcurl, seeds.txt; igneum-seed-1 created at 188.245.5.161 (Hetzner cx23, fsn1).
docs/plans/cloud-devnet.md and docs/plans/seed-nodes.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-03 22:01:50 +00:00

55 lines
3.8 KiB
Bash
Executable file

# Igneum cloud devnet: settings. Sourced by every script in this directory through lib/common.sh.
# Override any value in the environment, for example `N=10 PROVIDER=digitalocean ./create.sh`.
# Nothing here spends money by itself; create.sh asks before it creates anything.
PROVIDER="${PROVIDER:-hetzner}" # hetzner (hcloud CLI) or digitalocean (doctl CLI)
N="${N:-20}" # node count
PREFIX="${PREFIX:-igneum}" # server names igneum-01 .. igneum-20, the builder is igneum-builder
# Regions, round-robin over the node index. Hetzner locations: hel1 Helsinki, fsn1 Falkenstein, ash Ashburn (US east),
# hil Hillsboro (US west), sin Singapore. With 20 nodes that is 4 per location: 8 in the EU, 4 US east, 4 US west, 4 Asia.
REGIONS="${REGIONS:-hel1,fsn1,ash,hil,sin}"
DO_REGIONS="${DO_REGIONS:-lon1,fra1,nyc3,sfo3,sgp1}"
# Instance size per location. The node holds up to four 256 MiB lottery caches (M15 cap), rocksdb and the CPU
# miner's own 256 MiB cache, so 2 GB plans are too small. What this Hetzner project can create (API, 3 Oct 2026, net
# EUR per month): cx23 (2 Intel vCPU, 4 GB) 6.49 in fsn1/nbg1/hel1 only; cpx22 (2 AMD vCPU, 4 GB) 22.99 EU, 30.99 sin;
# cpx21 (3 vCPU, 4 GB) 37.49 in ash/hil only (the old cpx line is deprecated in the EU and Singapore since Dec 2025);
# cpx11 (2 GB) 20.49 in ash/hil. So: cx23 in Europe, cpx22 in Singapore, cpx21 in the US. SERVER_TYPE overrides all.
TYPE_BY_LOCATION="${TYPE_BY_LOCATION:-fsn1=cx23,nbg1=cx23,hel1=cx23,sin=cpx22,ash=cpx21,hil=cpx21}"
SERVER_TYPE="${SERVER_TYPE:-}" # empty = pick from TYPE_BY_LOCATION
DO_SIZE="${DO_SIZE:-s-2vcpu-4gb}"
BUILDER_TYPE="${BUILDER_TYPE:-cx43}" # 8 Intel vCPU, 16 GB, EUR 0.03/h approximate, for the one-off node build (deleted afterwards)
DO_BUILDER_SIZE="${DO_BUILDER_SIZE:-c-8}"
IMAGE="${IMAGE:-debian-12}"
DO_IMAGE="${DO_IMAGE:-debian-12-x64}"
# SSH. The operations key ~/.ssh/igneum_ed25519 (3 Oct 2026, uploaded to Hetzner as "igneum-ops" by the seed-node
# scripts). If SSH_KEY_FILE is missing, create.sh generates an ed25519 pair there and uploads the public half.
SSH_KEY_NAME="${SSH_KEY_NAME:-igneum-ops}"
SSH_KEY_FILE="${SSH_KEY_FILE:-$HOME/.ssh/igneum_ed25519}"
SSH_USER="${SSH_USER:-root}"
# The network. A suffixed devnet (igneum-devnet-20) has its own handshake magic and its own genesis (the bits
# override recomputes the genesis hash), so it can never peer with or pollute the live devnet on the Mac.
DEVNET_SUFFIX="${DEVNET_SUFFIX:-20}"
# 0x1e400000 = 2^18 expected hashes per block. Three 6-thread CPU miners on the M5 Max held about 1 block/s at this
# value (fork-divergence, genesis row); 20 one-thread cloud vCPUs are in the same range. The DAA takes over after that.
GENESIS_BITS="${GENESIS_BITS:-0x1e400000}"
MESH_OUT="${MESH_OUT:-2}" # outbound --addpeer links per node (ring plus a chord); inbound doubles it, about 4 peers each
MINER_THREADS="${MINER_THREADS:-1}" # the trickle: one CPU thread per node
MINER_STATUS_SECS="${MINER_STATUS_SECS:-60}"
# Source to ship. NODE_SRC is the fork worktree whose code the network runs. master (vendor/igneum-node) carries the
# finality v2 work as uncommitted changes; the dual-lane difficulty controller is on the `difficulty` worktree
# (vendor/igneum-node-diff). Point NODE_SRC at the tree you want measured.
NODE_SRC="${NODE_SRC:-$REPO/vendor/igneum-node}"
POW_SRC="${POW_SRC:-$REPO/igneum-pow}"
# head = `git archive HEAD` only; head+dirty = HEAD plus every modified and untracked file of the worktree (target*/ excluded).
# All seven worktrees sit at d62708a8 with their branch work uncommitted (3 Oct 2026), so head+dirty is the default.
SRC_MODE="${SRC_MODE:-head+dirty}"
# Ports (consensus/core/src/network.rs, devnet). RPC stays on loopback; only p2p is open to the world.
P2P_PORT=26611
RPC_PORT=26610
RPC_JSON_PORT=28610