-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy path.env.example
More file actions
150 lines (127 loc) · 5.94 KB
/
.env.example
File metadata and controls
150 lines (127 loc) · 5.94 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
########################################
# Postgres Database Configuration
DBHOST='postgres'
DBNAME='genlayer_state'
DBUSER='postgres'
DBPASSWORD='postgres'
DBPORT='5432'
DATABASE_POOL_SIZE='20' # Database connection pool size
DATABASE_MAX_OVERFLOW='10' # Maximum overflow connections
# Set the compose profile to 'hardhat' to use the hardhat network
REMOTE_DATABASE='false'
########################################
# Logging Configuration
LOGCONFIG='dev' # dev/prod
LOG_LEVEL='debug' # 'critical', 'error', 'warning', 'info', 'debug', 'trace'
DISABLE_INFO_LOGS_ENDPOINTS='["ping", "eth_getTransactionByHash","gen_getContractSchema", "gen_getContractSchemaForCode", "net_version", "sim_getTransactionsForAddress", "sim_getConsensusContract", "eth_estimateGas", "eth_chainId", "eth_getBlockByNumber", "eth_gasPrice", "sim_getFinalityWindowTime"]'
########################################
# JsonRPC Server Configuration
JSONRPC_SERVER_URL='http://jsonrpc:4000' # Internal URL for consensus workers to connect to JSON-RPC server
RPCPORT='4000'
RPCDEBUGPORT='4678' # debugpy listening port
SERVER_NAME='studio.genlayer.com'
########################################
# Compose and Build
# Set the compose profile to 'hardhat' to use the hardhat network
COMPOSE_PROFILES=''
FRONTEND_BUILD_TARGET='dev' # change to 'dev' to run in dev mode
BACKEND_BUILD_TARGET='debug' # change to 'prod' or remove to run in prod mode
REDIS_URL='redis://redis:6379/0' # Redis URL for Socket.IO message queue (e.g., 'redis://redis:6379/0')
########################################
# GenVM Configuration
GENVM_BIN="/genvm/bin"
GENVMROOT="/genvm"
GENVM_LLM_DEBUG="0"
GENVM_WEB_DEBUG="0"
# Ollama Server Configuration
OLAMAPORT='11434'
# WebRequest Server Configuration
WEBDRIVERHOST='webdriver'
WEBDRIVERPORT='5001'
# Optional: tweak web rendering behavior used by validators' web module
# Default navigation timeout (ms) for webdriver fetches (supports Playwright-based service)
WEBDRIVER_TIMEOUT_MS="60000"
# Number of retries when a render fails (e.g., 408 Navigation timeout)
WEB_RENDER_RETRIES="2"
########################################
# Consensus Rollup
# Hardhat port
HARDHAT_URL='http://hardhat'
HARDHAT_PORT='8545'
HARDHAT_PRIVATE_KEY='0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'
GENLAYER_CHAIN_ID='61999'
########################################
# LLM Providers Configuration
# If you want to use OpenAI LLMs, add your key here
OPENAIKEY='<add_your_openai_api_key_here>'
# If you want to use Anthropic AI LLMs, add your key here
ANTHROPIC_API_KEY='<add_your_anthropic_api_key_here>'
# If you want to use Heurist AI LLMs, add your key here
HEURISTAIURL='https://llm-gateway.heurist.xyz'
HEURISTAIMODELSURL='https://raw.githubusercontent.com/heurist-network/heurist-models/main/models.json'
HEURISTAIAPIKEY='<add_your_heuristai_api_key_here>'
# If you want to use XAI LLMs, add your key here
XAI_API_KEY='<add_your_xai_api_key_here>'
# If you want to use Gemini LLMs, add your key here
GEMINI_API_KEY='<add_your_gemini_api_key_here>'
# If you want to use OpenRouter, add your key here
OPENROUTERAPIKEY='<add_your_openrouter_api_key_here>'
# If you want to use IO.net, add your key here
IONETAPIKEY='<add_your_ionet_api_key_here>'
########################################
# API Rate Limiting Configuration
RATE_LIMIT_ENABLED='false' # Enable/disable API key rate limiting
RATE_LIMIT_ANON_PER_MINUTE='30' # Anonymous (no API key) per-minute limit
RATE_LIMIT_ANON_PER_HOUR='500' # Anonymous per-hour limit
RATE_LIMIT_ANON_PER_DAY='5000' # Anonymous per-day limit
########################################
# Usage Metrics Configuration (Optional)
# Set these to enable sending transaction metrics to an external API
USAGE_METRICS_API_URL='' # e.g., 'https://metrics.example.com'
USAGE_METRICS_API_KEY='' # Bearer token for API authentication
########################################
# Validator Configuration
# JSON array of initial validators to be created on startup.
VALIDATORS_CONFIG_JSON='[
{"stake": 100, "provider": "openai", "model": "gpt-4o", "amount": 5}
]'
########################################
# Resources setup
# Number of container replicas to run, used to scale up for production
JSONRPC_REPLICAS='1'
CONSENSUS_WORKERS='3'
MAX_PARALLEL_TXS_PER_WORKER='1'
# Production Configuration (for Gunicorn deployment)
WEB_CONCURRENCY='1' # Number of Gunicorn workers (default: CPU cores * 2)
# Service resources limit
COMPOSE_RPC_CPU_LIMIT='2'
COMPOSE_RPC_CPU_RESERVATION='1'
COMPOSE_RPC_MEM_LIMIT='8g'
COMPOSE_RPC_MEM_RESERVATION='4g'
COMPOSE_WORKER_CPU_LIMIT='2'
COMPOSE_WORKER_CPU_RESERVATION='1'
COMPOSE_WORKER_MEM_LIMIT='8g'
COMPOSE_WORKER_MEM_RESERVATION='4g'
# Consensus Parameters
CONSENSUS_CONTRACT_ADDRESS='0x0000000000000000000000000000000000000000'
DEFAULT_NUM_INITIAL_VALIDATORS=5
DEFAULT_CONSENSUS_MAX_ROTATIONS=3
########################################
# Frontend Configuration
# If you want to run the frontend in production, change http to https and ws to wss
VITE_GENLAYER_NETWORK='localnet' # localnet | studionet | testnetAsimov
VITE_JSON_RPC_SERVER_URL='http://127.0.0.1:4000/api' # if VITE_PROXY_ENABLED = 'true' change to '/api'
VITE_WS_SERVER_URL='ws://127.0.0.1:4000' # if VITE_PROXY_ENABLED = 'true' change to '/'
VITE_PLAUSIBLE_DOMAIN='studio.genlayer.com'
FRONTEND_PORT='8080'
# Vite Proxy Configuration (for local development)
VITE_PROXY_ENABLED='false'
VITE_PROXY_JSON_RPC_SERVER_URL='http://jsonrpc:4000'
VITE_PROXY_WS_SERVER_URL='ws://jsonrpc:4000'
VITE_IS_HOSTED='false'
# Consensus mechanism
VITE_FINALITY_WINDOW=30 # in seconds
VITE_FINALITY_WINDOW_APPEAL_FAILED_REDUCTION=0.2 # 20% reduction per appeal failed
VITE_MAX_ROTATIONS=3
# Wallet Connection (Reown AppKit / WalletConnect)
VITE_APPKIT_PROJECT_ID='' # Reown/WalletConnect project ID from https://cloud.reown.com