Add node identity key deletion after fast-path restore (fixes rpc-us-50 avalanche incident)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
# --no-slowdisk : do NOT offload static files to /slowdisk (no symlinks);
|
||||
# extract everything onto the local disk instead. Required to
|
||||
# proceed when /slowdisk is too small for the static files.
|
||||
# KEEP_NODE_KEYS=1 : keep the restored identity keys (default: delete via node-key-globs.txt)
|
||||
|
||||
# Pull the --no-slowdisk flag out of the args so the positional <config>/<dest>
|
||||
# parsing below is unaffected regardless of where the flag is placed.
|
||||
@@ -689,6 +690,17 @@ main() {
|
||||
[[ -n "$skipped_volumes" ]] && echo " Skipped (no backup by design):$skipped_volumes"
|
||||
[[ -n "$failed_volumes" ]] && echo " Failed:$failed_volumes"
|
||||
|
||||
# Regenerate the node's P2P identity on the destination (2026-09-04, rpc-us-50 avalanche
|
||||
# incident): a restored volume carries the SOURCE node's identity keys (avalanchego
|
||||
# staking/*, geth nodekey, ...). If the source still runs elsewhere, the copy is a
|
||||
# duplicate NodeID and never peers. restore-volumes.sh already does this as its last
|
||||
# step; the fast path skipped it. Patterns: node-key-globs.txt. KEEP_NODE_KEYS=1 opts out.
|
||||
if [[ -z "$failed_volumes" && "${KEEP_NODE_KEYS:-0}" != "1" ]]; then
|
||||
echo "Deleting node identity keys on $DEST_HOST (node-key-globs.txt) ..."
|
||||
$SSH_CMD "$DEST_HOST" "cd /root/rpc && ./delete-node-keys.sh '$1'" \
|
||||
|| echo "WARNING: delete-node-keys.sh failed on $DEST_HOST - the restored node may carry a duplicate identity; run ./delete-node-keys <host> $1 manually"
|
||||
fi
|
||||
|
||||
# Restore Network buffer and congestion control settings.
|
||||
# These are better for your 0.2-1.4ms environment
|
||||
|
||||
|
||||
Reference in New Issue
Block a user