Editing config.toml file

Editing config.toml file

In order to enable a new chain, a DSP must add the following to the config.toml environment variable file. This is the file that holds the environment variables for your DSP’s API instance. Each sidechain will need a new [sidechains.CHAIN_NAME] section. CHAIN_NAME - this is the account on the EOS mainnet that has registered with the liquidx.dsp contract as the chain’s name. This name can be found from the block producers of the chain, other DSPs, or the community.
1
# sidechain section, if no sidechains, leave as [sidechains], can add additional sidechains with [sidechains.newchain] ...
2
[sidechains]
3
[sidechains.test1]
4
# dsp
5
dsp_port = 3116 # dsp port to run new chain's services on, this is the port developers will push to, must be unique per new chain
6
dsp_account = "test1" # DSP Account on new chain
7
dsp_private_key = "" # DSP active private key on new chain
8
# nodeos
9
nodeos_host = "localhost" # nodeos host running new chain
10
nodeos_port = 8888 # nodeos host port
11
nodeos_secured = false # nodeos secured bool (true: https, false: http)
12
nodeos_chainid = "" # chainid of new chain
13
nodeos_websocket_port = 8887 # nodeos websocket port, can be same per nodeos instance
14
nodoes_latest = true # if using 2.0+ version of nodeos, true, if less than 2.0, false
15
webhook_dapp_port = 8113 # nodeos webhook port, must be unique per chain
16
# demux
17
demux_webhook_port = 3196 # port demux runs on, must be unique per new chain
18
demux_socket_mode = "sub"
19
demux_head_block = 1 # head block to sync demux from
20
# demux defaults to first pulling head block from toml file if postgres database is not set
21
# after database is set, defaults to database, to overwrite and default to toml file, pass true
22
demux_bypass_database_head_block = false
23
demux_max_pending_messages = 500 # amount of pending messages to add to the stack before disconnecting the demux websocket to allow pending messages to process
24
# sidechain
25
liquidx_contract = "liquidx.dsp" # liquidx contract on the EOS mainnet
26
name = "test1" # CHAIN_NAME - contract on the EOS mainnet that registered the new chain
27
# the mapping below contains the dappservices:dappservicex and mainnet DSP account to the new chain's DSP account mapping
28
mapping = "dappservices:dappservicex,uuddlrlrbass:uuddlrlrbass"
29
# [sidechains.ANOTHER_CHAIN_NAME]
30
# ...
Copied!
Once this has been configured, the environment variables for the DSP can be updated with:
1
systemctl stop dsp
2
cd $(readlink -f `which setup-dsp` | xargs dirname)
3
setup-dsp
4
systemctl start dsp
Copied!
You can also upgrade to the latest version of the DSP software by reinstalling the DSP, be sure to backup any logs you wish to preserve first.
Copy link