forked from TevaLabs/Xelma-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
95 lines (83 loc) · 3.73 KB
/
Copy path.env.example
File metadata and controls
95 lines (83 loc) · 3.73 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
PORT=3001
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/xelma
# Auth
JWT_SECRET=change-me
# Soroban / Stellar — prefer SOROBAN_* (canonical). Aliases also work:
# CONTRACT_ID → SOROBAN_CONTRACT_ID
# STELLAR_RPC_URL → SOROBAN_RPC_URL
# When both a canonical name and its alias are set, SOROBAN_* wins.
SOROBAN_CONTRACT_ID=
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
SOROBAN_NETWORK=testnet
SOROBAN_ADMIN_SECRET=
SOROBAN_ORACLE_SECRET=
# Optional aliases (hackathon / older Render templates):
# STELLAR_RPC_URL=https://soroban-testnet.stellar.org
# CONTRACT_ID=
# Money-path chain verification policy (#401).
# false (default) = fail-open: log and continue with DB-only on Soroban failure (demos/local).
# true = fail-closed: abort bet/resolve when chain verification fails.
# Production / real-stakes deployments SHOULD set SOROBAN_FAIL_CLOSED=true.
SOROBAN_FAIL_CLOSED=false
# Price oracle providers (primary: CoinGecko, fallback: CoinCap)
COINGECKO_API_URL=https://api.coingecko.com/api/v3/simple/price?ids=stellar&vs_currencies=usd
COINGECKO_MULTI_PRICE_URL=https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,stellar&vs_currencies=usd
COINCAP_API_URL=https://api.coincap.io/v2/assets/stellar
COINCAP_MULTI_PRICE_URL=https://api.coincap.io/v2/assets?ids=bitcoin,ethereum,stellar
# Oracle auto-resolve interval (seconds)
ORACLE_RESOLVE_INTERVAL_SECONDS=30
# Price oracle fetch tuning + staleness guard (#229)
# - POLLING_INTERVAL_MS: how often the background poller fetches a price
# - REQUEST_TIMEOUT_MS: per-request network timeout
# - MAX_RETRIES: retry attempts per provider before failing over
# - STALENESS_THRESHOLD_MS: a price older than this is "stale". Round
# resolution (cron AND the manual oracle resolve
# route) is REFUSED while the feed is stale, so the
# platform never settles against a frozen price.
# MUST be greater than ORACLE_POLLING_INTERVAL_MS or
# the server refuses to start.
ORACLE_POLLING_INTERVAL_MS=10000
ORACLE_REQUEST_TIMEOUT_MS=5000
ORACLE_MAX_RETRIES=3
ORACLE_STALENESS_THRESHOLD_MS=60000
# Force database-only active round reads for local development
ROUNDS_MOCK_MODE=false
# Round Scheduler
ROUND_SCHEDULER_ENABLED=false
ROUND_SCHEDULER_MODE=UP_DOWN
# Bet Mode: true = stub mode (records intent without on-chain calls), false = on-chain via Soroban
BET_STUB_MODE=true
# Rate limits (demo defaults). Production may raise read limits; keep bet/prediction tight.
# RATE_LIMIT_API_MAX=100
# RATE_LIMIT_API_WINDOW_MS=60000
# RATE_LIMIT_WRITE_MAX=20
# RATE_LIMIT_WRITE_WINDOW_MS=60000
# RATE_LIMIT_BET_MAX=5
# RATE_LIMIT_BET_WINDOW_MS=60000
# RATE_LIMIT_PREDICTION_MAX=10
# RATE_LIMIT_PREDICTION_WINDOW_MS=60000
# Soroban circuit breaker + in-flight cap (#500)
# Demo: trip quickly (3 failures / 30s) and cap concurrent RPC at 8.
# Production: keep the same until a live load run says otherwise; never raise
# the in-flight cap without measuring p95 and RPC errors first.
# SOROBAN_BREAKER_FAILURE_THRESHOLD=3
# SOROBAN_BREAKER_OPEN_BACKOFF_MS=30000
# SOROBAN_MONEY_PATH_MAX_IN_FLIGHT=8
# Load / performance test harness (#21, #152, #500)
# LOAD_TEST_PREDICTION_CONCURRENCY=10
# LOAD_TEST_PREDICTION_ITERATIONS=30
# LOAD_TEST_PREDICTION_MIN_RPS=5
# LOAD_TEST_PREDICTION_P95_MS=500
# LOAD_TEST_BET_CONCURRENCY=8
# LOAD_TEST_BET_ITERATIONS=16
# LOAD_TEST_BET_MIN_RPS=3
# LOAD_TEST_BET_P95_MS=500
# LOAD_TEST_IDEMPOTENCY_CONCURRENCY=8
# LOAD_TEST_IDEMPOTENCY_ITERATIONS=16
# LOAD_TEST_ROUNDS_CONCURRENCY=10
# LOAD_TEST_ROUNDS_ITERATIONS=30
# LOAD_TEST_ROUNDS_MIN_RPS=5
# LOAD_TEST_ROUNDS_P95_MS=150
# LOAD_TEST_OVERLOAD_BET_BURST=12
# LOAD_TEST_WS_CLIENTS=20