Bootstrap a Cosmos SDK chain

Bootstrap a Cosmos SDK chain

Bootstrap an Example Chain

There are two examples, I would make here:

  • Bootstrap a blockchain running on your local host. Basically do all the code you need to get an example testchain up and running.
  • Bootstrap a node to an existing network. (I will link to this when published).

By "Bootstrap" I simply mean run a shell script that will input all the commands for you into your shell. That word may be more appropriate for the latter example above.

Here is the code to bootstrap a blockchain chain on your local network. Copy and paste the code below into a shell script called bootstrap_example.sh

#!/bin/bash
# This Script is intended to be installed on a VPS either is root or you have already created a user name and have proper SSH access privileges. 
sudo apt update -y
sudo apt install build-essential -y
sudo apt install gcc -y
sudo apt install git -y
sudo apt install wget -y
sudo apt install curl -y

#you can manually add these to your $PROFILE later
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:~/go/bin


#On Linux
sudo wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz
#unpack it
sudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
source ~/.bashrc
go version
#should output golang 1.21.6

curl https://get.ignite.com/cli | bash
sudo mv ignite /usr/local/bin
git clone https://github.com/ignite/example.git
cd example
ignite chain serve

save the file

Create am executable:

chmod +x bootstrap_example.sh

Run the shell script with the following command:

./bootstrap.sh

Later on I will create a testnet and will show you how to connect to that test network as full node.