Skip to content

Commit dd92e58

Browse files
committed
Update README.md
1 parent fa789e6 commit dd92e58

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Below is the list of configuration parameters for all clients. Clients that are
4444

4545
```toml
4646
[db]
47-
host = "localhost" # MySql db address, or env variable DB_HOST
47+
host = "localhost" # MySql db address, env DB_HOST
4848
port = 3306 # MySql db port, env DB_PORT
4949
database = "flare_indexer" # database name, env DB_DATABASE
5050
username = "indexeruser" # db username, env DB_USERNAME
@@ -58,15 +58,16 @@ max_file_size = 10 # max file size before rotating, in MB
5858
console = true # also log to console
5959

6060
[metrics]
61-
prometheus_address = "localhost:2112" # expose indexer metrics to this address (empty value does not expose this endpoint)
61+
prometheus_address = "localhost:2112" # expose indexer metrics to this address (empty value does not expose this endpoint), env PROMETHEUS_ADDRESS
6262

6363
[chain]
64-
node_url = "http://localhost:9650/" # node indexer address
65-
address_hrp = "localflare" # HRP (human readable part) of chain -- used to properly encode/decode addresses
66-
chain_id = 162 # chain id
67-
eth_rpc_url = "http://localhost:9650/ext/C/rpc" # Ethereum RPC URL
68-
api_key = "" # API key (in case the node is protected by API key), adds ?x-apikey=... to all requests if not empty
69-
private_key_file = "../credentials/pk.txt" # file containing the private key of an account (for voting and mirroring clients), in hex
64+
node_url = "http://localhost:9650/" # node indexer address, env CHAIN_NODE_URL
65+
address_hrp = "localflare" # HRP (human readable part) of chain -- used to properly encode/decode addresses, env CHAIN_ADDRESS_HRP
66+
chain_id = 162 # chain id, env CHAIN_ID
67+
eth_rpc_url = "http://localhost:9650/ext/C/rpc" # Ethereum RPC URL, env ETH_RPC_URL
68+
api_key = "" # API key (in case the node is protected by API key), adds ?x-apikey=... to all requests if not empty, env API_KEY
69+
private_key = "" # private key in hex (deprecated, use private_key_file instead), env PRIVATE_KEY
70+
private_key_file = "../credentials/pk.txt" # file containing the private key of an account (for voting and mirroring clients), in hex, env PRIVATE_KEY_FILE
7071

7172
[p_chain_indexer]
7273
enabled = true # enable p-chain indexing
@@ -78,20 +79,21 @@ start_index = 0 # start indexing at this block height
7879
enabled = false # enable uptime monitoring cronjob
7980
timeout = "10s" # call uptime service on every ...
8081
enable_voting = true # enable voting for connected validators
81-
start = "2021-08-01T00:00:00Z" # start of the uptime voting epoch, supports also unix timestamp as a number
82-
period = "90s" # length of the epoch
82+
start = "2021-08-01T00:00:00Z" # start of the uptime voting epoch, supports also unix timestamp as a number, env UPTIME_EPOCH_START
83+
period = "90s" # length of the epoch, env UPTIME_EPOCH_PERIOD
84+
first = 0 # first epoch number, env UPTIME_EPOCH_FIRST
8385
delay = "10" # min delay in seconds to send the vote after the epoch ends
8486
uptime_threshold = 0.8 # minimum uptime ratio in the epoch for a validator to be considered connected
8587
delete_old_uptimes_epoch_threshold = 5 # delete uptimes older than this epoch
8688

8789
[voting_cronjob]
8890
enabled = false # enable voting client
8991
timeout = "10s" # check for new epochs every ...
90-
first = 12345 # first epoch to vote for
92+
first = 12345 # first epoch to vote for, env EPOCH_FIRST
9193
delay = "10s" # min delay in seconds to send the vote after the epoch ends
9294

9395
[voting_cronjob.gas]
94-
gas_limit = 120000 # Gas limit to set for the transaction execution (empty = estimate)
96+
gas_limit = 120000 # Gas limit to set for the transaction execution (0 = estimate), env VOTING_GAS_LIMIT
9597

9698
# type 0 transaction options
9799
# gas_price = ... # Create type 0 transaction: gas price to use for the transaction execution (empty = gas price oracle)
@@ -107,14 +109,16 @@ first = 12345 # first epoch to mirror
107109
delay = "10s" # min delay in seconds to send the vote after the epoch ends
108110

109111
[mirroring_cronjob.gas]
110-
gas_limit = 1000000
112+
gas_limit = 1000000 # env MIRRORING_GAS_LIMIT
111113
# see voting_cronjob.gas for other gas options
112114

113115
[contract_addresses]
114-
voting = "0xf956df3800379fdFA31D0A45FDD5001D02F4109c" # voting contract address
115-
mirroring = "0xE64Df6a7e4f4c277C5299f0FE12D7BbB8A207175" # mirror contract address
116+
voting = "0xf956df3800379fdFA31D0A45FDD5001D02F4109c" # voting contract address, env VOTING_CONTRACT_ADDRESS
117+
mirroring = "0xE64Df6a7e4f4c277C5299f0FE12D7BbB8A207175" # mirror contract address, env MIRRORING_CONTRACT_ADDRESS
116118
```
117119

120+
**Note:** Environment variables always override values set in the TOML config file.
121+
118122
### Deployment configuration
119123

120124
Configuration files for deployment of the voting client can be found in [docker/indexer/config_flare_voting.toml](docker/indexer/config_flare_voting.toml) (for mainnet) and [docker/indexer/config_costwo_voting.toml](docker/indexer/config_costwo_voting.toml) (for coston2). Note that database credentials and chain addresses are not included in the config files. You can use these files as a template of your own config files or use the corresponding environment variables to override the given values.

0 commit comments

Comments
 (0)