๐Ÿ‘ŸOperating and Running a Node

This is a guide for operating and running the node.

Contents

Running the Node Running the Node Yourself Running the Node Yourself Dockerized Docker Commands Running Stop and Start Running the Node with Cosmovisor

Running the Node

  • Individuals aiming to connect to an external node with SEDA.

  • Those who wish to establish their own node and/or set up the node as a validator.

sedad is the command-line tool for interfacing, or CLI for short, with the SEDA blockchain. You can check out the installation instructions here or see the Docker instructions here.

Now, you're all set to engage with the SEDA blockchain via an external node. For a rundown of commands, type sedad --help. For in-depth info on a particular command, add the --help flag, for example:

sedad --help 
sedad query --help 
sedad query bank --help 

Running the Node Yourself

# Rename the downloaded binary to a simpler name.
mv sedad-${ARCH} sedad
# mv sedad-amd64 sedad
# mv sedad-arm64 sedad

# Make the downloaded binary executable.
chmod +x sedad

# This documentation assumes that you have added the binary to $PATH as well.

# Reset the chain.
sedad tendermint unsafe-reset-all
rm -rf ~/.sedad || true

# Create your operator key.
sedad keys add <key-name>

# Initialize your node and join the network (optionally with an existing key using the recover flag).
sedad join <moniker> --network <devnet|testnet> [--recover]

# Start your node.
sedad start

Running the Node Yourself Dockerized

Docker support is currently limited for the SEDA testnet since it has undergone an upgrade. The SEDA team is planning to add state sync support for the Docker environment soon.

For instructions how to run the node yourself as a normal node or a validator in docker.

To pull the docker image check here.

This section will go over:

Docker Commands

Here's docker commands to show running the node, and executing commands so you can generate a key, and become a validator.

Running

To start a SEDA chain node with docker(we recommend knowing the tool if you go this route):

docker run -d --name seda_node \
-p 26656:26656 \
-p 26657:26657 \
-p 9090:9090 \
--env MONIKER=moniker_here
--env NETWORK=testnet
ghcr.io/sedaprotocol/seda-chain:latest sedad start

Exposing the ports is optional. As is providing a network as it defaults to testnet.

To check the status of the node you can check the normal docker way:

docker logs seda_node -n 100

or by interacting with the CLI from within the container:

docker exec seda_node sedad status

Stop and Start

The docker container should be stoppable and resumed as:

docker stop seda_node

# This runs it as a background process handled by docker.
docker start seda_node

Running the Node with Cosmovisor

Run the node as a subprocess of Cosmovisor if you want automatic upgrading, which only requires you to place a new binary in the right location before an upgrade height.

Install Cosmovisor.

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Then, add these lines to your profile (maybe .profile, .zprofile, or something else) to set up environment variables:

echo "# Cosmovisor Setup" >> ~/.profile
echo "export DAEMON_NAME=sedad" >> ~/.profile
echo "export DAEMON_HOME=$HOME/.sedad" >> ~/.profile
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=false" >> ~/.profile
echo "export DAEMON_LOG_BUFFER_SIZE=512" >> ~/.profile
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.profile
echo "export UNSAFE_SKIP_BACKUP=true" >> ~/.profile
source ~/.profile

Initialize Cosmovisor with the chain binary and start the node.

cosmovisor init sedad
cosmovisor run start

Note that for an upgrade, simply run the following command to prepare Cosmovisor with the upgrade binary before the chain reaches the upgrade height.

cosmovisor add-upgrade <upgrade-name> <upgrade-binary-file>

License Contents of this repository are open source under GNU General Public License v3.0.

Last updated