The application supports loading configuration from the following files:
node.yml
file, which stores the configuration for the node (private keys, database configuration, etc.)bridge.yml
file, which stores the configuration for the bridge (HCS topic, Hedera bridge configuration, EVM networks and their router contracts)..env
file, which stores the variables used in thedocker-compose.yml
(application version, database credentials - username and password).
Some configuration settings have appropriate defaults (e.g. database configuration) that can be left unchanged. On the other hand, important configuration settings like blockchain node endpoints, private keys, account and topic ids, contract addresses and others have to be set, as they control the behaviour of the application. Additionally, password properties have a default, but it is strongly recommended passwords to be changed from the default.
By default, the application loads files named config/node.yml
and config/bridge.yml
.
The following table lists the currently available properties, along with their default values. Unless you need to set a non-default value, it is recommended to only populate overwritten properties.
Configuration for config/node.yml
:
Name | Default | Description |
---|---|---|
node.database.host |
127.0.0.1 | The IP or hostname used to connect to the database. |
node.database.name |
hedera_validator | The name of the database. |
node.database.password |
validator_pass | The database password the processor uses to connect. |
node.database.port |
5432 | The port used to connect to the database. |
node.database.username |
validator | The username the processor uses to connect to the database. |
node.clients.evm[] |
"" | The chain id of the EVM network. Used as a key for the following node.clients.evm[i].* configuration fields below. |
node.clients.evm[].block_confirmations |
"" | The number of block confirmations to wait for before processing an event for the given EVM network. |
node.clients.evm[].node_url |
"" | The endpoint of the node for the given EVM network. |
node.clients.evm[].private_key |
"" | The private key for the given EVM network. |
node.clients.evm[].start_block |
0 | The block from which the application will monitor for events for the given network. If specified, it will start in its primary mode (check node.validator ) from the given block. If not specified, it will start in read-only mode from the latest saved block in the database to the current block at runtime (now ) and then continue in its primary mode. |
node.clients.evm[].polling_interval |
15 | How often (in seconds) the evm client will poll the network for upcoming events. |
node.clients.evm[].max_logs_blocks |
500 | The maximum amount of blocks range per query when filtering events. |
node.clients.hedera.operator.account_id |
"" | The operator's Hedera account id. |
node.clients.hedera.operator.private_key |
"" | The operator's Hedera private key. |
node.clients.hedera.network |
testnet | Which Hedera network to use. Can be either mainnet , previewnet , testnet . |
node.clients.hedera.start_timestamp |
0 | The timestamp Nano sec from which the Hedera Transfer and Hedera Message watchers will begin. If specified, the Hedera Transfers and Messages will begin listening in its primary mode (check node.validator ) from the given timestamp. If not specified, the HT and Messages will run in read-only mode from the latest saved timestamp in the database to the moment the application has been run (now ) and then continue in its primary mode. |
node.clients.hedera.rpc[] |
[] | A list of Hedera rpc node urls, in the format {rpc_url}:{node_account_ID} for the given network. If no list is provided, it will take the SDK's default node list for the given network. |
node.clients.hedera.max_retry |
20 | The maximum retry attempts for hedera node transactions |
node.clients.mirror_node.api_address |
https://testnet.mirrornode.hedera.com/api/v1/ | The Hedera Mirror Node REST V1 API root endpoint. Depending on the Hedera network type, this will need to be changed. |
node.clients.mirror_node.client_address |
hcs.testnet.mirrornode.hedera.com:5600 | The HCS Mirror node endpoint. Depending on the Hedera network type, this will need to be changed. |
node.clients.mirror_node.polling_interval |
5 | How often (in seconds) the application will poll the mirror node for new transactions. |
node.clients.mirror_node.query_max_limit |
100 | The mirror node's maximum allowed limit (pagination) per query |
node.clients.mirror_node.query_default_limit |
25 | The mirror node's default limit (pagination) per query |
node.clients.mirror_node.request_timeout |
15 | The timeout for requests to mirror node |
node.clients.mirror_node.retry_policy.max_retry |
10 | The max attempts to retry for mirror node calls |
node.clients.mirror_node.retry_policy.min_wait |
1 | The min wait time on rate limit in seconds |
node.clients.mirror_node.retry_policy.max_wait |
60 | The max wait time on rate limit in seconds |
node.clients.mirror_node.retry_policy.max_jitter |
0 | The max jitter time applied on rate limited requests in seconds |
node.monitoring.enable |
false | Enables the node's monitoring |
node.monitoring.dashboard_polling |
0 | How often (in minutes) the application will send monitoring stats |
node.log_format |
default | Can either be "default" or "gcp". Sets the format of the log messages |
node.log_level |
info | Sets the severity level of the log messages |
node.gauge_reset_pass |
"" | Sets the password for user_get_his_token gauge reset |
Configuration for config/bridge.yml
:
Name | Default | Description |
---|---|---|
bridge.use_local_config |
false | If use_local_config is true it keeps using the local config, if it is false it will fetch the bridge config from the topic and will start a watcher to keep it updated. |
bridge.config_topic_id |
"" | The topic id, which the validators will use to fetch the bridge config's tokens if bridge.use_local_config is false . |
bridge.polling_interval |
"" | The polling interval used by the bridge-config watcher when bridge.use_local_config is false . |
bridge.topic_id |
"" | The topic id, which the validators will use to monitor and submit consensus messages to. |
bridge.blacklist |
[] | List of blacklisted hedera account ID's. |
bridge.monitored_accounts[i] |
"" | A mapping for all monitored accounts with prometheus where the key is the name of the account and value is the hedera_account_id . |
bridge.networks[i] |
"" | The EVM chainId (For Hedera - 295 is mainnet and 296 is for testnet). Used as a key for the following bridge.networks[i].* configuration fields below. |
bridge.networks[i].name |
"" | The name of the network. In ex. "Hedera". |
bridge.networks[i].bridge_account |
"" | The account id validators use to monitor for incoming transfers. Applies only for Hedera networks. Also, serves as a distributor for Hedera transfers (validator fees and bridged amounts). |
bridge.networks[i].payer_account |
"" | The account id paying for Hedera transfers fees. Applies only for Hedera networks. |
bridge.networks[i].members |
[] | The Hedera account ids of the validators, to which their bridge fees will be sent. Applies only for Hedera networks. If the bridge accepts Hedera Native Tokens, each member will need to have an association with the given token. |
bridge.networks[i].router_contract_address |
"" | The address of the Router contract on the EVM network. Ignored for Hedera networks. |
bridge.networks[i].tokens.fungible[j] |
"" | The Address/HBAR/Token ID of the native fungible asset for the given network. Used as a key to for the following bridge.networks[i].tokens.fungible[j].* configuration fields below. |
bridge.networks[i].tokens.fungible[j].min_fee_amount_in_usd |
"" | The minimum fee amount in USD which is needed in order the validator do work without a loss. |
bridge.networks[i].tokens.fungible[j].fee_percentage |
"" | The percentage which validators take for every bridge transfer. Applies only for assets from Hedera networks. Range is from 0 to 100.000 (multiplied by 1 000). Examples: 1% is 1 000, 1.234% = 1234, 0.15% = 150. Default 10% = 10 000 |
bridge.networks[i].tokens.fungible[j].networks[k] |
"" | A key-value pair representing the id and wrapped asset to which the token j has a wrapped representation. Example: TokenID 0.0.2473688 (j ) on Network 296 (i ) has a wrapped version on 80001 (k ), which is 0x95341E9cf3Bc3f69fEBfFC0E33E2B2EC14a6F969 . |
bridge.networks[i].tokens.fungible[j].coin_gecko_id |
"" | CoinGecko id used for getting token info from the CoinGecko Web API |
bridge.networks[i].tokens.fungible[j].coin_market_cap_id |
"" | CoinMarketCap id used for getting token info from the CoinMarketCap Web API |
bridge.networks[i].tokens.fungible[j].min_amount |
"" | The static minimum amount for token used when there is no 'coin_gecko_id' and 'coin_market_cap_id' supplied for the token. |
bridge.networks[i].tokens.fungible[j].release_timestamp |
0 | The release timestamp to be returned from the api. |
bridge.networks[i].tokens.nft[j] |
"" | The Address/HBAR/Token ID of the native nft asset for the given network. Used as a key to for the following bridge.networks[i].tokens.nft[j].* configuration fields below. |
bridge.networks[i].tokens.nft[j].fee |
0 | The HBAR fee (in tinybars), which validators take for every nft bridge transfer. Applies only for assets from Hedera networks. Default fee is 0, which is not supported. |
bridge.networks[i].tokens.nft[j].fee_amount_in_usd |
"" | The HBAR fee (in USD), which validators take for every nft bridge transfer. Applies only for assets from Hedera networks. Ignored if bridge.networks[i].tokens.nft[j].fee is provided. |
bridge.networks[i].tokens.nft[j].networks[k] |
"" | A key-value pair representing the id and wrapped asset to which the token j has a wrapped representation. Example: TokenID 0.0.2473688 (j ) on Network 296 (i ) has a wrapped version on 80001 (k ), which is 0x95341E9cf3Bc3f69fEBfFC0E33E2B2EC14a6F969 . |
bridge.networks[i].tokens.nft[j].release_timestamp |
0 | The release timestamp to be returned from the api. |
Configuration for .env
:
Name | Default | Description |
---|---|---|
TAG |
"latest" | The version of the validator application image |
POSTGRES_USER |
"validator" | The username for the database. To be the same as the one in node.yml . |
POSTGRES_PASSWORD |
"validator_pass" | The password for the database. To be the same as the one in node.yml . |