Node setup for prysm Network
Node setup requres some basic knowlage of Linux OS and server managment. Setting up the node can be daunting and chalanging task. This is a short guide how to set up the node.
Update the system and install the essentials:
sudo apt update && sudo apt full-upgrade -y && apt install build-essential
sudo apt install vim /or apt install nano
sudo apt install entr jq make git ufw wget
Install GO and Cosmovisor
sudo rm -r /usr/local/go/
wget https://golang.org/dl/go1.22.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz
rm go1.22.2.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.bashrc
echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME./bashrc
source $HOME/.bashrc
# Install cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
sudo mv ~/go/bin/cosmovisor /usr/local/bin
Clone the repository and install node binary
cd $HOME
git clone https://github.com/LightLABS-Dev/prysm.git
cd prysm
git checkout v0.1.0 # always doublecheck from the official team for the right version
make install
Set up cosmovisor
mkdir -p $HOME/.prysm/cosmovisor/genesis/bin
mkdir -p $HOME/.prysm/cosmovisor/upgrades
mv $HOME/go/bin/prysmd $HOME/.prysm/cosmovisor/genesis/bin/
sudo ln -s $HOME/.prysm/cosmovisor/genesis $HOME/.prysm/cosmovisor/current -f
sudo ln -s $HOME/.prysm/cosmovisor/current/bin/prysmd /usr/local/bin/prysmd -f
# Create service file
sudo tee /etc/systemd/system/prysmd.service > /dev/null <<EOF
[Unit]
Description=prysm node”
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
WorkingDirectory=$HOME/.prysm
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
Environment=”DAEMON_NAME=prysmd”
Environment=”DAEMON_HOME=$HOME/.prysm”
Environment=”DAEMON_ALLOW_DOWNLOAD_BINARIES=false”
Environment=”DAEMON_RESTART_AFTER_UPGRADE=true”
Environment=”UNSAFE_SKIP_BACKUP=true”
Environment=”PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.prysm/cosmovisor/current/bin”
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable prysmd.service
Set up the node
# Please when using this guide replace “YOUR_MONIKER” with name for your node.
prysmd init YOUR_MONIKER --chain-id prysm-devnet-1
# Get address book and genesis.json
wget https://raw.githubusercontent.com/Cogwheel-Validator/docs/main/files/prysm-testnet/genesis.json -O $HOME/.prysm/config/genesis.json
wget https://raw.githubusercontent.com/Cogwheel-Validator/docs/main/files/prysm-testnet/addrbook.json -O $HOME/.prysm/config/addrbook.json
#Set minimum gas prices
sed -i -e “s|^minimum-gas-prices *=.*|minimum-gas-prices = \”0uprysm\”|” $HOME/.prysm/config/app.toml
Use snapshot or state sync to catch up.
Links to snapshots. You only need from one provider.
https://testnet-snapshot.ibs.team/Prysm/
https://services.stake-town.com/home/testnet/prysm/sync
Start the node
sudo systemctl start prysmd && sudo journalctl -fu prysmd -o cat