29 lines
2.5 KiB
Bash
Executable file
29 lines
2.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Moves the seed (188.245.5.161, systemd unit igneumd-v4) to the 2b6d23ef Linux node and restarts it with the
|
|
# override file given as ONE JSON argument, the same object as restart-hand-nodes.sh and the manifest's
|
|
# consensus.override. The binary is the Linux cross-build of fork 2b6d23ef recorded in docs/plans/release-0.3.6.md
|
|
# 8e; superseded in 0.3.9, see below. Ends by printing the unit state and the fee and digest lines.
|
|
# infra/devnet/restart-seed.sh '{"difficulty_v2_activation_daa":33000,"proving_v0_activation_daa":84100,"fees_v1_activation_daa":210000}'
|
|
set -euo pipefail
|
|
OVJSON="${1:?override JSON object}"
|
|
# 0.3.9 (5 October 2026): the seed is Debian 12 (glibc 2.36) and refuses the PC 1 build (glibc 2.38/2.39: "GLIBC_2.38 not
|
|
# found"), so the binary is the Mac zig cross-build of the fork tip (infra/cross/build-linux.sh, glibc 2.36 target);
|
|
# IGNEUMD_LINUX names it and IGNEUMD_LINUX_SHA256 its sha256 (the defaults are the 0.3.9 build of a24ab01a).
|
|
SRC="${IGNEUMD_LINUX:-/Users/joshm/Projects/igneum/infra/cross/out-039/igneumd}"
|
|
WANT="${IGNEUMD_LINUX_SHA256:-7e26e374586ad8ba539e371c6cbbd74f0f77aee1e2e97cd25f0182fcbda458a5}"
|
|
echo "$OVJSON" | python3 -c 'import json,sys; o=json.load(sys.stdin); assert isinstance(o, dict) and "fees_v1_activation_daa" in o; print("override:", json.dumps(o, sort_keys=True))'
|
|
test "$(shasum -a 256 "$SRC" | cut -c1-64)" = "$WANT" || { echo "$SRC is not the 2b6d23ef Linux node ($WANT)"; exit 1; }
|
|
SSH="ssh -i $HOME/.ssh/igneum_ed25519 -o ConnectTimeout=20 root@188.245.5.161"
|
|
scp -i "$HOME/.ssh/igneum_ed25519" "$SRC" root@188.245.5.161:/root/v4/out/igneumd.039
|
|
$SSH "set -e
|
|
test \"\$(sha256sum /root/v4/out/igneumd.039 | cut -c1-64)\" = $WANT
|
|
cp -p /opt/igneum/v4/bin/igneumd /opt/igneum/v4/bin/igneumd.prev-2b6d23ef
|
|
cp /root/v4/out/igneumd.039 /opt/igneum/v4/bin/igneumd.new && chmod +x /opt/igneum/v4/bin/igneumd.new
|
|
cp -p /etc/igneum/override-v3.json /etc/igneum/override-v3.json.prev-\$(date -u +%Y%m%dT%H%M%SZ) || true
|
|
printf '%s\n' '$OVJSON' > /etc/igneum/override-v3.json
|
|
grep -q '^EXTRA_ARGS=--override-params-file=/etc/igneum/override-v3.json' /etc/igneum/seed-v4.env
|
|
systemctl stop igneumd-v4
|
|
mv -f /opt/igneum/v4/bin/igneumd.new /opt/igneum/v4/bin/igneumd
|
|
systemctl start igneumd-v4
|
|
sleep 10; systemctl is-active igneumd-v4; systemctl show -p ActiveEnterTimestamp,MainPID igneumd-v4
|
|
journalctl -u igneumd-v4 --no-pager -n 80 -o cat | grep -E 'igneumd/2.1.0-|Calibrated v1 fees from the override file|Fees on igneum-devnet|Consensus params digest' | tail -4"
|