Config files
There are many flags and commands that can be provided to Etn-sc on startup to influence how your node will behave. It is often convenient to configure these options in a file rather than typing them out on the command line every time you start your node. This can be done using a simple shell script to start Etn-sc.
There are also other configuration options that are not accessible from the command line but can be adjusted by providing Etn-sc with a config file. This gives access to lower level configuration that influences how some of Etn-sc's internal components behave.
Shell scripts
The benefit of writing a shell script for starting a Etn-sc node is that it is more easily repeatable and you don't have to remember lots of syntax for making a node behave in a certain way. This is especially useful for running multiple nodes with their own specific configurations.
To create a shell script, save the Etn-sc startup commands in a shell file, prepended with #!/bin/bash
. The contents of the file might look like this:
Save the file as (e.g.) start-etn-sc.sh. Then make the file executable using
Now you can start Etn-sc using this shell script instead of having to create the startup configuration from scratch each time:
Config files
It is also possible to tweak the deeper configuration via a config file. The config file is more complex than a shell script but it can touch parts of the internal configuration structure of Etn-sc that are not accessible through the command line interface.
The config file should be a .toml
file. A convenient way to create a config file is to get Etn-sc to create one for you and use it as a template. To do this, use the dumpconfig
command, saving the result to a .toml
file. Note that you also need to explicitly provide the network_id
on the command line for the public testnet:
You can change the values in this file and then pass it to Etn-sc on startup so that the node is configured exactly as you want it. To override an option specified in the configuration file, specify the same option on the command line.
To run Etn-sc with the configuration defined in etn-sc-config.toml
, pass the config file path to --config
. The network_id
is not persisted from the config file; it has to be explicitly defined on the command line on startup, for example:
Config file example
The config file created using dumpconfig
contains the following information (this example is for the testnet - Mainnet and other network configurations will be slightly different):
Last updated