Skip to content

Commit

Permalink
fix: updated properly default values to all global configs
Browse files Browse the repository at this point in the history
Signed-off-by: Logan Nguyen <[email protected]>
  • Loading branch information
quiet-node committed Jan 31, 2025
1 parent 5b6898e commit 9102f73
Show file tree
Hide file tree
Showing 55 changed files with 251 additions and 344 deletions.
12 changes: 10 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Unless you need to set a non-default value, it is recommended to only populate o
| `OPERATOR_KEY_FORMAT` | "DER" | Operator private key format. Valid types are `DER`, `HEX_ECDSA`, or `HEX_ED25519` |
| `OPERATOR_KEY_MAIN` | "" | Operator private key used to sign transactions in hex encoded DER format. This may be either an ED22519 private key or an ECDSA private key. The private key must be associated with/used to derive `OPERATOR_ID_MAIN`. |
| `RATE_LIMIT_DISABLED` | "false" | Flag to disable IP based rate limiting. |
| `REQUEST_ID_IS_OPTIONAL` | "" | Flag to set it the JSON RPC request id field in the body should be optional. Note, this breaks the API spec and is not advised and is provided for test purposes only where some wallets may be non compliant |
| `REQUEST_ID_IS_OPTIONAL` | "false" | Flag to set it the JSON RPC request id field in the body should be optional. Note, this breaks the API spec and is not advised and is provided for test purposes only where some wallets may be non compliant |
| `SERVER_PORT` | "7546" | The RPC server port number to listen for requests on. Currently a static value defaulting to 7546. See [#955](https://github.com/hashgraph/hedera-json-rpc-relay/issues/955) |
| `SERVER_HOST` | undefined | The hostname or IP address on which the server listens for incoming connections. If `SERVER_HOST` is not configured or left undefined (same as `0.0.0.0`), it permits external connections by default, offering more flexibility. |
| `SERVER_REQUEST_TIMEOUT_MS` | "60000" | The time of inactivity allowed before a timeout is triggered and the socket is closed. See [NodeJs Server Timeout](https://nodejs.org/api/http.html#serversettimeoutmsecs-callback) |
Expand All @@ -57,13 +57,14 @@ Unless you need to set a non-default value, it is recommended to only populate o
| `CONTRACT_CALL_GAS_LIMIT` | "50_000_000" | Maximum gas limit applied to eth_call endpoint networks, the Relay will accept up to 50M but keep it capped at 15M for the actual call. |
| `CONSENSUS_MAX_EXECUTION_TIME` | "15000" | Maximum time in ms the SDK will wait when submitting a transaction/query before throwing a TIMEOUT error. |
| `DEFAULT_RATE_LIMIT` | "200" | default fallback rate limit, if no other is configured. |
| `ETH_CALL_ACCEPTED_ERRORS` | "[]" | A list of acceptable error codes for eth_call requests. If an error code in this list is returned, the request will be retried. |
| `ETH_CALL_CACHE_TTL` | "200" | Maximum time in ms to cache an eth_call response. |
| `ETH_BLOCK_NUMBER_CACHE_TTL_MS` | "1000" | Time in ms to cache response from mirror node |
| `ETH_GET_BALANCE_CACHE_TTL_MS` | "1000" | Time in ms to cache balance returned |
| `ETH_GET_BLOCK_BY_RESULTS_BATCH_SIZE` | "25" | The number of contract results to request from the Mirror Node per batch durin an eth_getBlockByHash or eth_getBlockByNumber call |
| `ETH_GET_GAS_PRICE_CACHE_TTL_MS` | "1_800_000" | Time in ms to cache ethGasPrice returned |
| `ETH_CALL_DEFAULT_TO_CONSENSUS_NODE` | "false" | Flag to set if eth_call logic should first query the mirror node. |
| `ETH_CALL_CONSENSUS_SELECTORS` | [""] | A comma-separated list of special transaction selectors that should always be routed to the Consensus node. |
| `ETH_CALL_CONSENSUS_SELECTORS` | "[]" | A comma-separated list of special transaction selectors that should always be routed to the Consensus node. |
| `ETH_GET_LOGS_BLOCK_RANGE_LIMIT` | "1000" | The maximum block number range to consider during an eth_getLogs call. |
| `ETH_GET_TRANSACTION_COUNT_MAX_BLOCK_RANGE` | "1000" | The maximum number of transactions to return when running eth_getBlockByHash or eth_getBlockByNumber with transaction objects set to true call. |
| `FEE_HISTORY_MAX_RESULTS` | "10" | The maximum number of results to returns as part of `eth_feeHistory`. |
Expand All @@ -90,6 +91,13 @@ Unless you need to set a non-default value, it is recommended to only populate o
| `MIRROR_NODE_RETRY_DELAY` | "2000" | The delay in ms between retry requests. |
| `MIRROR_NODE_RETRIES_DEVMODE` | "5" | The maximum number of retries on a GET request to the mirror node when an acceptable error code is returned in dev mode. |
| `MIRROR_NODE_RETRY_DELAY_DEVMODE` | "200" | The delay in ms between retry requests in dev mode. |
| `MIRROR_NODE_TIMEOUT` | 1000 | The maximum time in ms to wait for a response from the mirror node before timing out. |
| `MIRROR_NODE_MAX_REDIRECTS` | 5 | The maximum number of redirects allowed when making requests to the mirror node before timing out. |
| `MIRROR_NODE_MAX_REDIRECTS` | 5 | The maximum number of redirects allowed when making requests to the mirror node before timing out. |
| `MIRROR_NODE_HTTP_KEEP_ALIVE` | true | Flag indicating whether to keep HTTP connections alive for requests to the mirror node. |
| `MIRROR_NODE_HTTP_KEEP_ALIVE_MSECS` | 1000 | The maximum time in milliseconds to keep HTTP connections alive for requests to the mirror node. |
| `MIRROR_NODE_HTTP_MAX_SOCKETS` | 300 | The maximum number of sockets to be used for HTTP connections to the mirror node. |
| `MIRROR_NODE_HTTP_MAX_TOTAL_SOCKETS` | 300 | The maximum number of total sockets to be used for HTTP connections to the mirror node. |
| `MIRROR_NODE_URL` | "" | The Mirror Node API endpoint. Official endpoints are Previewnet (https://previewnet.mirrornode.hedera.com), Testnet (https://testnet.mirrornode.hedera.com), Mainnet (https://mainnet-public.mirrornode.hedera.com). See [Mirror Node REST API](https://docs.hedera.com/hedera/sdks-and-apis/rest-api) |
| `MIRROR_NODE_URL_HEADER_X_API_KEY` | "" | Authentication for a `MIRROR_NODE_URL` that requires authentication via the `x-api-key` header. |
| `MIRROR_NODE_REQUEST_RETRY_COUNT` | "10" | Maximun amount of retries to repeat on `GetContractResults` `contracts/results/)` requests when fetching contract results after eth_sendRawTransaction submission. \*Note that this in addition and multiplies the configured Axios retries values. |
Expand Down
Loading

0 comments on commit 9102f73

Please sign in to comment.