Restructured project for V2 refactor: **Structure Changes:** - Moved all V1 code to orig/ folder (preserved with git mv) - Created docs/planning/ directory - Added orig/README_V1.md explaining V1 preservation **Planning Documents:** - 00_V2_MASTER_PLAN.md: Complete architecture overview - Executive summary of critical V1 issues - High-level component architecture diagrams - 5-phase implementation roadmap - Success metrics and risk mitigation - 07_TASK_BREAKDOWN.md: Atomic task breakdown - 99+ hours of detailed tasks - Every task < 2 hours (atomic) - Clear dependencies and success criteria - Organized by implementation phase **V2 Key Improvements:** - Per-exchange parsers (factory pattern) - Multi-layer strict validation - Multi-index pool cache - Background validation pipeline - Comprehensive observability **Critical Issues Addressed:** - Zero address tokens (strict validation + cache enrichment) - Parsing accuracy (protocol-specific parsers) - No audit trail (background validation channel) - Inefficient lookups (multi-index cache) - Stats disconnection (event-driven metrics) Next Steps: 1. Review planning documents 2. Begin Phase 1: Foundation (P1-001 through P1-010) 3. Implement parsers in Phase 2 4. Build cache system in Phase 3 5. Add validation pipeline in Phase 4 6. Migrate and test in Phase 5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
216 lines
5.4 KiB
YAML
216 lines
5.4 KiB
YAML
# Enhanced Multi-Provider RPC Configuration for Arbitrum
|
|
# Uses multiple free/public endpoints with intelligent rotation and failover
|
|
# Last Updated: 2025-10-31 - Added 6 diverse RPC providers
|
|
|
|
global_limits:
|
|
connection_timeout: 45s
|
|
idle_timeout: 600s
|
|
max_concurrent_connections: 30
|
|
read_timeout: 90s
|
|
write_timeout: 45s
|
|
|
|
monitoring:
|
|
enabled: true
|
|
log_slow_requests: true
|
|
metrics_interval: 30s
|
|
slow_request_threshold: 3s
|
|
track_provider_performance: true
|
|
|
|
provider_pools:
|
|
# Execution pool - for sending transactions
|
|
execution:
|
|
failover_enabled: true
|
|
health_check_interval: 20s
|
|
max_concurrent_connections: 15
|
|
providers:
|
|
- Arbitrum Public HTTP
|
|
- Chainlist RPC 1
|
|
- Chainlist RPC 2
|
|
- Alchemy Free Tier
|
|
strategy: round_robin # Distribute load evenly
|
|
|
|
# Read-only pool - for queries and DataFetcher
|
|
read_only:
|
|
failover_enabled: true
|
|
health_check_interval: 20s
|
|
max_concurrent_connections: 20
|
|
providers:
|
|
- Arbitrum Public WS
|
|
- Chainlist RPC 1
|
|
- Chainlist RPC 2
|
|
- Chainlist RPC 3
|
|
- LlamaNodes RPC
|
|
- Alchemy Free Tier
|
|
strategy: round_robin # Rotate through all providers
|
|
|
|
providers:
|
|
# Provider 1: Official Arbitrum Public HTTP
|
|
- name: Arbitrum Public HTTP
|
|
type: standard
|
|
http_endpoint: https://arb1.arbitrum.io/rpc
|
|
ws_endpoint: ""
|
|
priority: 10
|
|
features:
|
|
- execution
|
|
- transaction_submission
|
|
- reading
|
|
rate_limit:
|
|
requests_per_second: 10 # Increased from 5
|
|
burst: 25
|
|
timeout: 45s
|
|
max_retries: 5
|
|
retry_delay: 1s
|
|
health_check:
|
|
enabled: true
|
|
interval: 30s
|
|
timeout: 30s
|
|
|
|
# Provider 2: Official Arbitrum Public WebSocket
|
|
- name: Arbitrum Public WS
|
|
type: standard
|
|
http_endpoint: https://arb1.arbitrum.io/rpc
|
|
ws_endpoint: wss://arb1.arbitrum.io/ws
|
|
priority: 10
|
|
features:
|
|
- reading
|
|
- real_time
|
|
- subscriptions
|
|
rate_limit:
|
|
requests_per_second: 15 # WSS can handle more
|
|
burst: 40
|
|
timeout: 60s
|
|
max_retries: 5
|
|
retry_delay: 1s
|
|
health_check:
|
|
enabled: true
|
|
interval: 20s
|
|
timeout: 45s
|
|
|
|
# Provider 3: Chainlist RPC 1
|
|
- name: Chainlist RPC 1
|
|
type: standard
|
|
http_endpoint: https://arbitrum-one.publicnode.com
|
|
ws_endpoint: wss://arbitrum-one.publicnode.com
|
|
priority: 9
|
|
features:
|
|
- execution
|
|
- transaction_submission
|
|
- reading
|
|
- real_time
|
|
rate_limit:
|
|
requests_per_second: 12
|
|
burst: 30
|
|
timeout: 45s
|
|
max_retries: 5
|
|
retry_delay: 1s
|
|
health_check:
|
|
enabled: true
|
|
interval: 25s
|
|
timeout: 30s
|
|
|
|
# Provider 4: Chainlist RPC 2
|
|
- name: Chainlist RPC 2
|
|
type: standard
|
|
http_endpoint: https://rpc.ankr.com/arbitrum
|
|
ws_endpoint: wss://rpc.ankr.com/arbitrum/ws
|
|
priority: 8
|
|
features:
|
|
- execution
|
|
- reading
|
|
- real_time
|
|
rate_limit:
|
|
requests_per_second: 12
|
|
burst: 30
|
|
timeout: 45s
|
|
max_retries: 5
|
|
retry_delay: 1s
|
|
health_check:
|
|
enabled: true
|
|
interval: 25s
|
|
timeout: 30s
|
|
|
|
# Provider 5: Chainlist RPC 3
|
|
- name: Chainlist RPC 3
|
|
type: standard
|
|
http_endpoint: https://arbitrum.blockpi.network/v1/rpc/public
|
|
ws_endpoint: wss://arbitrum.blockpi.network/v1/ws/public
|
|
priority: 7
|
|
features:
|
|
- reading
|
|
- real_time
|
|
rate_limit:
|
|
requests_per_second: 10
|
|
burst: 25
|
|
timeout: 45s
|
|
max_retries: 5
|
|
retry_delay: 1s
|
|
health_check:
|
|
enabled: true
|
|
interval: 30s
|
|
timeout: 30s
|
|
|
|
# Provider 6: LlamaNodes
|
|
- name: LlamaNodes RPC
|
|
type: standard
|
|
http_endpoint: https://arbitrum.llamarpc.com
|
|
ws_endpoint: wss://arbitrum.llamarpc.com
|
|
priority: 6
|
|
features:
|
|
- reading
|
|
- real_time
|
|
rate_limit:
|
|
requests_per_second: 10
|
|
burst: 25
|
|
timeout: 45s
|
|
max_retries: 5
|
|
retry_delay: 1s
|
|
health_check:
|
|
enabled: true
|
|
interval: 30s
|
|
timeout: 30s
|
|
|
|
# Provider 7: Alchemy Free Tier (Optional - requires signup)
|
|
- name: Alchemy Free Tier
|
|
type: standard
|
|
http_endpoint: https://arb-mainnet.g.alchemy.com/v2/demo
|
|
ws_endpoint: wss://arb-mainnet.g.alchemy.com/v2/demo
|
|
priority: 5
|
|
features:
|
|
- execution
|
|
- reading
|
|
- real_time
|
|
rate_limit:
|
|
requests_per_second: 15
|
|
burst: 35
|
|
timeout: 45s
|
|
max_retries: 5
|
|
retry_delay: 1s
|
|
health_check:
|
|
enabled: true
|
|
interval: 20s
|
|
timeout: 30s
|
|
|
|
rotation:
|
|
strategy: round_robin # Changed from priority_based to round_robin
|
|
fallback_enabled: true # Fixed typo: fallover -> fallback
|
|
health_check_required: true
|
|
retry_failed_after: 2m # Reduced from 5m for faster recovery
|
|
auto_rotate_interval: 30s # Automatically rotate every 30s to distribute load
|
|
failover_on_rate_limit: true # Immediately switch on 429 errors
|
|
|
|
# Circuit breaker configuration for rate limit protection
|
|
circuit_breaker:
|
|
enabled: true
|
|
failure_threshold: 5 # Switch provider after 5 failures
|
|
success_threshold: 2 # Re-enable after 2 successes
|
|
timeout: 60s # How long to wait before trying again
|
|
half_open_requests: 3 # Requests to test in half-open state
|
|
|
|
# Retry configuration
|
|
retry:
|
|
max_attempts: 5 # Try up to 5 times across different providers
|
|
initial_delay: 500ms
|
|
max_delay: 5s
|
|
backoff_multiplier: 2.0 # Exponential backoff
|
|
jitter: true # Add randomness to prevent thundering herd
|