-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy path.env.http.example
119 lines (104 loc) · 7.88 KB
/
.env.http.example
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
# Hedera JSON RPC Relay - HTTP Server Configuration Example
# This file contains configuration for the HTTP 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
# ========== NETWORK & CONNECTION SETTINGS ==========
# SERVER_HOST= # The hostname or IP address for server to listen on. Default: 0.0.0.0 (all interfaces)
# SERVER_PORT=7546 # The RPC server port number to listen on
# SERVER_REQUEST_TIMEOUT_MS=60000 # The time of inactivity allowed before a timeout is triggered
# CLIENT_TRANSPORT_SECURITY=false # Enable or disable TLS for both networks
# ========== ETHEREUM API CONFIGURATION ==========
# DEBUG_API_ENABLED=false # Enables debug methods like debug_traceTransaction
# FILTER_API_ENABLED=true # Enables filter related methods
# ESTIMATE_GAS_THROWS=true # If true, throws actual error reason during contract reverts
# ========== BATCH REQUESTS ==========
# BATCH_REQUESTS_ENABLED=true # Enable or disable batch requests
# BATCH_REQUESTS_MAX_SIZE=100 # Maximum number of requests allowed in a batch
# REQUEST_ID_IS_OPTIONAL=false # If true, JSON RPC request id field is optional (breaks API spec)
# INPUT_SIZE_LIMIT=1 # Maximum size allowed for requests (in MB)
# ========== ETH CALL CONFIGURATION ==========
# CONTRACT_CALL_GAS_LIMIT=50000000 # Maximum gas limit applied to eth_call endpoint
# ETH_CALL_CACHE_TTL=200 # Maximum time in ms to cache an eth_call response
# ETH_CALL_DEFAULT_TO_CONSENSUS_NODE=false # If true, eth_call first queries consensus node instead of mirror
# ETH_CALL_ACCEPTED_ERRORS=[] # List of acceptable error codes for eth_call requests for retry
# ETH_CALL_CONSENSUS_SELECTORS=[] # Special transaction selectors always routed to Consensus node
# ========== FEE & GAS CONFIGURATION ==========
# GAS_PRICE_TINY_BAR_BUFFER=10000000000 # Additional buffer for gas price fluctuations
# GAS_PRICE_PERCENTAGE_BUFFER=0 # Additional percentage buffer on calculated network gasPrice
# ETH_FEE_HISTORY_FIXED=true # If true, eth_feeHistory returns fixed fee for results
# FEE_HISTORY_MAX_RESULTS=10 # Maximum number of results to return for eth_feeHistory
# TX_DEFAULT_GAS=400000 # Default gas for transactions that don't specify gas
# MAX_TRANSACTION_FEE_THRESHOLD=15000000 # Max transaction fee paid by relay operator account
# ========== CACHE CONFIGURATION ==========
# CACHE_MAX=1000 # Maximum items in cache
# CACHE_TTL=3600000 # Max time to live for items in ms (default: 1 hour)
# ETH_BLOCK_NUMBER_CACHE_TTL_MS=1000 # Time in ms to cache mirror node response
# ETH_GET_BALANCE_CACHE_TTL_MS=1000 # Time in ms to cache balance returned
# ETH_GET_GAS_PRICE_CACHE_TTL_MS=1800000 # Time in ms to cache ethGasPrice
# ETH_GET_TRANSACTION_COUNT_CACHE_TTL=500 # Time in ms to cache transaction count
# ========== RATE LIMITING ==========
# RATE_LIMIT_DISABLED=false # Flag to disable IP based rate limiting
# DEFAULT_RATE_LIMIT=200 # Default fallback rate limit if no other is configured
# TIER_1_RATE_LIMIT=100 # Max request limit for expensive endpoints
# TIER_2_RATE_LIMIT=800 # Max request limit for non-expensive endpoints
# TIER_3_RATE_LIMIT=1600 # Max request limit for static return endpoints
# LIMIT_DURATION=60000 # Duration in ms for rate limits
# ========== HBAR RATE LIMITING ==========
# HBAR_RATE_LIMIT_TINYBAR=800000000000 # Total HBAR budget (8000 HBARs)
# HBAR_RATE_LIMIT_DURATION=86400000 # HBAR budget limit duration (1 day)
# HBAR_RATE_LIMIT_BASIC=1120000000 # Individual limit for BASIC tier (11.2 HBARs)
# HBAR_RATE_LIMIT_EXTENDED=3200000000 # Individual limit for EXTENDED tier (32 HBARs)
# HBAR_RATE_LIMIT_PRIVILEGED=8000000000 # Individual limit for PRIVILEGED tier (80 HBARs)
# HBAR_SPENDING_PLANS_CONFIG=spendingPlansConfig.json # Spending plans configuration
# ========== 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
# MIRROR_NODE_HTTP_KEEP_ALIVE=true # Keep HTTP connections alive
# MIRROR_NODE_HTTP_KEEP_ALIVE_MSECS=1000 # Max time to keep HTTP connections alive
# MIRROR_NODE_HTTP_MAX_SOCKETS=300 # Max sockets for HTTP connections
# MIRROR_NODE_HTTP_MAX_TOTAL_SOCKETS=300 # Max total sockets for HTTP connections
# MIRROR_NODE_HTTP_SOCKET_TIMEOUT=60000 # Socket timeout for HTTP requests
# MIRROR_NODE_MAX_REDIRECTS=5 # Max redirects allowed for mirror node requests
# MIRROR_NODE_RETRY_CODES=[] # Error codes to retry on for mirror node requests
# MIRROR_NODE_RETRIES_DEVMODE=5 # Max retries in dev mode
# MIRROR_NODE_RETRY_DELAY_DEVMODE=200 # Delay between retries in dev mode
# MIRROR_NODE_CONTRACT_RESULTS_PG_MAX=25 # Max pages for contract results
# MIRROR_NODE_CONTRACT_RESULTS_LOGS_PG_MAX=200 # Max pages for contract results logs
# MIRROR_NODE_REQUEST_RETRY_COUNT=10 # Max retries for contract results
# ========== DATA RETRIEVAL & LIMITS ==========
# ETH_GET_LOGS_BLOCK_RANGE_LIMIT=1000 # Max block range for eth_getLogs
# ETH_GET_TRANSACTION_COUNT_MAX_BLOCK_RANGE=1000 # Max block range for transaction count
# ETH_GET_BLOCK_BY_RESULTS_BATCH_SIZE=25 # Batch size for contract results
# MAX_BLOCK_RANGE=5 # Max block range greater than mirror node's latest block
# GET_RECORD_DEFAULT_TO_CONSENSUS_NODE=false # If true, get transaction record first queries consensus node
# CONSENSUS_MAX_EXECUTION_TIME=15000 # Max time in ms before TIMEOUT error
# SDK_REQUEST_TIMEOUT=10000 # Timeout for SDK execute() method
# SEND_RAW_TRANSACTION_SIZE_LIMIT=131072 # Max size for eth_sendRawTransaction (in bytes)
# FILE_APPEND_CHUNK_SIZE=5120 # Size of file chunks for FileAppendTransaction
# FILE_APPEND_MAX_CHUNKS=20 # Max chunks for FileAppendTransaction
# USE_ASYNC_TX_PROCESSING=true # If true, returns tx hash immediately after prechecks
# ========== HAPI CLIENT CONFIGURATION ==========
# HAPI_CLIENT_TRANSACTION_RESET=50 # Number of txs until client reinitialization
# HAPI_CLIENT_DURATION_RESET=3600000 # Time until client reinitialization (ms)
# HAPI_CLIENT_ERROR_RESET=[21,50] # Status codes triggering reinitialization
# HEDERA_SPECIFIC_REVERT_STATUSES=["WRONG_NONCE","INVALID_ACCOUNT_ID"] # Tx status identifying non-executed transactions
# ========== REDIS CONFIGURATION ==========
# REDIS_ENABLED=true # Enable Redis as shared cache
# REDIS_URL=redis://127.0.0.1:6379 # Redis connection URL
# REDIS_RECONNECT_DELAY_MS=1000 # Delay between reconnect retries
# MULTI_SET=false # Implementation for setting multiple K/V pairs
# ========== DEVELOPMENT & TESTING ==========
# DEV_MODE=false # Developer optimization mode
# LOG_LEVEL=trace # Logging level (trace, debug, info, warn, error, fatal)