-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
77 lines (64 loc) · 4 KB
/
Copy path.env.example
File metadata and controls
77 lines (64 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Server
PORT=3000
HOST=0.0.0.0
MCP_PORT=3001
MCP_HOST=0.0.0.0
# Request limits
BODY_LIMIT=1048576 # Max request body size in bytes (default: 1 MB)
MAX_PARAM_LENGTH=200 # Max URL parameter length
# Rate limiting
RATE_LIMIT_MAX=100 # Max requests per window (global)
RATE_LIMIT_WINDOW_MS=60000 # Rate limit window in ms (default: 1 minute)
RELOAD_RATE_LIMIT_MAX=5 # Max /reload requests per window
SEARCH_RATE_LIMIT_MAX=30 # Max /search requests per window
# RPC health check
RPC_CHECK_TIMEOUT_MS=8000 # Timeout per RPC call
RPC_CHECK_CONCURRENCY=8 # Parallel RPC checks
MAX_ENDPOINTS_PER_CHAIN=5 # Max endpoints tested per chain
RPC_MONITOR_LOOP=false # Set to true to loop monitoring continuously
# Search
MAX_SEARCH_QUERY_LENGTH=200
# Data sources (override to use mirrors or local files)
# DATA_SOURCE_THE_GRAPH=https://raw.githubusercontent.com/Johnaverse/networks-registry/refs/heads/main/public/TheGraphNetworksRegistry.json
# DATA_SOURCE_CHAINLIST=https://chainlist.org/rpcs.json
# DATA_SOURCE_CHAINS=https://chainid.network/chains.json
# DATA_SOURCE_SLIP44=https://raw.githubusercontent.com/satoshilabs/slips/master/slip-0044.md
# Source resilience (recover from transient fetch failures)
SOURCE_FETCH_MAX_RETRIES=3 # Attempts per source fetch before giving up
SOURCE_FETCH_RETRY_BASE_MS=500 # Backoff base; delay = base * 2^(attempt-1)
SOURCE_REFRESH_INTERVAL_MS=900000 # Self-heal: re-fetch if a source failed (0 disables)
# L2BEAT scaling data
# DATA_SOURCE_L2BEAT_API=https://l2beat.com/api/scaling/summary # Live endpoint (slug-keyed; chainId resolved via data/l2beat-chain-map.json)
# L2BEAT_FETCH_TIMEOUT_MS=10000 # Live fetch timeout before using data/l2beat-fallback.json
L2BEAT_STALE_AFTER_MS=21600000 # /health flags L2BEAT stale after this long without a refresh (default 6h; cadence is ~1 sweep)
# Disk cache (stale-first startup)
DATA_CACHE_ENABLED=true
DATA_CACHE_FILE=.cache/chains-api-data.json
# CORS
CORS_ORIGIN=* # Allowed origins (* for all, or comma-separated list)
# Proxy (optional)
# PROXY_URL=http://proxy.example.com:8080 # HTTP/HTTPS proxy URL (leave empty to disable)
# PROXY_URL=http://user:pass@proxy.example.com:8080 # Proxy with authentication
# Assistant (optional LLM chat — leave ASSISTANT_LLM_URL empty to disable)
# ASSISTANT_LLM_URL=http://localhost:11434 # OpenAI-compatible server (e.g. Ollama)
# ASSISTANT_LLM_API_KEY= # Bearer token for key-protected servers (OpenAI, OpenRouter, …); empty for plain Ollama
# ASSISTANT_MODEL=qwen3 # Model name passed to /v1/chat/completions
# ASSISTANT_MAX_TOOL_ITERATIONS=6 # Hard cap on LLM round-trips per request
# ASSISTANT_TIMEOUT_MS=60000 # Overall per-request deadline
# ASSISTANT_MAX_TOKENS=1024 # max_tokens per LLM call
# ASSISTANT_RATE_LIMIT_MAX=10 # POST /assistant/chat per IP per rate window
# ASSISTANT_MAX_MESSAGES=20 # Max history items per request
# ASSISTANT_MAX_MESSAGE_LENGTH=4000 # Max chars per message
# ASSISTANT_TOOL_RESULT_MAX_CHARS=8000 # Truncation cap per tool result
# ASSISTANT_TOPIC_GUARD=true # Pre-classify each question; off-topic ones are refused before the tool loop (costs one extra LLM call)
# ASSISTANT_SYNC_WAIT_MS=8000 # POST answers inline within this window, else 202 + poll job (keeps requests under proxy timeouts)
# ASSISTANT_JOB_TTL_MS=600000 # How long finished async jobs stay pollable
# ASSISTANT_MAX_CONCURRENT_JOBS=4 # Max LLM runs in flight at once (503 "busy" beyond)
# Live incidents feed (used by the get_live_incidents assistant/MCP tool)
# LIVE_INCIDENTS_URL=https://chains-status-news.johnaverse.cc
# LIVE_INCIDENTS_CACHE_TTL_MS=60000
# LIVE_INCIDENTS_FETCH_TIMEOUT_MS=10000
# Forum/governance news feed (used by the get_forum_news assistant/MCP tool)
# FORUM_NEWS_URL=https://chains-forum-news.johnaverse.cc
# FORUM_NEWS_CACHE_TTL_MS=60000
# FORUM_NEWS_FETCH_TIMEOUT_MS=10000