Configuration
The validator node loads configuration settings from the following files:
node.yml
, which stores the configuration for the node (private keys, database configurations, etc.)bridge.yml
, which stores the configuration for the hashport Portal (HCS topic, Portal configuration, EVM networks and their router contracts)
Some configuration settings may have appropriate defaults, such as database configurations (under the validator.database
scope) that can be left unchanged.
Some important settings to configure are:
- node endpoints
- private keys
- account and topic ids
- contract address
tip
It is strongly recommended that you change the default password set in validator.database.password
.
By default, the node loads two 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 in these files.
Properties
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.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 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.mirror_node.api_address | https://testnet.mirrornode.hedera.com/api/v1/ | The Hedera Rest 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.log_level | info | The log level of the validator. Possible values: info , debug , trace case insensitive. |
node.port | 5200 | The port on which the application runs. |
node.validator | true | The primary mode in which the application will run. If set to true , the application will make write operations (HCS submission, Scheduled Transactions). If set to false , the application will be in a read-only mode, searching for transactions/messages from the other validators in the networks. |
config/bridge.yml
Name | Default | Description |
---|---|---|
bridge.topic_id | "" | The topic id, which the validators will use to monitor and submit consensus messages to. |
bridge.networks[i] | "" | The id of the network. 0 stands for Hedera. Every other id must be the chainId of the EVM network. Used as a key for the following bridge.networks[i].* configuration fields below. |
bridge.networks[i].bridge_account | "" | The account id validators use to monitor for incoming transfers. Applies only for network with id 0 . Also, serves as a distributor for Hedera transfers (validator fees and ported amounts). |
bridge.networks[i].payer_account | "" | The account id paying for Hedera transfers fees. Applies only for network with id 0 . |
bridge.networks[i].members | [] | The Hedera account ids of the validators, to which their service fees will be sent. Applies only for network with id 0 . If the Portal 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 network with id 0 . |
bridge.networks[i].tokens[j] | "" | The Address/HBAR/Token ID of the native asset for the given network. Used as a key to for the following bridge.networks[i].tokens[j].* configuration fields below. |
bridge.networks[i].tokens[j].fee_percentage | "" | The percentage which validators take for every Portal transfer. Applies only for assets from network with id 0 . 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[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 0 (i ) has a wrapped version on 80001 (k ), which is 0x95341E9cf3Bc3f69fEBfFC0E33E2B2EC14a6F969 . |