Critical fixes applied to resolve 94.4% error rate from RPC rate limiting: **Configuration Fixes:** - .env.production: Set Chainstack WSS as primary endpoint - config/providers_runtime.yaml: Prioritized Chainstack with 100 RPS limits - config/arbitrum_production.yaml: Increased rate limits from 20 to 100 RPS **Code Fixes:** - pkg/scanner/market/scanner.go: Use shared RPC client from contractExecutor instead of creating new clients for every pool fetch (critical fix) **Results:** - Blocks processing continuously without interruption - DEX transactions being detected and analyzed - 429 errors reduced from 21,590 (94.4%) to minimal occurrences - System health restored to production readiness **Root Cause:** Scanner was creating new RPC clients for every concurrent pool fetch, bypassing rate limiting and causing excessive requests to RPC endpoint. Each goroutine's client made independent requests without coordination. **Technical Details:** - Shared client respects global rate limits - Prevents connection pool exhaustion - Reduces overhead from repeated connection setup - Ensures all RPC calls go through rate-limited provider manager Resolves: LOG_ANALYSIS_20251029.md findings Impact: Critical - enables continuous block processing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
133 lines
3.4 KiB
YAML
133 lines
3.4 KiB
YAML
global_limits:
|
|
connection_timeout: 30s
|
|
idle_timeout: 300s
|
|
max_concurrent_connections: 50
|
|
read_timeout: 60s
|
|
write_timeout: 30s
|
|
monitoring:
|
|
enabled: true
|
|
log_slow_requests: true
|
|
metrics_interval: 60s
|
|
slow_request_threshold: 5s
|
|
track_provider_performance: true
|
|
provider_pools:
|
|
execution:
|
|
failover_enabled: true
|
|
health_check_interval: 30s
|
|
max_concurrent_connections: 20
|
|
providers:
|
|
- Arbitrum Public HTTP
|
|
- Ankr HTTP
|
|
- Chainstack HTTP
|
|
strategy: reliability_first
|
|
read_only:
|
|
failover_enabled: true
|
|
health_check_interval: 30s
|
|
max_concurrent_connections: 25
|
|
providers:
|
|
- Arbitrum Public WS
|
|
- Chainstack WSS
|
|
strategy: websocket_preferred
|
|
providers:
|
|
# HTTP Providers - Load distributed across multiple endpoints
|
|
- features:
|
|
- execution
|
|
- transaction_submission
|
|
- reading
|
|
health_check:
|
|
enabled: true
|
|
interval: 60s
|
|
timeout: 30s
|
|
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
|
|
name: Chainstack HTTP
|
|
priority: 1
|
|
rate_limit:
|
|
burst: 100
|
|
max_retries: 3
|
|
requests_per_second: 100
|
|
retry_delay: 1s
|
|
timeout: 30s
|
|
type: standard
|
|
ws_endpoint: ""
|
|
- features:
|
|
- execution
|
|
- transaction_submission
|
|
- reading
|
|
health_check:
|
|
enabled: true
|
|
interval: 60s
|
|
timeout: 30s
|
|
http_endpoint: https://rpc.ankr.com/arbitrum
|
|
name: Ankr HTTP
|
|
priority: 3
|
|
rate_limit:
|
|
burst: 60
|
|
max_retries: 3
|
|
requests_per_second: 30
|
|
retry_delay: 1s
|
|
timeout: 30s
|
|
type: standard
|
|
ws_endpoint: ""
|
|
- features:
|
|
- execution
|
|
- transaction_submission
|
|
- reading
|
|
health_check:
|
|
enabled: true
|
|
interval: 60s
|
|
timeout: 30s
|
|
http_endpoint: https://arb1.arbitrum.io/rpc
|
|
name: Arbitrum Public HTTP
|
|
priority: 10
|
|
rate_limit:
|
|
burst: 20
|
|
max_retries: 3
|
|
requests_per_second: 10
|
|
retry_delay: 2s
|
|
timeout: 30s
|
|
type: standard
|
|
ws_endpoint: ""
|
|
# WebSocket Providers - Real-time data streams with HTTP fallback
|
|
- features:
|
|
- reading
|
|
- real_time
|
|
- execution
|
|
health_check:
|
|
enabled: true
|
|
interval: 30s
|
|
timeout: 60s
|
|
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
|
|
name: Chainstack WSS
|
|
priority: 1
|
|
rate_limit:
|
|
burst: 100
|
|
max_retries: 3
|
|
requests_per_second: 100
|
|
retry_delay: 1s
|
|
timeout: 60s
|
|
type: standard
|
|
ws_endpoint: wss://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
|
|
- features:
|
|
- reading
|
|
- real_time
|
|
health_check:
|
|
enabled: true
|
|
interval: 30s
|
|
timeout: 60s
|
|
http_endpoint: https://arb1.arbitrum.io/rpc
|
|
name: Arbitrum Public WS
|
|
priority: 10
|
|
rate_limit:
|
|
burst: 20
|
|
max_retries: 3
|
|
requests_per_second: 10
|
|
retry_delay: 2s
|
|
timeout: 60s
|
|
type: standard
|
|
ws_endpoint: wss://arb1.arbitrum.io/ws
|
|
rotation:
|
|
fallover_enabled: true
|
|
health_check_required: true
|
|
retry_failed_after: 5m
|
|
strategy: priority_based
|