-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
82 lines (67 loc) · 4.74 KB
/
.env.example
File metadata and controls
82 lines (67 loc) · 4.74 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
# Settla local development environment
# Copy to .env: cp .env.example .env
# ── PostgreSQL ───────────────────────────────────────────────────
POSTGRES_USER=settla
POSTGRES_PASSWORD=settla
# DB URLs point to PgBouncer (pooled), NOT raw Postgres.
# Raw Postgres ports (5433/5434/5435) are for migrations and admin only.
SETTLA_LEDGER_DB_URL=postgres://settla:settla@localhost:6433/settla_ledger?sslmode=disable
SETTLA_TRANSFER_DB_URL=postgres://settla:settla@localhost:6434/settla_transfer?sslmode=disable
SETTLA_TREASURY_DB_URL=postgres://settla:settla@localhost:6435/settla_treasury?sslmode=disable
# Raw Postgres URLs for migrations (PgBouncer doesn't support DDL well)
SETTLA_LEDGER_DB_MIGRATE_URL=postgres://settla:settla@localhost:5433/settla_ledger?sslmode=disable
SETTLA_TRANSFER_DB_MIGRATE_URL=postgres://settla:settla@localhost:5434/settla_transfer?sslmode=disable
SETTLA_TREASURY_DB_MIGRATE_URL=postgres://settla:settla@localhost:5435/settla_treasury?sslmode=disable
# ── TigerBeetle ─────────────────────────────────────────────────
# Ledger write authority (1M+ TPS). Source of truth for balances.
SETTLA_TIGERBEETLE_ADDRESSES=localhost:3001
# ── Redis ────────────────────────────────────────────────────────
SETTLA_REDIS_URL=redis://localhost:6379
# ── NATS ─────────────────────────────────────────────────────────
SETTLA_NATS_URL=nats://localhost:4222
# ── Settla Server (Go) ──────────────────────────────────────────
SETTLA_SERVER_HTTP_PORT=8080
SETTLA_SERVER_GRPC_PORT=9090
SETTLA_PPROF_PORT=6060
SETTLA_PPROF=true
# ── High-Throughput Tuning ───────────────────────────────────────
# Treasury: how often in-memory reservations flush to Postgres (ms)
SETTLA_TREASURY_FLUSH_INTERVAL_MS=100
# Ledger: write-ahead batch window before flushing to TigerBeetle (ms)
SETTLA_LEDGER_BATCH_WINDOW_MS=10
# ── Settla Node (NATS Workers) ──────────────────────────────────
# Total partitions for event stream (must match across all nodes)
SETTLA_NODE_PARTITIONS=8
# Which partition this instance handles (omit in dev = handle all)
# SETTLA_NODE_PARTITION_ID=0
# ── Settla Gateway (TypeScript) ─────────────────────────────────
SETTLA_GATEWAY_PORT=3000
# Number of persistent gRPC connections to settla-server
SETTLA_GRPC_POOL_SIZE=50
# Local in-process tenant auth cache TTL (seconds)
SETTLA_TENANT_CACHE_TTL_SECONDS=30
# ── Provider Mode ─────────────────────────────────────────────────
# mock — Mock providers, no blockchain (default for tests)
# testnet — Real testnet blockchains (Tron Nile, Sepolia, Solana Devnet)
# live — Production providers (future)
SETTLA_PROVIDER_MODE=mock
# ── Mock Provider Tuning ────────────────────────────────────────
# Reduce for load testing (real providers take seconds, mock simulates delay)
SETTLA_MOCK_DELAY_MS=500
# ── Wallet Management ────────────────────────────────────────────
# Required for testnet mode. Generate with: openssl rand -hex 32
# SETTLA_WALLET_ENCRYPTION_KEY=
# Required for testnet mode. Generate with: openssl rand -hex 64
# SETTLA_MASTER_SEED=
# Wallet file storage path (default: .settla/wallets)
SETTLA_WALLET_STORAGE_PATH=.settla/wallets
# ── Blockchain RPC URLs (testnet defaults) ───────────────────────
# Override with private/authenticated endpoints for higher rate limits.
SETTLA_TRON_RPC_URL=https://nile.trongrid.io
# SETTLA_TRON_API_KEY= # Optional TronGrid API key
SETTLA_ETHEREUM_RPC_URL=https://rpc.sepolia.org
SETTLA_BASE_RPC_URL=https://sepolia.base.org
SETTLA_SOLANA_RPC_URL=https://api.devnet.solana.com
# ── General ──────────────────────────────────────────────────────
SETTLA_LOG_LEVEL=debug
SETTLA_ENV=development