Node Installation
Hardware requirements The following requirements are recommended for running SHENTU:
6 or more physical CPU cores
At least 1TB of SSD disk storage
At least 16GB of memory (RAM)
At least 500mbps network bandwidth
Manual Installation
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq htop tmux chrony liblz4-tool -y
# Install Go
cd $HOME
VER="1.22.2"
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 SHENTU_CHAIN_ID="shentu-2.2"" >> $HOME/.bash_profile
echo "export SHENTU_PORT="103"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# Download Binary
cd $HOME
rm -rf shentu
git clone https://github.com/shentufoundation/shentu
cd shentu
git checkout v2.14.0
make install
# Config and Init App
shentud config node tcp://localhost:${SHENTU_PORT}57
shentud config chain-id $SHENTU_CHAIN_ID
shentud init $MONIKER --chain-id $SHENTU_CHAIN_ID
# Add Genesis File and Addrbook
wget -O $HOME/.shentud/config/genesis.json https://testnet-files.syanodes.my.id/shentu-m-genesis.json
wget -O $HOME/.shentud/config/addrbook.json https://testnet-files.syanodes.my.id/shentu-m-addrbook.json
#Configure Seeds and Peers
SEEDS=""
PEERS="[email protected]:14056,[email protected]:26656,[email protected]:15607,[email protected]:14056,[email protected]:26656,[email protected]:30022,[email protected]:26656,[email protected]:36656,[email protected]:14031,[email protected]:15607,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26956,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:15604,[email protected]:26656,[email protected]:26656,[email protected]:6656,[email protected]:28656,[email protected]:20016,[email protected]:26656,[email protected]:46656,[email protected]:27656,[email protected]:15607,[email protected]:14056,[email protected]:29856,[email protected]:26656,[email protected]:26656,[email protected]:41656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:14056,[email protected]:28656,[email protected]:26456,[email protected]:26656,[email protected]:3000,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:46656,[email protected]:26716,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:19656,[email protected]:56656,[email protected]:3000,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:31457,[email protected]:15607,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26706,[email protected]:27656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:12456,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:12456,[email protected]:6656,[email protected]:26656,[email protected]:26756,[email protected]:15604,[email protected]:26656,[email protected]:26656,[email protected]:14056,[email protected]:26656,[email protected]:26656,[email protected]:24656,[email protected]:26656,[email protected]:28656,[email protected]:26656,[email protected]:26656,[email protected]:2407,[email protected]:25656,[email protected]:15200,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:14056,[email protected]:26656,[email protected]:15200,[email protected]:20016,[email protected]:46656,[email protected]:14056,[email protected]:14056"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.shentud/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uctk\"/" $HOME/.shentud/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.shentud/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.shentud/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/.shentud/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.shentud/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.shentud/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.shentud/config/app.toml
# Set Custom Port
sed -i -e "s%:1317%:${SHENTU_PORT}17%; s%:8080%:${SHENTU_PORT}80%; s%:9090%:${SHENTU_PORT}90%; s%:9091%:${SHENTU_PORT}91%; s%:8545%:${SHENTU_PORT}45%; s%:8546%:${SHENTU_PORT}46%; s%:6065%:${SHENTU_PORT}65%" $HOME/.shentud/config/app.toml
sed -i -e "s%:26658%:${SHENTU_PORT}58%; s%:26657%:${SHENTU_PORT}57%; s%:6060%:${SHENTU_PORT}60%; s%:26656%:${SHENTU_PORT}56%; s%:26660%:${SHENTU_PORT}61%" $HOME/.shentud/config/config.toml
# Set Service File
sudo tee /etc/systemd/system/shentud.service > /dev/null <<EOF
[Unit]
Description=shentu-mainnet
After=network-online.target
[Service]
User=$USER
ExecStart=$(which shentud) start --home $HOME/.shentud
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable shentud
sudo systemctl start shentud && sudo journalctl -fu shentud -o cat
Auto Installation
wget https://snapshot.syanodes.my.id/auto/mainnet/shentu_auto && chmod +x shentu_auto && ./shentu_auto
Last updated