infra/devnet: the restart scripts take the fork tip's commit and the seed's cross-built binary by variable (0.3.9: a24ab01a; the seed's glibc 2.36 refuses the PC 1 build)
This commit is contained in:
parent
b5346cc8fd
commit
32152a9a75
2 changed files with 13 additions and 9 deletions
|
|
@ -9,9 +9,11 @@
|
|||
set -euo pipefail
|
||||
OVJSON="${1:?override JSON object}"
|
||||
BIN="${IGNEUMD:-/Users/joshm/Projects/igneum/vendor/igneum-node/target-036/release/igneumd}"
|
||||
# the fork commit the binary must carry (0.3.9: a24ab01a, release-0.3.6 with txgen-export; 2b6d23ef read the switch too)
|
||||
COMMIT="${IGNEUMD_COMMIT:-a24ab01a}"
|
||||
OV=/tmp/igneum-devnet/override-v3.json
|
||||
echo "$OVJSON" | python3 -c 'import json,sys; o=json.load(sys.stdin); assert isinstance(o, dict) and "fees_v1_activation_daa" in o, "the object must carry fees_v1_activation_daa"; print("override:", json.dumps(o, sort_keys=True))'
|
||||
strings "$BIN" | grep -q 2b6d23ef || { echo "$BIN is not the 2b6d23ef node (a 0.3.5 node refuses an override file with fees_v1_activation_daa)"; exit 1; }
|
||||
strings "$BIN" | grep -q "$COMMIT" || { echo "$BIN is not the $COMMIT node (a 0.3.5 node refuses an override file with fees_v1_activation_daa)"; exit 1; }
|
||||
cp -p "$OV" "$OV.prev-$(date -u +%Y%m%dT%H%M%SZ)" 2>/dev/null || true
|
||||
printf '%s\n' "$OVJSON" > "$OV"
|
||||
stop() { local p; p=$(pgrep -f "$1" | head -1 || true); if [ -n "$p" ]; then kill -INT "$p"; while kill -0 "$p" 2>/dev/null; do sleep 1; done; fi; }
|
||||
|
|
|
|||
|
|
@ -2,21 +2,23 @@
|
|||
# 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 (sha256 c24fd2c5e8c4f976e2b3abc55873bca29ae6b97b47046c946f779d3a04947025, 48,733,480 bytes); IGNEUMD_LINUX
|
||||
# names it. Ends by printing the unit state and the fee and digest lines.
|
||||
# 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}"
|
||||
SRC="${IGNEUMD_LINUX:-/Users/joshm/Projects/igneum-wt-ship036/infra/cross/out/igneumd}"
|
||||
WANT=c24fd2c5e8c4f976e2b3abc55873bca29ae6b97b47046c946f779d3a04947025
|
||||
# 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.036
|
||||
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.036 | cut -c1-64)\" = $WANT
|
||||
cp -p /opt/igneum/v4/bin/igneumd /opt/igneum/v4/bin/igneumd.prev-035
|
||||
cp /root/v4/out/igneumd.036 /opt/igneum/v4/bin/igneumd.new && chmod +x /opt/igneum/v4/bin/igneumd.new
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue