Fullnode Install

Side Protocol, as an extension layer of Bitcoin, is the first fully Bitcoin-compatible dPoS Layer 1 blockchain, designed to shape the future of Bitcoin finance. It enables developers to create secure, high-performance decentralized applications within the Bitcoin-centric internet, aiming to onboard billions of users globally and establish BTC as the definitive global currency.

tip: the following commands are executed as root by default. If you are not a root user, please prepend the commands with sudo

Requirements

The minimum hardware requirements for running an Junction node are:

Install Tools

apt -q update
apt -qy install curl git jq lz4 build-essential aria2 unzip wget

rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.22.0.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/gobinpath.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | sudo tee /etc/profile.d/gopath.sh)

Clone and Build

export TAG=v0.9.5
git clone https://github.com/sideprotocol/side.git
cd side
git checkout $TAG && make build

sided version --long | grep -e version -e commit

basic setup

# Set home dir, example: /data/junction
export DIR=/data/side
export Moniker="xx"
mkdir -pv $DIR
ln -sv $DIR $HOME/.side

# A moniker is a human-readable name for your node. Moniker can contain only ASCII characters, and cannot exceed 70 characters.
sided init $Moniker --chain-id sidechain-testnet-4

Set Custom Port

Get Script for <portset.sh>

export DIR=$HOME/.side
export MIN_GAS=0.001uside
export NUM=2

bash portset.sh $DIR $MIN_GAS $NUM

Genesis File

export DIR=$HOME/.side
export TAG=v0.1.0
curl -Ls https://genesis.blocknth.com/side-testnet/genesis.json > \
         $DIR/config/genesis.json

Add Seeds

export DIR=$HOME/.side
export [email protected]:26656,[email protected]:15656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:21656
sed -i -e 's|^seeds *=.*|seeds = "'$SEEDS'"|' $DIR/config/config.toml

Address Book

export DIR=$HOME/.side
rm -rf $DIR/config/addrbook.json
curl -Ls https://addrbook.blocknth.com/side-testnet/addrbook.json > $DIR/config/addrbook.json

Create Service with Cosmovisor

DIR=$HOME/.side
BIN=$(which sided)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
mkdir -pv $DIR/cosmovisor/genesis/bin
ln -sv $DIR/cosmovisor/genesis $DIR/cosmovisor/current
cp $BIN $DIR/cosmovisor/genesis/bin/

tee /etc/systemd/system/sided.service > /dev/null << EOF
[Unit]
Description=side protocol node service
After=network-online.target

[Service]
User=$USER
Restart=on-failure
Type=simple
ExecStart=$(which cosmovisor) run start
WorkingDirectory=$DIR
SyslogIdentifier=sided
LimitNOFILE=65545
Environment="DAEMON_NAME=sided"
Environment="DAEMON_HOME=$DIR"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable sided.service
systemctl start sided.service
journalctl -u sided.service -f -o cat

Last updated