Running a Node

This part has been tested against Linux environment, so consider using Linux-based server.

To run a settlus node in production level, you need to setup your server with required spec. If you are interested in running a local node rather than participating in the Testnet or Mainnet, please refer to this page.

Hardware Requirements

  • 4 or more physical CPU cores

  • At least 16GB RAM

  • At least 500GB of SSD storage

Prerequisites

Running Settlus Node

You can run Settlus node and join a public testnet or public mainnet of Settlus through below steps.

Setting up

  1. Prepare the server that meets requirements.

  2. Copy the latest binary to the server, or build the binary from the source.

  3. Initialize Settlus configuration with settlusd init command, with relevant options.

# initialize at /.settlus
/settlusd init $MONIKER \
--chain-id $CHAIN_ID \ 
--home /.settlus \
--persistent-peers $PERSISTENT_PEERS
  • $MONIKER

    • human-readable name for your node, only accepts ASCII characters.

  • $CHAIN_ID

    • testnet: settlus_5372-1

  • $PERSISTENT_PEERS

    • Peer list to maintain persistent connections with. Find out the latest available seed list here.

If you need to sync the data, check sync section for more options.

  1. Copy relevant genesis file to initialized home, and set up additional configurations.

# Set up genesis file
mv /genesis.json /.settlus/config/genesis.json

# check the config file
cat /.settlus/config/config.toml
cat /.settlus/config/app.toml

Configuring the Node Using app.toml and config.toml

Two configuration files are automatically generated inside ~/.settlus/config after initialization:

  • config.toml: used to configure the CometBFT, learn more on the page

  • app.toml: generated by the Cosmos-SDK based application itself, and used to configure your app, such as state pruning strategies, telemetry, gRPC and REST servers configuration, state sync...

  1. Everything is ready, and start your node with start command

settlusd start

Cosmovisor

Instead of using settlusd start, it is highly recommended to use cosmovisor to manage the chain service, especially for upgrade convenience. Follow the instruction to get the cosmovisor binary. And define the service for cosmovisor.

Service definition example:

# /etc/systemd/system/cosmovisor.service

[Unit]
Description=Settlus
After=network.target
StartLimitIntervalSec=1

[Service]
Environment="HOME=/"
Environment="CHAIN_HOME=/.settlus"
Environment="DAEMON_HOME=/.settlus"
Environment="DAEMON_NAME=settlusd"
Restart=always
RestartSec=1
ExecStart=/usr/local/bin/cosmovisor run start --json-rpc.api eth,txpool,personal,net,debug,web3 --home $CHAIN_HOME

[Install]
WantedBy=multi-user.target

Ensure that the cosmovisor binary is located in the /usr/local/bin directory as indicated in the service definition. If your configuration differs, place the binary in the appropriate location and modify the example accordingly to match your setup. Now, start the cosmovisor service.

systemctl start cosmovisor.service

Sync

There are two main methods for new nodes to catch up with the state of an already advanced blockchain: Fast Sync and State Sync. Please refer to the respective pages to explore the detailed features of each method.

Settlus provides sync servers for state sync. After initialize, edit ~/.settlusd/config/config.toml like below:

# /.settlusd/config/config.toml

#######################################################
###           P2P Configuration Options             ###
#######################################################
[p2p]

# Comma separated list of seed nodes to connect to
seeds = "<seed-server-with-node-id>"

Monitoring sync

You can monitor the progress of the synchronization process by using the settlusd status command on the syncing node. Look SyncInfo field. latest_block_height and catching_up fields will indicate the current status of the sync process.

// settlusd status | jq '.SyncInfo'
{
    "latest_block_hash": "9A45E86C70F159B522D591F629534097676BF726603895D8E3D3EC559EFE8B99",
    "latest_app_hash": "E6355B4068E395F973E213F3B8751B01D2D678233C2AA2A18FFB7121DB526995",
    "latest_block_height": "1552349",
    "latest_block_time": "2024-05-03T08:27:48.719153177Z",
    ...
    "catching_up": false
}

Last updated