-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
197 lines (169 loc) · 9.14 KB
/
.env.example
File metadata and controls
197 lines (169 loc) · 9.14 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# =============================================================================
# BitSage Network - Environment Configuration
# =============================================================================
# Copy this file to .env and fill in your values.
# NEVER commit .env to version control!
#
# Required variables will cause the node to panic on startup if not set
# when BITSAGE_ENV=production
# =============================================================================
# -----------------------------------------------------------------------------
# Environment Mode
# -----------------------------------------------------------------------------
# Options: production, mainnet, development, dev
# CRITICAL: Set to "production" or "mainnet" for real deployments
BITSAGE_ENV=development
# -----------------------------------------------------------------------------
# Security - REQUIRED IN PRODUCTION
# -----------------------------------------------------------------------------
# JWT secret for API authentication (min 32 chars recommended)
# REQUIRED in production - node will panic if not set
JWT_SECRET=your-secure-jwt-secret-min-32-characters
# Keystore password for signing transactions
# REQUIRED in production - node will panic if not set
KEYSTORE_PASSWORD=your-secure-keystore-password
# -----------------------------------------------------------------------------
# Starknet Configuration
# -----------------------------------------------------------------------------
# Network: mainnet or sepolia
STARKNET_NETWORK=sepolia
# RPC URL - REQUIRED in production (must not contain "YOUR_API_KEY")
# Recommended providers: Alchemy, Infura, Lava, or your own node
# Mainnet: https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_7/YOUR_KEY
# Sepolia: https://rpc.starknet-testnet.lava.build
STARKNET_RPC_URL=https://rpc.starknet-testnet.lava.build
# -----------------------------------------------------------------------------
# Contract Addresses - REQUIRED IN PRODUCTION
# -----------------------------------------------------------------------------
# All addresses must be valid hex strings starting with 0x
# Node will panic if any are 0x0...0 in production mode
# Core contracts (Sepolia deployment - 2025-01-20)
SAGE_TOKEN_ADDRESS=0x072349097c8a802e7f66dc96b95aca84e4d78ddad22014904076c76293a99850
JOB_MANAGER_ADDRESS=0x355b8c5e9dd3310a3c361559b53cfcfdc20b2bf7d5bd87a84a83389b8cbb8d3
CDC_POOL_ADDRESS=0x1f978cad424f87a6cea8aa27cbcbba10b9a50d41e296ae07e1c635392a2339
STAKING_CONTRACT_ADDRESS=0x28caa5962266f2bf9320607da6466145489fed9dae8e346473ba1e847437613
# Proof verification contracts
PROOF_VERIFIER_ADDRESS=0x17ada59ab642b53e6620ef2026f21eb3f2d1a338d6e85cb61d5bcd8dfbebc8b
STWO_VERIFIER_ADDRESS=0x52963fe2f1d2d2545cbe18b8230b739c8861ae726dc7b6f0202cc17a369bd7d
# Optional contracts
REPUTATION_CONTRACT_ADDRESS=0x7832ea4d7f6a429da17b58f74faa611a8a5301cdf371cfa9a5ac520fb6d8f55
FAUCET_CONTRACT_ADDRESS=0x62d3231450645503345e2e022b60a96aceff73898d26668f3389547a61471d3
PAYMENT_ROUTER_ADDRESS=0x6a0639e673febf90b6a6e7d3743c81f96b39a3037b60429d479c62c5d20d41
FRAUD_PROOF_ADDRESS=0x5d5bc1565e4df7c61c811b0c494f1345fc0f964e154e57e829c727990116b50
WORKER_STAKING_ADDRESS=0x28caa5962266f2bf9320607da6466145489fed9dae8e346473ba1e847437613
ESCROW_ADDRESS=0x7d7b5aa04b8eec7676568c8b55acd5682b8f7cb051f69c1876f0e5a6d8edfd4
FEE_MANAGER_ADDRESS=0x74344374490948307360e6a8376d656190773115a4fca4d049366cea7edde39
PRIVACY_POOLS_ADDRESS=0xd85ad03dcd91a075bef0f4226149cb7e43da795d2c1d33e3227c68bfbb78a7
PRIVACY_ROUTER_ADDRESS=0x7d1a6c242a4f0573696e117790f431fd60518a000b85fe5ee507456049ffc53
OPTIMISTIC_TEE_ADDRESS=0x4238502196d7dab552e2af5d15219c8227c9f4dc69f0df1fa2ca9f8cb29eb33
COLLATERAL_ADDRESS=0x4f5405d65d93afb71743e5ac20e4d9ef2667f256f08e61de734992ebd58603
VALIDATOR_REGISTRY_ADDRESS=0x431a8b6afb9b6f3ffa2fa9e58519b64dbe9eb53c6ac8fb69d3dcb8b9b92f5d9
OBELYSK_PROVER_REGISTRY_ADDRESS=0x34a02ecafacfa81be6d23ad5b5e061e92c2b8884cfb388f95b57122a492b3e9
PROOF_GATED_PAYMENT_ADDRESS=0x7e74d191b1cca7cac00adc03bc64eaa6236b81001f50c61d1d70ec4bfde8af0
GOVERNANCE_TREASURY_ADDRESS=0xdf4c3ced8c8eafe33532965fe29081e6f94fb7d54bc976721985c647a7ef92
DYNAMIC_PRICING_ADDRESS=0x28881df510544345d29e12701b6b6366441219364849a43d3443f37583bc0df
METERED_BILLING_ADDRESS=0x1adb19d21f28f56ae9a8852d19f2e2af728764846d30002da8782d571ae01b2
BURN_MANAGER_ADDRESS=0x69eb2419e6eee4ed8a9031f2371f0d9682b91f7c5fb6e0823c48b6c725d6a4
OTC_ORDERBOOK_ADDRESS=0x7b2b59d93764ccf1ea85edca2720c37bba7742d05a2791175982eaa59cedef0
TREASURY_TIMELOCK_ADDRESS=0x4cc9603d7e72469de22aa84d9ac20ddcbaa7309d7eb091f75cd7f7a9e087947
# -----------------------------------------------------------------------------
# Deployer/Signer Account
# -----------------------------------------------------------------------------
# Account used for signing transactions
DEPLOYER_ADDRESS=0x0759a4374389b0e3cfcc59d49310b6bc75bb12bbf8ce550eb5c2f026918bb344
SIGNER_ACCOUNT_ADDRESS=0x0759a4374389b0e3cfcc59d49310b6bc75bb12bbf8ce550eb5c2f026918bb344
# Private key for signing (NEVER commit real private keys!)
# For production, use a keystore file instead
SIGNER_PRIVATE_KEY=
# Keystore file path (preferred over raw private key)
KEYSTORE_PATH=../BitSage-Cairo-Smart-Contracts/deployment/sepolia_keystore.json
# -----------------------------------------------------------------------------
# Paymaster (V3 Gasless Proof Submission)
# -----------------------------------------------------------------------------
# Paymaster contract address for sponsoring worker gas fees via INVOKE_V3
# When set, proof submissions use V3 transactions with paymaster_data
# PaymasterV2 address — served to workers via GET /api/network/config
# Workers no longer need this in their local .env; only the coordinator needs it.
PAYMASTER_ADDRESS=0x35e837e4c0ac10809f0f076ddc40c16b4faa4f1d20578a9016d6bce7c6c4b06
# -----------------------------------------------------------------------------
# Database Configuration
# -----------------------------------------------------------------------------
DATABASE_URL=postgres://bitsage:bitsage@localhost:5432/bitsage
DATABASE_MAX_CONNECTIONS=10
# -----------------------------------------------------------------------------
# API Server Configuration
# -----------------------------------------------------------------------------
API_HOST=0.0.0.0
API_PORT=8080
# TLS/HTTPS (required for production)
ENABLE_TLS=false
TLS_CERT_PATH=/etc/letsencrypt/live/yourdomain.com/fullchain.pem
TLS_KEY_PATH=/etc/letsencrypt/live/yourdomain.com/privkey.pem
# Rate limiting
RATE_LIMIT_REQUESTS_PER_MINUTE=100
RATE_LIMIT_BURST=20
# -----------------------------------------------------------------------------
# Coordinator Configuration
# -----------------------------------------------------------------------------
COORDINATOR_ID=coordinator-1
COORDINATOR_HOST=0.0.0.0
COORDINATOR_PORT=9000
# Worker management
MAX_WORKERS=100
WORKER_TIMEOUT_SECONDS=300
HEALTH_CHECK_INTERVAL_SECONDS=60
# -----------------------------------------------------------------------------
# Consensus Configuration
# -----------------------------------------------------------------------------
ENABLE_CONSENSUS=true
QUORUM_PERCENTAGE=67
VOTE_TIMEOUT_SECONDS=30
MAX_VALIDATORS=100
# -----------------------------------------------------------------------------
# Starknet Demo Scripts (scripts/gpu_batch_demo.sh, scripts/batch_submit_verify.sh)
# -----------------------------------------------------------------------------
# Account address for demo proof submissions
STARKNET_ACCOUNT_ADDRESS=
# Private key for demo proof submissions (NEVER commit real keys!)
STARKNET_PRIVATE_KEY=
# Faucet admin wallet (used by unified_coordinator for social bonus)
FAUCET_ADMIN_ADDRESS=
FAUCET_ADMIN_PRIVATE_KEY=
SAGE_TOKEN_ADDRESS=
# Grafana monitoring (scripts/setup-monitoring.sh)
GRAFANA_ADMIN_PASSWORD=
# -----------------------------------------------------------------------------
# GPU/Proof Generation
# -----------------------------------------------------------------------------
# Enable GPU acceleration for proof generation
ENABLE_GPU=true
# Multi-GPU mode for large proofs
ENABLE_MULTI_GPU=false
# Security bits for proofs (128 recommended)
PROOF_SECURITY_BITS=128
# -----------------------------------------------------------------------------
# Metrics & Monitoring
# -----------------------------------------------------------------------------
ENABLE_METRICS=true
PROMETHEUS_ENDPOINT=0.0.0.0:9090
# -----------------------------------------------------------------------------
# Logging
# -----------------------------------------------------------------------------
# Options: trace, debug, info, warn, error
RUST_LOG=info
# Specific module logging
# RUST_LOG=bitsage_node=debug,tower_http=info
# -----------------------------------------------------------------------------
# P2P Networking
# -----------------------------------------------------------------------------
P2P_PORT=4001
P2P_BOOTSTRAP_PEERS=
# -----------------------------------------------------------------------------
# Feature Flags
# -----------------------------------------------------------------------------
# Enable TEE (Trusted Execution Environment) support
ENABLE_TEE=false
# Enable privacy features
ENABLE_PRIVACY=true
# Enable proof pipeline for batch verification
ENABLE_PROOF_PIPELINE=true