Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
205 lines (177 loc) · 8.9 KB
/
Copy path.env.example
File metadata and controls
205 lines (177 loc) · 8.9 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
198
199
200
201
202
203
204
205
########################################
# 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"]'
SHOW_VALIDATOR_PRIVATE_KEYS_IN_LOGS='false' # Set true only when debugging local validator signing.
########################################
# 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"
# Acquisition mode: prebuilt, source, release, or empty for auto selection.
# Auto precedence is prebuilt E2E tree > <branch>:<commit> source pin > release.
# Release is the default and uses third_party/genvm/version unless GENVM_TAG overrides it.
GENVM_SOURCE_MODE=""
GENVM_TAG="" # Exact release tag, e.g. v0.6.0-rc0. Mutually exclusive with GENVM_REF.
GENVM_REF="" # Source git ref/SHA; set mode=source, or use <branch>:<commit> for auto source mode.
GENVM_EXECUTOR_VERSION_NAME="" # Optional source-build executor label, e.g. v0.3.0-e2e-dev.
GENVM_LLM_DEBUG="0"
GENVM_WEB_DEBUG="0"
########################################
# Studio Fee Accounting
# Set all three price values to 0 to run Studio in gasless mode.
GENLAYER_STUDIO_GEN_PER_TIME_UNIT='1000000000000000' # 0.001 GEN per time unit
GENLAYER_STUDIO_STORAGE_UNIT_PRICE='1'
GENLAYER_STUDIO_RECEIPT_GAS_PRICE='1'
GENLAYER_STUDIO_FIXED_PROPOSE_RECEIPT_GAS='210000'
GENLAYER_STUDIO_FIXED_MESSAGE_REVEAL_GAS='100000'
GENLAYER_STUDIO_RECEIPT_WRAPPER_BYTES='1024'
# 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 LibertAI, add your key here
LIBERTAI_API_KEY='<add_your_libertai_api_key_here>'
# If you want to use IO.net, add your key here
IONETAPIKEY='<add_your_ionet_api_key_here>'
# If you want to use Chutes.ai, add your key here
CHUTESAI_API_KEY='<add_your_chutesai_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
# PENDING-tx queue depth caps for eth_sendRawTransaction (admission control).
# Empty / unset = no cap (the default for self-hosted). Public shared
# deployments should set both to prevent one user filling the queue.
MAX_PENDING_PER_CONTRACT_DEFAULT='' # Cap PENDING txs per contract (e.g. 50)
MAX_PENDING_PER_SENDER_DEFAULT='' # Cap PENDING txs per sender (e.g. 20)
########################################
# Terminal Contract Snapshot Pruning (Optional)
# Archives terminal transaction contract_snapshot payloads before pruning them
# from the hot transactions table. Disabled by default.
STUDIO_CONTRACT_SNAPSHOT_PRUNER_ENABLED='false'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_ARCHIVE_ENABLED='true'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_VERIFY_ARCHIVE='true'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_ALLOW_LOSSY_PRUNE='false'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_DRY_RUN='false'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_BATCH_SIZE='5'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_RETENTION_HOURS='24'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_INTERVAL_SECONDS='300'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_ARCHIVE_BACKEND='s3' # file, gcs, or s3
STUDIO_CONTRACT_SNAPSHOT_ARCHIVE_RETRIEVAL_ENABLED='false'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_FILE_DIR='data/terminal-contract-snapshot-archive'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_GCS_BUCKET=''
STUDIO_CONTRACT_SNAPSHOT_PRUNER_GCS_PREFIX='studio/terminal-contract-snapshots'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_GCS_STORAGE_CLASS='NEARLINE'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_S3_BUCKET=''
STUDIO_CONTRACT_SNAPSHOT_PRUNER_S3_PREFIX='studio/terminal-contract-snapshots'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_S3_REGION=''
STUDIO_CONTRACT_SNAPSHOT_PRUNER_S3_STORAGE_CLASS='STANDARD'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_S3_SSE='aws:kms'
STUDIO_CONTRACT_SNAPSHOT_PRUNER_S3_KMS_KEY_ID=''
########################################
# 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