-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy path.env.ws.example
More file actions
73 lines (61 loc) · 4.73 KB
/
.env.ws.example
File metadata and controls
73 lines (61 loc) · 4.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
# Hedera JSON RPC Relay - WebSocket Server Configuration Example
# This file contains configuration for the WebSocket JSON-RPC server
# ========== REQUIRED CONFIGURATION ==========
# Network Configuration
CHAIN_ID= # The network chain id. Local/previewnet = 0x12a (298), Previewnet = 0x129 (297), Testnet = 0x128 (296), Mainnet = 0x127 (295)
HEDERA_NETWORK= # Which network to connect to. Can be: previewnet, testnet, mainnet or a map of IPs and nodes e.g. {"127.0.0.1:50211":"0.0.3"}
MIRROR_NODE_URL= # The Mirror Node API endpoint
# Operator Account (Required for transaction execution)
OPERATOR_ID_MAIN= # Operator account ID used to pay for transactions e.g. 0.0.1001
OPERATOR_KEY_MAIN= # Operator private key used to sign transactions in hex encoded DER format
# OPERATOR_KEY_FORMAT=DER # Optional. Operator private key format. Valid types: DER, HEX_ECDSA, or HEX_ED25519
# WebSocket Configuration
SUBSCRIPTIONS_ENABLED=true # Must be true for the WebSocket server to function properly
# ========== WEBSOCKET SERVER SETTINGS ==========
# WEB_SOCKET_PORT=8546 # Port for WebSocket connections
# WEB_SOCKET_HTTP_PORT=8547 # Port for HTTP server (metrics and health endpoints)
# WS_CONNECTION_LIMIT=10 # Maximum concurrent WebSocket connections allowed
# WS_CONNECTION_LIMIT_PER_IP=10 # Maximum connections from a single IP address
# WS_MAX_INACTIVITY_TTL=300000 # Time (ms) a WebSocket connection can stay open without activity (5 min default)
# WS_PING_INTERVAL=100000 # Interval between ping messages (set to 0 to disable)
# ========== SUBSCRIPTION CONFIGURATION ==========
# WS_SUBSCRIPTION_LIMIT=10 # Maximum subscriptions per single connection
# WS_MULTIPLE_ADDRESSES_ENABLED=false # Allow subscription to multiple contract addresses
# WS_NEW_HEADS_ENABLED=true # Enable subscriptions for latest blocks
# WS_SAME_SUB_FOR_SAME_EVENT=true # Return same subscription ID for same event from single connection
# WS_POLLING_INTERVAL=500 # Time (ms) between each poll to mirror node for subscriptions
# WS_RELAY_URL=ws://127.0.0.1:8546 # URL for relay WebSocket server
# ========== CACHE & BATCH CONFIGURATION ==========
# WS_CACHE_TTL=20000 # Time to live for cached WebSocket entries
# WS_BATCH_REQUESTS_ENABLED=true # Enable batch requests on WebSocket server
# WS_BATCH_REQUESTS_MAX_SIZE=20 # Maximum requests allowed in a batch on WebSocket server
# ========== MIRROR NODE CONFIGURATION ==========
# MIRROR_NODE_RETRIES=0 # Max retries for mirror node GET requests
# MIRROR_NODE_RETRY_DELAY=2000 # Delay in ms between retry requests
# MIRROR_NODE_TIMEOUT=10000 # Max time to wait for mirror node response
# MIRROR_NODE_LIMIT_PARAM=100 # Custom limit value for GET requests
# MIRROR_NODE_URL_HEADER_X_API_KEY= # API key for mirror node authentication
# MIRROR_NODE_URL_WEB3= # Optional separate URL for Web3 endpoints
# MIRROR_NODE_AGENT_CACHEABLE_DNS=true # Enable DNS caching for mirror node
# ========== ETH CALL CONFIGURATION ==========
# SDK_GRPC_DEADLINE=10000 # Max time in ms per SDK request (preferred over CONSENSUS_MAX_EXECUTION_TIME)
# SDK_MAX_ATTEMPTS=10 # Max retry attempts for SDK transactions
# SDK_REQUEST_TIMEOUT=30000 # Total timeout for SDK execute() including retries
# CONSENSUS_MAX_EXECUTION_TIME=10000 # Legacy config for SDK deadline (use SDK_GRPC_DEADLINE instead)
# CONTRACT_QUERY_TIMEOUT_RETRIES=3 # Maximum retries for failed contract call queries
# ========== REDIS CONFIGURATION ==========
# REDIS_ENABLED=false # Enable Redis as shared cache
# REDIS_URL= # Redis connection URL
# REDIS_RECONNECT_DELAY_MS= # Delay between reconnect retries
# ========== TRANSACTION POOL ========
# PENDING_TRANSACTION_STORAGE_TTL=30 # Time-to-live (TTL) in seconds for transaction payloads stored in Redis
# ========== LOCK SERVICE ===========
# LOCK_MAX_HOLD_MS=30000 # Maximum time in milliseconds a lock can be held before automatic force-release
# LOCAL_LOCK_MAX_ENTRIES=1000 # Maximum number of lock entries stored in memory
# LOCK_QUEUE_POLL_INTERVAL_MS=50 # Interval in milliseconds between queue position checks when waiting for a lock
# LOCK_HEARTBEAT_MISSED_COUNT=5 # Number of consecutive heartbeats that can be missed before a waiter is considered dead (Redis only)
# ========== OTHER SETTINGS ==========
# CLIENT_TRANSPORT_SECURITY=false # Enable or disable TLS for both networks
# USE_ASYNC_TX_PROCESSING=true # If true, returns tx hash immediately after prechecks
# LOG_LEVEL=trace # Logging level (trace, debug, info, warn, error, fatal)
# PRETTY_LOGS_ENABLED # Enable pino-pretty logging (true) or json logging (false)