Node Installation
Hardware requirements The following requirements are recommended for running TERP:
4 or more physical CPU cores
At least 1TB of SSD disk storage
At least 8GB of memory (RAM)
At least 100mbps network bandwidth
Manual Installation
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
# Install Go
cd $HOME
! [ -x "$(command -v go)" ] && {
VER="1.20.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
}
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export TERP_CHAIN_ID="90u-2"" >> $HOME/.bash_profile
echo "export TERP_PORT="12"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# Download Binary
cd $HOME
rm -rf ~/terp-core
git clone https://github.com/terpnetwork/terp-core.git
cd terp-core
git checkout v3.1.0
make install
# Config and Init App
terpd config node tcp://localhost:${TERP_PORT}657
terpd config keyring-backend test
terpd config chain-id $TERP_CHAIN_ID
terpd init $MONIKER --chain-id $TERP_CHAIN_ID
# Add Genesis File and Addrbook
wget -O $HOME/.terp/config/genesis.json https://syanodes.my.id/terp/genesis.json
wget -O $HOME/.terp/config/addrbook.json https://syanodes.my.id/terp/addrbook.json
#Configure Seeds and Peers
SEEDS=""
PEERS="51d48be3809bb8907c1ef5f747e53cdd0c9ded1b@terp-testnet-peer.itrocket.net:13656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.terp/config/config.toml
sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0.025uterpx"/g' $HOME/.terp/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.terp/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.terp/config/config.toml
# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.terp/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.terp/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.terp/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.terp/config/app.toml
# Set Custom Port
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${TERP_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${TERP_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${TERP_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${TERP_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${TERP_PORT}660\"%" $HOME/.terp/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${TERP_PORT}317\"%; s%^address = \":8080\"%address = \":${TERP_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${TERP_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${TERP_PORT}091\"%" $HOME/.terp/config/app.toml
# Set Service File
sudo tee /etc/systemd/system/terpd.service > /dev/null <<EOF
[Unit]
Description=terp-testnet
After=network-online.target
[Service]
User=$USER
ExecStart=$(which terpd) start --home $HOME/.terp
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable terpd
sudo systemctl start terpd
sudo journalctl -fu terpd -o cat
Last updated