chore: update submodule references and enhance deployment script logic
- Bumped submodule references for cross-chain-pmm-lps, explorer-monorepo, gru-docs, and smom-dbis-138. - Improved logic in run-mainnet-aave-quote-push-keeper.sh to handle various conditions for quote distribution and wallet LP tranche application. - Updated check-and-fix-explorer-lag.sh to utilize a new stats URL and refined data parsing for better accuracy. Made-with: Cursor
This commit is contained in:
Submodule explorer-monorepo updated: 26b0f1bf48...0c869f7930
2
gru-docs
2
gru-docs
Submodule gru-docs updated: dc1a1c3699...a80e9bde92
@@ -273,13 +273,51 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$MODE" == "dry-run" && -n "$MANAGER" ]]; then
|
||||
if [[ -n "$MANAGER" && "$SKIP_FLASH" != "1" && "$SKIP_RECYCLE" != "1" ]]; then
|
||||
export QUOTE_PUSH_TREASURY_HARVEST=1
|
||||
export QUOTE_PUSH_TREASURY_GAS_HOLDBACK_TARGET_RAW="$KEEPER_GAS_SHORTFALL_QUOTE_RAW"
|
||||
bash "${PROXMOX_ROOT}/scripts/deployment/run-mainnet-aave-quote-push-managed-cycle.sh" --dry-run
|
||||
bash "${PROXMOX_ROOT}/scripts/deployment/run-mainnet-aave-quote-push-managed-cycle.sh" "--${MODE}"
|
||||
|
||||
if [[ "${KEEPER_RECYCLE_RECIPIENT,,}" == "${DEPLOYER,,}" ]]; then
|
||||
echo "[plan] A live managed cycle would route recycle quote back to the deployer, after which the wallet LP helper can be attempted."
|
||||
if [[ "$MODE" == "dry-run" ]]; then
|
||||
if [[ "${KEEPER_RECYCLE_RECIPIENT,,}" == "${DEPLOYER,,}" ]]; then
|
||||
echo "[plan] A live managed cycle would route recycle quote back to the deployer, after which the wallet LP helper can be attempted."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "=== Post-execution accounting ==="
|
||||
bash "${PROXMOX_ROOT}/scripts/verify/report-mainnet-aave-quote-push-surplus-accounting.sh"
|
||||
|
||||
deployer_eth="$(cast balance "$DEPLOYER" --ether --rpc-url "$ETHEREUM_MAINNET_RPC")"
|
||||
compute_keeper_plan "$MANAGER" "$deployer_eth" "$TOKEN" "$RECEIVER" "$RECEIVER_RESERVE_RAW" "$GAS_FLOOR_ETH" "$OP_BUFFER_ETH" "$NATIVE_TOKEN_PRICE"
|
||||
|
||||
if python3 - "$KEEPER_GAS_SHORTFALL_ETH" <<'PY'
|
||||
import sys
|
||||
sys.exit(0 if float(sys.argv[1]) > 0 else 1)
|
||||
PY
|
||||
then
|
||||
echo "[stop] quote was distributed, but deployer ETH is still below the recycle floor; skipping wallet LP tranche"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if (( KEEPER_RECYCLE_DISTRIBUTION_RAW == 0 )); then
|
||||
echo "[stop] no recycle allocation remains after gas holdback"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "${KEEPER_RECYCLE_RECIPIENT:-}" || "${KEEPER_RECYCLE_RECIPIENT,,}" != "${DEPLOYER,,}" ]]; then
|
||||
echo "[stop] recycle recipient is not the deployer wallet, so the wallet LP helper is intentionally skipped"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! bash "${PROXMOX_ROOT}/scripts/deployment/apply-mainnet-cwusdc-usdc-peg-tranche-from-wallet.sh" --apply; then
|
||||
status=$?
|
||||
if [[ "$status" == "3" ]]; then
|
||||
echo "[stop] recycle distribution completed, but no wallet-funded LP tranche is currently affordable"
|
||||
exit 0
|
||||
fi
|
||||
exit "$status"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -17,6 +17,7 @@ source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
|
||||
IP_RPC_2201="${RPC_2201:-192.168.11.221}"
|
||||
IP_BLOCKSCOUT="${IP_BLOCKSCOUT:-192.168.11.140}"
|
||||
BLOCKSCOUT_API_PORT="${BLOCKSCOUT_API_PORT:-4000}"
|
||||
EXPLORER_STATS_URL="${EXPLORER_STATS_URL:-https://blockscout.defi-oracle.io/api/v2/stats}"
|
||||
EXPLORER_INDEXER_LAG_THRESHOLD="${EXPLORER_INDEXER_LAG_THRESHOLD:-500}"
|
||||
EXPLORER_TX_VISIBILITY_LAG_BLOCK_THRESHOLD="${EXPLORER_TX_VISIBILITY_LAG_BLOCK_THRESHOLD:-32}"
|
||||
EXPLORER_TX_VISIBILITY_SAMPLE_BLOCKS="${EXPLORER_TX_VISIBILITY_SAMPLE_BLOCKS:-128}"
|
||||
@@ -31,16 +32,15 @@ get_rpc_block() {
|
||||
|
||||
get_explorer_block() {
|
||||
local body block
|
||||
body=$(curl -sf --max-time 10 "http://${IP_BLOCKSCOUT}:${BLOCKSCOUT_API_PORT}/api/v2/stats" 2>/dev/null || true)
|
||||
body=$(curl -sf --max-time 10 "${EXPLORER_STATS_URL}" 2>/dev/null || true)
|
||||
[ -z "$body" ] && return
|
||||
block=$(echo "$body" | sed -n 's/.*"total_blocks"\s*:\s*"\([0-9]*\)".*/\1/p' | head -1)
|
||||
[ -z "$block" ] && block=$(echo "$body" | sed -n 's/.*"total_blocks"\s*:\s*\([0-9]*\).*/\1/p' | head -1)
|
||||
block=$(echo "$body" | jq -r '.freshness.latest_indexed_block.block_number // .latest_block // .total_blocks // empty' 2>/dev/null || true)
|
||||
[ -n "$block" ] && echo "$block"
|
||||
}
|
||||
|
||||
get_explorer_latest_tx_block() {
|
||||
local body block
|
||||
body=$(curl -sf --max-time 10 "http://${IP_BLOCKSCOUT}:${BLOCKSCOUT_API_PORT}/api/v2/stats" 2>/dev/null || true)
|
||||
body=$(curl -sf --max-time 10 "${EXPLORER_STATS_URL}" 2>/dev/null || true)
|
||||
[ -z "$body" ] && return
|
||||
block=$(echo "$body" | jq -r '.freshness.latest_indexed_transaction.block_number // empty' 2>/dev/null || true)
|
||||
[ -n "$block" ] && [ "$block" != "null" ] && echo "$block"
|
||||
@@ -71,7 +71,7 @@ get_recent_chain_activity() {
|
||||
fi
|
||||
done
|
||||
|
||||
printf '%s %s %s\n' "${newest_non_empty:-}" "$non_empty_count" "$total_txs"
|
||||
printf '%s|%s|%s\n' "${newest_non_empty:-none}" "$non_empty_count" "$total_txs"
|
||||
}
|
||||
|
||||
rpc_block=$(get_rpc_block)
|
||||
@@ -92,9 +92,9 @@ else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -r newest_non_empty recent_non_empty_count recent_tx_total <<<"$(get_recent_chain_activity "$rpc_block")"
|
||||
IFS='|' read -r newest_non_empty recent_non_empty_count recent_tx_total <<<"$(get_recent_chain_activity "$rpc_block")"
|
||||
|
||||
if [ -z "$newest_non_empty" ]; then
|
||||
if [ "$newest_non_empty" = "none" ]; then
|
||||
echo "$(date -Iseconds) QUIET_CHAIN sample_blocks=${EXPLORER_TX_VISIBILITY_SAMPLE_BLOCKS} non_empty=0 txs=0"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Submodule smom-dbis-138 updated: 8ec6af94d5...2b52cc6e32
Reference in New Issue
Block a user