restart-seed.sh: IGNEUMD_EXEC_SNAPSHOT_FILE (copied to the seed, the flag in EXTRA_ARGS) and IGNEUM_EXEC_RESET (the persisted exec files deleted while stopped): the recovery after a genesis replay
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
82307aab1c
commit
b283527655
1 changed files with 9 additions and 0 deletions
|
|
@ -14,6 +14,13 @@ WANT="${IGNEUMD_LINUX_SHA256:-7e26e374586ad8ba539e371c6cbbd74f0f77aee1e2e97cd25f
|
||||||
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))'
|
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; }
|
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"
|
SSH="ssh -i $HOME/.ssh/igneum_ed25519 -o ConnectTimeout=20 root@188.245.5.161"
|
||||||
|
# 6 October 2026 (the exec recovery after the 15:44Z reorg): IGNEUMD_EXEC_SNAPSHOT_FILE=<local file> copies that exec snapshot to the
|
||||||
|
# seed (/root/v4/exec-snapshot.bin) and adds --igneum-exec-snapshot=<path>,0x<sha256> to EXTRA_ARGS in seed-v4.env (replacing an
|
||||||
|
# earlier one); IGNEUM_EXEC_RESET=1 deletes the seed's persisted exec files (the tip-0 file a genesis replay writes, and the .prev)
|
||||||
|
# while the unit is stopped. Both off by default.
|
||||||
|
SNAPF="${IGNEUMD_EXEC_SNAPSHOT_FILE:-}"; SNAPSHA=""
|
||||||
|
if [ -n "$SNAPF" ]; then SNAPSHA="$(shasum -a 256 "$SNAPF" | cut -c1-64)"; scp -i "$HOME/.ssh/igneum_ed25519" "$SNAPF" root@188.245.5.161:/root/v4/exec-snapshot.bin; fi
|
||||||
|
RESET="${IGNEUM_EXEC_RESET:-0}"
|
||||||
scp -i "$HOME/.ssh/igneum_ed25519" "$SRC" root@188.245.5.161:/root/v4/out/igneumd.039
|
scp -i "$HOME/.ssh/igneum_ed25519" "$SRC" root@188.245.5.161:/root/v4/out/igneumd.039
|
||||||
$SSH "set -e
|
$SSH "set -e
|
||||||
test \"\$(sha256sum /root/v4/out/igneumd.039 | cut -c1-64)\" = $WANT
|
test \"\$(sha256sum /root/v4/out/igneumd.039 | cut -c1-64)\" = $WANT
|
||||||
|
|
@ -23,6 +30,8 @@ $SSH "set -e
|
||||||
printf '%s\n' '$OVJSON' > /etc/igneum/override-v3.json
|
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
|
grep -q '^EXTRA_ARGS=--override-params-file=/etc/igneum/override-v3.json' /etc/igneum/seed-v4.env
|
||||||
systemctl stop igneumd-v4
|
systemctl stop igneumd-v4
|
||||||
|
if [ '$RESET' = 1 ]; then rm -f /var/lib/igneum-v4/igneum-devnet/datadir/evm/exec-snapshot.bin /var/lib/igneum-v4/igneum-devnet/datadir/evm/exec-snapshot.prev.bin; echo 'exec files reset on the seed'; fi
|
||||||
|
if [ -n '$SNAPSHA' ]; then test \"\$(sha256sum /root/v4/exec-snapshot.bin | cut -c1-64)\" = $SNAPSHA; sed -i -E 's/ --igneum-exec-snapshot=[^ ]+//' /etc/igneum/seed-v4.env; sed -i -E 's#^EXTRA_ARGS=(.*)\$#EXTRA_ARGS=\1 --igneum-exec-snapshot=/root/v4/exec-snapshot.bin,0x$SNAPSHA#' /etc/igneum/seed-v4.env; grep -E '^EXTRA_ARGS=' /etc/igneum/seed-v4.env | cut -c1-160; fi
|
||||||
mv -f /opt/igneum/v4/bin/igneumd.new /opt/igneum/v4/bin/igneumd
|
mv -f /opt/igneum/v4/bin/igneumd.new /opt/igneum/v4/bin/igneumd
|
||||||
systemctl start igneumd-v4
|
systemctl start igneumd-v4
|
||||||
sleep 10; systemctl is-active igneumd-v4; systemctl show -p ActiveEnterTimestamp,MainPID igneumd-v4
|
sleep 10; systemctl is-active igneumd-v4; systemctl show -p ActiveEnterTimestamp,MainPID igneumd-v4
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue