Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- 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>
79 lines
3.0 KiB
Bash
Executable File
79 lines
3.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Fix Validator Transaction Pool Configuration
|
|
# Adds layered tx-pool configuration to all validators
|
|
|
|
set -euo pipefail
|
|
|
|
# Load IP configuration
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
|
|
|
|
VALIDATORS_ML110="1003 1004"
|
|
VALIDATORS_R630="1000 1001 1002"
|
|
ML110_HOST="root@${PROXMOX_HOST_ML110}"
|
|
R630_HOST="root@${PROXMOX_HOST_R630_01}"
|
|
|
|
TXPOOL_CONFIG="# Transaction Pool Configuration (Layered - Besu 23.10+)
|
|
# DO NOT use legacy options (tx-pool-max-size, tx-pool-limit-by-account-percentage)
|
|
# They crash validators with layered implementation
|
|
tx-pool-max-future-by-sender=200
|
|
tx-pool-layer-max-capacity=12500000
|
|
tx-pool-max-prioritized=2000"
|
|
|
|
echo "=== Fixing Validator Transaction Pool Configuration ==="
|
|
echo ""
|
|
|
|
# Function to add config to validator
|
|
add_txpool_config() {
|
|
local vmid=$1
|
|
local host=$2
|
|
local config_file="/etc/besu/config-validator.toml"
|
|
|
|
echo "Processing validator $vmid on $host..."
|
|
|
|
# Check if config already exists
|
|
if ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 "$host" "pct exec $vmid -- grep -q 'tx-pool-max-future-by-sender' $config_file 2>/dev/null"; then
|
|
echo " ⚠️ Validator $vmid already has tx-pool config, skipping..."
|
|
return 0
|
|
fi
|
|
|
|
# Check for legacy options (should not exist)
|
|
if ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 "$host" "pct exec $vmid -- grep -q 'tx-pool-max-size\|tx-pool-limit-by-account-percentage' $config_file 2>/dev/null"; then
|
|
echo " ⚠️ Validator $vmid has legacy tx-pool options - removing them..."
|
|
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 "$host" "pct exec $vmid -- sed -i '/tx-pool-max-size/d; /tx-pool-limit-by-account-percentage/d' $config_file"
|
|
fi
|
|
|
|
# Add layered config
|
|
echo " Adding layered tx-pool configuration..."
|
|
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 "$host" "pct exec $vmid -- bash -c 'echo \"\" >> $config_file && echo \"$TXPOOL_CONFIG\" >> $config_file'"
|
|
|
|
# Verify config was added
|
|
if ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 "$host" "pct exec $vmid -- grep -q 'tx-pool-max-future-by-sender' $config_file 2>/dev/null"; then
|
|
echo " ✅ Configuration added successfully"
|
|
else
|
|
echo " ❌ Failed to add configuration"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
# Process validators on ml110
|
|
echo "=== Processing validators on ml110 (${PROXMOX_HOST_ML110:-192.168.11.10}) ==="
|
|
for vmid in $VALIDATORS_ML110; do
|
|
add_txpool_config "$vmid" "$ML110_HOST"
|
|
done
|
|
|
|
echo ""
|
|
|
|
# Process validators on r630-01
|
|
echo "=== Processing validators on r630-01 (${PROXMOX_HOST_R630_01:-192.168.11.11}) ==="
|
|
for vmid in $VALIDATORS_R630; do
|
|
add_txpool_config "$vmid" "$R630_HOST"
|
|
done
|
|
|
|
echo ""
|
|
echo "=== Configuration Complete ==="
|
|
echo ""
|
|
echo "Next step: Restart all validators to apply configuration"
|
|
echo "Run: ./scripts/restart-all-validators.sh"
|