Bitsong

Bitsong

Home

Prepare Server

sudo apt update 
sudo apt install curl tar wget clang pkg-config libssl-dev libleveldb-dev jq build-essential bsdmainutils git make htop unzip bc htop -y
if go version >/dev/null 2>&1; then 
echo -e "\033[0;31m Go is already installed\033[0m" 
else 
wget -O go1.19.2.linux-amd64.tar.gz https://golang.org/dl/go1.19.5.linux-amd64.tar.gz 
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.2.linux-amd64.tar.gz && rm go1.19.2.linux-amd64.tar.gz 
echo 'export GOROOT=/usr/local/go' >> $HOME/.bash_profile 
echo 'export GOPATH=$HOME/go' >> $HOME/.bash_profile 
echo 'export GO111MODULE=on' >> $HOME/.bash_profile echo '
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile && . $HOME/.bash_profile echo -e "\033[0;31m $(go version) \033[0m"
fi

Install node

git clone https://github.com/bitsongofficial/go-bitsong bitsong
cd bitsong
git checkout v0.14.0
make install

Configure Node

Initialize Node

Replace Moniker with your own name for node.

bitsongd init Moniker --chain-id bitsong-2b

Download Genesis

wget -O ~/.bitsongd/config/genesis.json https://raw.githubusercontent.com/bitsongofficial/networks/master/bitsong-2b/genesis.json

Download Address Book

wget -P $HOME/.bitsongd/config http://snapshot.stakeme.io:81/bitsong/addrbook.json

Create Service

Setup daemon procces

sudo tee /etc/systemd/system/bitsongd.service > /dev/null <<EOF 
[Unit] 
Description=Bitsong Node 
After=network-online.target 

[Service] 
User=$USER 
ExecStart=$(which bitsongd) start 
Restart=on-failure 
RestartSec=3 
LimitNOFILE=65535 

[Install] 
WantedBy=multi-user.target 
EOF

Download Snapshot

For quick synchronization, we recommend using a snapshot, which will allow you to quickly catch up with the current height

cp $HOME/.bitsongd/data/priv_validator_state.json $HOME/.bitsongd/priv_validator_state.json.backup
bitsongd tendermint unsafe-reset-all --keep-addr-book --home "$HOME/.bitsongd"
wget http://snapshot.stakeme.io:81/bitsong/bitsong-snap.tar.gz
tar -C $HOME/ -zxvf bitsong-snap.tar.gz --strip-components 1 
mv $HOME/.bitsongd/priv_validator_state.json.backup $HOME/.bitsongd/data/priv_validator_state.json
rm bitsong-snap.tar.gz

Start Node

Start service

sudo systemctl daemon-reload 
sudo systemctl enable bitsongd 
sudo service bitsongd start  

Check logs

sudo journalctl -fu bitsongd -o cat

Bitsong tendermint Chain Services