Node setup for Composable Testnet

Node setup requres some basic knowlage of Linux OS and server managment. Setting up the node can be daunting and chalanging task. This is a short guide how to set up the node.

Update the system and install the essentials:

sudo apt update && sudo apt full-upgrade -y && apt install build-essential 
sudo apt install vim /or apt install nano 
sudo apt install entr jq make git ufw wget 

Install GO and Cosmovisor

sudo rm -r /usr/local/go/
wget https://golang.org/dl/go1.22.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.3.linux-amd64.tar.gz
rm go1.22.3.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.bashrc
echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME./bashrc
source $HOME/.bashrc
 
# Install cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
sudo mv ~/go/bin/cosmovisor /usr/local/bin

Clone the repository and install node binary

cd $HOME 
git clone https://github.com/ComposableFi/composable-cosmos.git
cd composable-cosmos 
git checkout v7.0.3 # always doublecheck from the official team for the right version
make install

Set up cosmovisor

mkdir -p $HOME/.banksy/cosmovisor/genesis/bin
mkdir -p $HOME/.banksy/cosmovisor/upgrades
mv $HOME/go/bin/picad $HOME/.banksy/cosmovisor/genesis/bin/
sudo ln -s $HOME/.banksy/cosmovisor/genesis $HOME/.banksy/cosmovisor/current -f
sudo ln -s $HOME/.banksy/cosmovisor/current/bin/picad /usr/local/bin/picad -f
 
# Create service file
 
sudo tee /etc/systemd/system/picad.service > /dev/null <<EOF
[Unit]
Description=”Composable node”
After=network-online.target
 
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
WorkingDirectory=$HOME/.banksy
Restart=on-failure 
RestartSec=5
LimitNOFILE=65535
Environment=”DAEMON_NAME=picad”
Environment=”DAEMON_HOME=$HOME/.banksy”
Environment=”DAEMON_ALLOW_DOWNLOAD_BINARIES=false”
Environment=”DAEMON_RESTART_AFTER_UPGRADE=true”
Environment=”UNSAFE_SKIP_BACKUP=true”
Environment=”PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.banksy/cosmovisor/current/bin”
 
[Install]
WantedBy=multi-user.target
EOF
 
sudo systemctl daemon-reload
sudo systemctl enable picad.service

Set up the node

# Please when using this guide replace “YOUR_MONIKER” with name for your node.
 
picad init YOUR_MONIKER --chain-id banksy-testnet-5
 
# Get address book and genesis.json
wget https://raw.githubusercontent.com/Cogwheel-Validator/docs/main/files/composable-testnet/genesis.json -O $HOME/.banksy/config/genesis.json
wget https://raw.githubusercontent.com/Cogwheel-Validator/docs/main/files/composable-testnet/addrbook.json -O $HOME/.banksy/config/addrbook.json
 
#Set minimum gas prices
sed -i -e “s|^minimum-gas-prices *=.*|minimum-gas-prices = \”0ppica\”| $HOME/.banksy/config/app.toml

Use state sync or snapshot to catch up

Use snapshot or state sync to catch up.

⚠️

If you plan to use state sync make sure that entety that offers these services has wasm file included.

Links to snapshots. You only need from one provider.
 
https://services.stake-town.com/home/testnet/composable/sync
 
## Or use Stavr snapshot
cd $HOME
apt install lz4
sudo systemctl stop picad
cp $HOME/.banksy/data/priv_validator_state.json $HOME/.banksy/priv_validator_state.json.backup
rm -rf $HOME/.banksy/data
curl -o - -L https://composable-t4.snapshot.stavr.tech/composable/composable-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.banksy --strip-components 2
curl -o - -L https://composable.wasmt4.stavr.tech/wasm-composable.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.banksy --strip-components 2
mv $HOME/.banksy/priv_validator_state.json.backup $HOME/.banksy/data/priv_validator_state.json
 

Start the node

sudo systemctl start picad && sudo journalctl -fu picad -o cat