igneum/infra/cloud-devnet/builder/build-on-builder.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

41 lines
2.1 KiB
Bash
Executable file

#!/usr/bin/env bash
# Runs ON the builder VM (Debian 12 or Ubuntu 22.04 and newer, x86_64) as root. Installs the toolchain, builds
# igneumd and igneum-miner with the real lottery hash (--features igneum-pow), leaves the binaries in /root/out/.
# Input: /root/src.tar.gz from make-source.sh. Idempotent; a second run only rebuilds what changed.
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
log() { printf '%s %s\n' "$(date -u +%H:%M:%S)" "$*"; }
if ! command -v cargo >/dev/null 2>&1 && [ ! -x "$HOME/.cargo/bin/cargo" ]; then
log "installing build dependencies"
apt-get update -qq
# rocksdb (librocksdb-sys) needs clang + libclang for bindgen and a C++ compiler; the gRPC and p2p crates run protoc.
apt-get install -y -qq build-essential clang libclang-dev llvm-dev pkg-config libssl-dev protobuf-compiler libprotobuf-dev curl git >/dev/null
log "installing rust (stable) with rustup"
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable >/dev/null
fi
# shellcheck disable=SC1091
. "$HOME/.cargo/env"
cd /root
if [ -f src.tar.gz ]; then
rm -rf src; tar -xzf src.tar.gz; log "unpacked src.tar.gz"
fi
[ -d src/vendor/igneum-node ] || { echo "no src/vendor/igneum-node"; exit 1; }
cd src/vendor/igneum-node
log "building igneumd and igneum-miner (release, --features igneum-pow); about 500 crates, 10 to 25 minutes on 8 vCPU (approximate)"
start=$(date +%s)
( while sleep 60; do printf '%s build running, %s s\n' "$(date -u +%H:%M:%S)" "$(( $(date +%s) - start ))"; done ) & ticker=$!
trap 'kill $ticker 2>/dev/null || true' EXIT
cargo build --release -p kaspad -p igneum-miner --features igneum-pow 2>&1 | tail -n 30
kill $ticker 2>/dev/null || true
log "build finished in $(( $(date +%s) - start )) s"
mkdir -p /root/out
cp target/release/igneumd target/release/igneum-miner /root/out/
strip /root/out/igneumd /root/out/igneum-miner 2>/dev/null || true
/root/out/igneumd --version | head -1 | tee /root/out/version.txt
git -C /root/src/vendor/igneum-node rev-parse --short HEAD >> /root/out/version.txt 2>/dev/null || true
ls -la /root/out