Official DocumentationRecommended Hardware: 4 Cores, 8GB RAM, 200GB of storage (NVME)
Contents
# install dependencies, if needed
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
install go
# install go, if needed
cd $HOME
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
# set vars
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export PRYZM_CHAIN_ID="indigo-1"" >> $HOME/.bash_profile
echo "export PRYZM_PORT="41"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# download binary
cd $HOME
wget https://storage.googleapis.com/pryzm-zone/core/0.14.0/pryzmd-0.14.0-linux-amd64.tar.gz
tar -xzvf $HOME/pryzmd-0.14.0-linux-amd64.tar.gz
mv pryzmd $HOME/go/bin
# config and init app
pryzmd config node tcp://localhost:${PRYZM_PORT}657
pryzmd config keyring-backend os
pryzmd config chain-id indigo-1
pryzmd init "test" --chain-id indigo-1
# download genesis and addrbook
wget -O $HOME/.pryzm/config/genesis.json https://testnet-files.itrocket.net/pryzm/genesis.json
wget -O $HOME/.pryzm/config/addrbook.json https://testnet-files.itrocket.net/pryzm/addrbook.json
# set seeds and peers
SEEDS="fbfd48af73cd1f6de7f9102a0086ac63f46fb911@pryzm-testnet-seed.itrocket.net:41656"
PEERS="713307ce72306d9e86b436fc69a03a0ab96b678f@pryzm-testnet-peer.itrocket.net:41656,7daf647c08fb7d7e20cf0a7e59e6a68f1a4d9bb5@75.119.136.145:656,78b46878bf26dc9e96c63aa4d1972f93e55e0c85@65.109.28.165:3000,2b4795eced0fe74bb866c6096731db1db10c4ec6@162.55.4.42:32656,9bdf5e81962872e22df88e5d0298731e5256977a@135.125.97.162:24856,1453780780f5915db04e951458a07fec817daa11@62.171.154.213:31656,7cdc65a90e252709b562556f7625830e9599f33c@65.21.203.242:14656,a6180efa509bad546a17b26ab23a93a40c5e3de2@[2a01:4f8:10b:cc::2]:24856,b5cbda80baeb1f9ad91e5246dc3715ef48caeff6@185.119.116.228:26656,405841883feda127e81f02d61bd5a800b0a5532a@95.217.62.210:13656,794b538577a59f789ce942fd393730da3e8c0ffe@34.65.224.175:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.pryzm/config/config.toml
# set custom ports in app.toml
sed -i.bak -e "s%:1317%:${PRYZM_PORT}317%g;
s%:8080%:${PRYZM_PORT}080%g;
s%:9090%:${PRYZM_PORT}090%g;
s%:9091%:${PRYZM_PORT}091%g;
s%:8545%:${PRYZM_PORT}545%g;
s%:8546%:${PRYZM_PORT}546%g;
s%:6065%:${PRYZM_PORT}065%g" $HOME/.pryzm/config/app.toml
# set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${PRYZM_PORT}658%g;
s%:26657%:${PRYZM_PORT}657%g;
s%:6060%:${PRYZM_PORT}060%g;
s%:26656%:${PRYZM_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${PRYZM_PORT}656\"%;
s%:26660%:${PRYZM_PORT}660%g" $HOME/.pryzm/config/config.toml
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.pryzm/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.pryzm/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.pryzm/config/app.toml
# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.015upryzm"|g' $HOME/.pryzm/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.pryzm/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.pryzm/config/config.toml
# create service file
sudo tee /etc/systemd/system/pryzmd.service > /dev/null <<EOF
[Unit]
Description=Pryzm node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.pryzm
ExecStart=$(which pryzmd) start --home $HOME/.pryzm
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# reset and download snapshot
pryzmd tendermint unsafe-reset-all --home $HOME/.pryzm
if curl -s --head curl https://testnet-files.itrocket.net/pryzm/snap_pryzm.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
curl https://testnet-files.itrocket.net/pryzm/snap_pryzm.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.pryzm
else
echo no have snap
fi
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable pryzmd
sudo systemctl restart pryzmd && sudo journalctl -u pryzmd -f
Automatic Installation
pruning: custom: 100/0/10 | indexer: null
source <(curl -s https://itrocket.net/api/testnet/pryzm/autoinstall/)
Create wallet
# to create a new wallet, use the following command. don’t forget to save the mnemonic
pryzmd keys add $WALLET
# to restore exexuting wallet, use the following command
pryzmd keys add $WALLET --recover
# save wallet and validator address
WALLET_ADDRESS=$(pryzmd keys show $WALLET -a)
VALOPER_ADDRESS=$(pryzmd keys show $WALLET --bech val -a)
echo "export WALLET_ADDRESS="$WALLET_ADDRESS >> $HOME/.bash_profile
echo "export VALOPER_ADDRESS="$VALOPER_ADDRESS >> $HOME/.bash_profile
source $HOME/.bash_profile
# check sync status, once your node is fully synced, the output from above will print "false"
pryzmd status 2>&1 | jq
# before creating a validator, you need to fund your wallet and check balance
pryzmd query bank balances $WALLET_ADDRESS
Create validator
pryzmd tx staking create-validator \
--amount 1000000upryzm \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(pryzmd tendermint show-validator) \
--moniker "test" \
--identity "" \
--website "" \
--details "I love blockchain ❤️" \
--chain-id indigo-1 \
--fees 3000upryzm \
-y
Firewall security
Set the default to allow outgoing connections, deny all incoming, allow ssh and node p2p port
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh/tcp
sudo ufw allow ${PRYZM_PORT}656/tcp
sudo ufw enable
Delete node
sudo systemctl stop pryzmd
sudo systemctl disable pryzmd
sudo rm -rf /etc/systemd/system/pryzmd.service
sudo rm $(which pryzmd)
sudo rm -rf $HOME/.pryzm
sed -i "/PRYZM_/d" $HOME/.bash_profile
Manual upgrade pryzmd-0.14.0
cd $HOME
wget -O pryzmd https://storage.googleapis.com/pryzm-zone/core/0.14.0/pryzmd-0.14.0-linux-amd64
chmod +x $HOME/pryzmd
sudo mv $HOME/pryzmd $(which pryzmd)
sudo systemctl restart pryzmd && sudo journalctl -u pryzmd -f