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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user