[Node] Run your PRYZM node

Node Science
7 min readFeb 12, 2024

--

Pryzm, formerly known as Prism, emerges as a cornerstone of the DeFi, by being a layer-1 blockchain with a distinctive emphasis on harvesting, trading, and use of yield. Leveraging the Cosmos SDK and Tendermint consensus, PRYZM establishes itself as a cross-chain hub designed to address the risks linked to the fluctuating prices and yields of Proof-of-Stake (PoS) and DeFi assets.

Pryzm, which is currently in testnet phase, has announced an airdrop for delegators to Pryzm’s Validators. We can therefore hope that they will also reward nodes runners. In this step-by-step guide, you will learn to set up and run your node as well as becoming your own validator !

Welcome to Node Science! Here, you will learn and understand how to set up your node easily and quickly, without any prior technical knowledge.

Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!

VPS configuration

To run a node you’ll need a VPS (Virtual Private Server) and one of the most reliable and cheapest solution is Contabo.

The minimum requirements to join the Pryzm testnet are :

CPU: 4 core 2.5 GHz or higher.
RAM: 8GB or higher.
STorage: 500GB or higher (SSD recommended).
Operating System: Linux.

And for validators aiming to join the testnet :

CPU: 8 core 2.5GHz or higher.
RAM: 16GB or higher.
Storag: 1TB or higher (SSD recommended).
Operating System: Linux.

You can thus choose the CLOUD VPS 2 but it’s maybe preferable to opt for the CLOUD VPS 3 by clicking here (or higher if you want to run several nodes on it).

Once payment is complete, you’ll receive an e-mail with your IP address entitled “Your login data!” . In order to connect to your VPS and run your node a secure manner, you must download and install the Putty software, which enables a secure connection.

Type your IP address, open and accept.

I. Node deployment

Ensure you copy each command line using (Ctrl+C), and then paste it into your terminal by right-clicking your mouse. Execute them sequentially, pressing Enter after each, if required.

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential fail2ban ufw
sudo apt -qy upgrade

Choose the MONIKER name of your choice, such as MONIKER="NodeScience".

MONIKER="<your-moniker-name>"
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.3.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
cd $HOME
wget https://storage.googleapis.com/pryzm-zone/core/0.11.1/pryzmd-0.11.1-linux-amd64
sudo mv pryzmd-0.11.1-linux-amd64 pryzmd
sudo chmod +x pryzmd
mkdir -p $HOME/.pryzm/cosmovisor/genesis/bin
mv pryzmd $HOME/.pryzm/cosmovisor/genesis/bin/
sudo ln -s $HOME/.pryzm/cosmovisor/genesis $HOME/.pryzm/cosmovisor/current -f
sudo ln -s $HOME/.pryzm/cosmovisor/current/bin/pryzmd /usr/local/bin/pryzmd -f
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
sudo tee /etc/systemd/system/pryzm.service > /dev/null << EOF
[Unit]
Description=pryzm node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.pryzm"
Environment="DAEMON_NAME=pryzmd"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable pryzm
pryzmd config chain-id indigo-1
pryzmd config keyring-backend test
pryzmd config node tcp://localhost:23257
pryzmd init $MONIKER --chain-id indigo-1
curl -Ls https://snap.nodex.one/pryzm-testnet/genesis.json > $HOME/.pryzm/config/genesis.json
curl -Ls https://snap.nodex.one/pryzm-testnet/addrbook.json > $HOME/.pryzm/config/addrbook.json
sed -i -e "s|^seeds *=.*|seeds = \"d1d43cc7c7aef715957289fd96a114ecaa7ba756@testnet-seeds.nodex.one:23210\"|" $HOME/.pryzm/config/config.toml
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.015upryzm,0.01factory/pryzm15k9s9p0ar0cx27nayrgk6vmhyec3lj7vkry7rx/uusdsim\"|" $HOME/.pryzm/config/app.toml
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/.pryzm/config/app.toml
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:23258\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:23257\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:23260\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:23256\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":23266\"%" $HOME/.pryzm/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:23217\"%; s%^address = \":8080\"%address = \":23280\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:23290\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:23291\"%; s%:8545%:23245%; s%:8546%:23246%; s%:6065%:23265%" $HOME/.pryzm/config/app.toml
curl -L https://snap.nodex.one/pryzm-testnet/pryzm-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.pryzm
[[ -f $HOME/.pryzm/data/upgrade-info.json ]] && cp $HOME/.pryzm/data/upgrade-info.json $HOME/.pryzm/cosmovisor/genesis/upgrade-info.json
sudo systemctl start pryzm
sudo apt update && sudo apt install -y apt-transport-https ca-certificates curl software-properties-common && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && sudo apt update && sudo apt-cache policy docker-ce && sudo apt install -y docker-ce

They will probably say “File ‘/usr/share/keyrings/docker-archive-keyring.gpg’ exists. Overwrite?”. Answer y

mkdir -p ~/.docker/cli-plugins/ && curl -SL https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose && chmod +x ~/.docker/cli-plugins/docker-compose
pryzmd keys add feeder

This will generate a wallet likepryzmxxxxxxxxxx, whose name is feeder, with its mnemonic phrase of 24 words. DON’T FORGET TO SAVE THEM !!!

pryzmd keys show feeder --bech val -a

This commande will display your valoper adresse like pryzmvaloperxxxxx. SAVE IT TOO !!!

Go here and claim faucet by pasting your Pryzm address. If you go to explorer here, and paste your Pryzm address, you will see that you have received 4 PRYZM et 20 USDsim (you can claim only once a month). PRYZM is the native asset and USDsim is the testnet stablecoin.

cd $HOME && mkdir -p $HOME/pryzmfeeder && cd $HOME/pryzmfeeder && wget https://storage.googleapis.com/pryzm-zone/feeder/config.yaml https://storage.googleapis.com/pryzm-zone/feeder/init.sql https://storage.googleapis.com/pryzm-zone/feeder/docker-compose.yml
docker pull europe-docker.pkg.dev/pryzm-zone/core/pryzm-feeder:0.3.4
docker pull timescale/timescaledb:2.13.0-pg16

Some of you have port problems. Please

apt install net-tools
netstat -antp | grep pryzm

You will probably have the listen port 23257, so type:

nano config.yaml

This command will open a text editor, to modify the config.yaml file. You will then need to modify it by pasting (with the right click) your Pryzm address in feeder, your mnemonic phrase in feederMnemonicand your valoper adress in validator. You also need to change port like :

chain:
rpcUrl: "http://localhost:23257"
lcdUrl: "http://localhost:1317"
grpcWebUrl: "http://localhost:9091"
wsUrl: "ws://localhost:23257"

You can now save the config.yamlfile with CTRL+X and Y and Enter.

sudo apt install postgresql postgresql-contrib

Type Y.

sudo service postgresql start
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';" -c "\q" && psql -U postgres -h localhost -W -c "\i $HOME/pryzmfeeder/init.sql"

The default password is postgres(maybe you will need to past it instead of writing it).

You can now verify that your node is running with:

service pryzm status

Then you can leave with CTRL+X.

You must now wait for the synchronization to take place, which can take several hours. You can check the progress by typing:

pryzmd status 2>&1 | jq .SyncInfo

Search in the output the "latest_block_time", and wait until it’s up to date.

[Update 15/02] : Message from Pryzm admin on discord : “We have identified an issue with the default node set for the Cosmos testnet, which is currently out of service. This has led to no reporting of the exchange rate for cAtom. To resolve this, we recommend updating the lcdUrl for id: "uatom" in your feeder's configuration file config.yaml

Come back to config.yaml file and change it for :

icStakingHostChainMonitoringService:
disable: false
monitoringIntervalSeconds: 1
chains:
- id: "uatom"
lcdUrl: "https://testnet-cosmos-api.pryzm.zone/"

Then save it.

Once it’s done, you need to create your validator with the following command by replacing what is in “<>” with what you want.

pryzmd tx staking create-validator \
--pubkey $(pryzmd tendermint show-validator) \
--amount 1000000upryzm \
--moniker "<name of your moniker>" \
--identity "keybase-id" \
--details "<any comment you want here>" \
--website "<Your site>" \
--security-contact "<Your contact info>" \
--chain-id indigo-1 \
--from feeder \
--commission-rate "0.05"\
--commission-max-rate "0.20" \
--commission-max-change-rate "0.01" \
--min-self-delegation "1" \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.015upryzm

Type y to confirm transaction before signing and broadcasting.

You can check that your validator was successfully installed with :

pryzmd query staking validator <valoper_adresse> --chain-id indigo-1

"BOND_STATUS_UNBONDED” status indicating that your registration was successful. You can check your validator by pasting your valoper adresse here. Your validator will be inactive since it’s out of top 70, but you can still delegate to its. You can check the list of top validators here.

Now you need to link your validator with your feeder, by replacing <your pryzm feeder wallet address> with your own Pryzm address.

pryzmd tx oracle delegate-feed-consent <your pryzm feeder wallet address> --fees 2000factory/pryzm15k9s9p0ar0cx27nayrgk6vmhyec3lj7vkry7rx/uusdsim,3000upryzm --from feeder

Type y to confirm transaction before signing and broadcasting.

apt install screen
screen -S pryzmfeeder
docker run --name=pryzm-feeder --network host --restart=always -v "$(pwd)/config.yaml:/app/config.yaml" -v "$(pwd)/logs:/app/logs" europe-docker.pkg.dev/pryzm-zone/core/pryzm-feeder:0.3.4

Some of you have port conflits here so go to config.yaml file.

nano config.yaml

And type an unused port like for example :

telemetry:
enable: true
serverPort: 49156

You can now save the config.yamlfile with CTRL+X and Y and Enter.

[Update] : Actually it seems to have a problem on uosmo chain. We have to wait for an update like with uatom.

Congratulations, you’ve just deployed your node and your validator on Pryzm! Simply press CTRL+A+D to detach from the screen session; your node will keep running. And if you to reattach to the existing screen session, just type screen -r pryzmfeeder.

You can check that everything is working properly by clicking here and pasting your address!

Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!

--

--