Running a main network node

1/ Initialize your node

Replace <moniker> by the node name of your choice

$ lumd init <moniker> --chain-id lum-network-1

2/ Edit the config files

$ nano ~/.lumd/config/config.toml

Search for "seed_peers" and replace the value as following:

seeds = "19ad16527c98b782ee35df56b65a3a251bd99971@peer-1.mainnet.lum.network:26656"

Once opened, search for "persistent_peers" and replace the value as following:

persistent_peers = "b47626b9d78ed7ed3c413304387026f907c70cbe@peer-0.mainnet.lum.network:26656,5ea36d78ae774c9086c2d3fc8b91f12aa4bf3029@46.101.251.76:26656,a7f8832cb8842f9fb118122354fff22d3051fb83@3.36.179.104:26656,9afac13ba62fbfaf8d06867c30007162511093c0@54.214.134.223:26656,433c60a5bc0a693484b7af26208922b84773117e@34.209.132.0:26656,8fafab32895a31a0d7f17de58eddb492c6ced6d1@185.194.219.83:36656,c06eae3d9ea779710bca44e03f57e961b59d63f1@82.65.223.126:46656,4166de0e7721b6eec9c776abf2c38c40e7f820c5@202.61.239.130:26656,5a29947212a2615e43dac54deb55356a162e173a@35.181.76.160:26656,2cda4d97de0449878da10e456b176dd0720fbcec@62.171.129.174:26656"

Get the genesis file and put it in ~/.lumd/config/genesis.json (you can replace it if one was generated automatically) and double check the sha256sum.

$ curl -s  https://raw.githubusercontent.com/lum-network/mainnet/master/genesis.json > ~/.lumd/config/genesis.json

$ sha256sum ~/.lumd/config/genesis.json
3bbbd7aff6c545126d869fc683f6344e65ae71b048b25540826cd2f3be91a24c

2-bis/ Synchronize from latest up-to-date state machine

You are offered a possibility to avoid syncing every single code / state machine upgrade by using ChainLayer's QuickSync service.

You can find relevant URLs and hashes here: https://quicksync.io/networks/lum.html

Different versions are available:

  • Pruned: lightweight version of the state machine, only contains recent blocks / transactions in full

  • Default: standard version of the state machine

When using the commands provided by QuickSync, please make sure that you edit the relevant paths and other configuration according to your setup.

3/ Start your node

$ lumd start

You will now notice that the node starts to sync the blockchain history.

But, as soon as you quit the SSH screen or close the window, you will kill it. To avoid doing this launch it in a daemon process:

$ sudo nano /etc/systemd/system/lumd.service

Copy and paste the following and update <YOUR_HOME_PATH>:

[Unit]
Description=Lum Network daemon
After=network-online.target

[Service]
User=lum
ExecStart=/<YOUR_HOME_PATH>/go/bin/lumd start --p2p.laddr tcp://0.0.0.0:26656 --home /<YOUR_HOME_PATH>/.lumd
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target

Enable and start the new service:

$ sudo systemctl enable lumd
$ sudo systemctl start lumd

Check your node status:

$ lumd status

Check your node logs:

$ journalctl -u lumd -f

Last updated