Run a Full Node

Run a Full Node

How to run a full node of Side Protocol V1.

Setting up the keyring (Optional)

The keyring holds the private/public keypairs used to interact with a node. For instance, a validator key needs to be set up before running the blockchain node, so that blocks can be correctly signed. The private key can be stored in different locations, called "backends", such as a file or the operating system's own key storage.

Available backends for the keyring
1. The os backend
2. The file backend
3. The pass backend
4. The kwallet backend
5. The test backend
6. The memory backend
You can visit https://docs.cosmos.network/v0.47/user/run-node/keyring for more details

export SIDED_KEYRING_BACKEND=os

Adding keys to the keyring

sided keys add test --key-type="segwit"

- address: tb1q0xm60dd99hucpkux7rq6vr57g7k479nlw0xapt
  name: test
  pubkey: '{"@type":"/cosmos.crypto.segwit.PubKey","key":"A6gxg+M4sEu0MBFiYlj4r2fEaz/ueeaNE7ymf8Zx+Tqq"}'
  type: local

This command generates a new 24-word mnemonic phrase, persists it to the relevant backend, and outputs information about the keypair. If this keypair will be used to hold value-bearing tokens, be sure to write down the mnemonic phrase somewhere safe!

By default, the keyring generates a secp256k1 keypair. The keyring also supports Native Segwit and Taproot keys, which may be created by passing the --key-type=segwit or --key-type=taproot flag . A keyring can of course hold three types of keys simultaneously, and the Cosmos SDK's x/auth module supports natively these three public key algorithms.

Note: Avoid using the Taproot address for running the validator node. If you opt for a Segwit address, you can utilize Bitcoin wallets such as OKX Wallet and Unisat. However, if you choose a secp256k1 address, you must use Cosmos wallets such as Keplr and Leap.

Query your local keys:

sided keys list

Initialize the Node

Before actually running the node, we need to initialize the blockchain, and most importantly its genesis file. This is done with the init subcommand: Use sided to initialize your node:

sided init <MY_SIDE_VALIDATOR> --chain-id=grimoria-testnet-1

The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network. All these configuration files are in ~/.side by default, but you can overwrite the location of this folder by passing the --home flag.

The ~/.side folder has the following structure:

.                                   # ~/.side
  |- data                           # Contains the databases used by the node.
  |- config/
      |- app.toml                   # Application-related configuration file.
      |- config.toml                # CometBFT-related configuration file.
      |- genesis.json               # The genesis file.
      |- node_key.json              # Private key to use for node authentication in the p2p protocol.
      |- priv_validator_key.json    # Private key to use as a validator in the consensus protocol.

Configuring the Node Using app.toml and config.toml

The Cosmos SDK automatically generates two configuration files inside ~/.side/config:

  • config.toml: used to configure the CometBFT, learn more on CometBFT's documentation,

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

Both files are heavily commented, please refer to them directly to tweak your node.

Downloading the genesis file

Download the genesis file and replace your local one.

wget https://raw.githubusercontent.com/sideprotocol/testnet/main/grimoria-testnet-1/genesis.json -O $HOME/.side/config/genesis.json

Adding seeds and persistent peers

Open the config.toml to edit the seeds and persistent peers:

cd $HOME/.side/config
nano config.toml

Modify the seed node or persistence node configuration by referring to the seeds and persistence details provided in the file

persistent_peers = "6bef0693d7a31fed473b95123ad19b544b414093@202.182.119.24:26656,44f8009ed91fddd7ee51117482ede20fb4f33e78@149.28.156.79:26656"

Setting up minimum gas prices

Open app.toml, find minimum-gas-prices, which defines the minimum gas prices the validator node is willing to accept for processing a transaction. Make sure to edit the field with some value, for example 0.005uside,

 # The minimum gas prices a validator is willing to accept for processing a
 # transaction. A transaction's fees must meet the minimum of any denomination
 # specified in this config (e.g. 0.25token1;0.0001token2).
 minimum-gas-prices = "0.005uside"

Start Node and Sync

sided tendermint unsafe-reset-all 
sided start

Last updated