Files
proxmox/scripts/update-validator-config-standalone.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

77 lines
2.1 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
# Standalone script to update validator transaction pool configuration
# Can be copied to Proxmox host and executed there
set -e
VMIDS_ML110="1003 1004"
VMIDS_R630="1000 1001 1002"
TXPOOL_CONFIG="# Transaction Pool Configuration
tx-pool-max-size=8192
tx-pool-limit-by-account-percentage=0.5
tx-pool-price-bump=10"
echo "=== Updating Validator Transaction Pool Configuration ==="
echo ""
update_validator() {
local VMID=$1
local CONFIG_FILE="/etc/besu/config-validator.toml"
echo "--- Updating Validator $VMID ---"
# Check if config exists
if [ ! -f "$CONFIG_FILE" ]; then
echo " ⚠️ Config file not found at $CONFIG_FILE"
return 1
fi
# Check if settings already exist
if grep -q "tx-pool-max-size" "$CONFIG_FILE" 2>/dev/null; then
echo " ✅ Transaction pool settings already exist"
return 0
fi
# Add settings after Transaction Pool comment
if grep -q "# Transaction Pool" "$CONFIG_FILE"; then
sed -i "/# Transaction Pool/a\\$TXPOOL_CONFIG" "$CONFIG_FILE"
echo " ✅ Configuration updated"
else
# Append to end of file
echo "" >> "$CONFIG_FILE"
echo "$TXPOOL_CONFIG" >> "$CONFIG_FILE"
echo " ✅ Configuration appended"
fi
}
restart_validator() {
local VMID=$1
echo " Restarting validator service..."
systemctl restart besu-validator && \
echo " ✅ Validator service restarted" || \
echo " ⚠️ Could not restart service"
}
# For ml110 validators
if [ -n "$VMIDS_ML110" ]; then
for VMID in $VMIDS_ML110; do
pct exec $VMID -- bash -c "$(declare -f update_validator restart_validator); update_validator $VMID; restart_validator $VMID"
echo ""
done
fi
# For r630 validators (if on this host)
if [ -n "$VMIDS_R630" ]; then
for VMID in $VMIDS_R630; do
if pct list | grep -q "^$VMID"; then
pct exec $VMID -- bash -c "$(declare -f update_validator restart_validator); update_validator $VMID; restart_validator $VMID"
echo ""
fi
done
fi
echo "=== Update Complete ==="