Express Node Setup Guide

This is for those that are familiar with the software. For a more in-depth guide, continue onto the Setting Up a Validator Node page.

Install, Download Bootstrap, and Run:

LOCATION=$(curl -s https://api.github.com/repos/pchain-org/pchain/releases/latest | grep "tag_name" | awk '{print "https://github.com/pchain-org/pchain/releases/download/" substr($2, 2, length($2)-3) "/pchain_mainnet_" substr($2, 2, length($2)-3) ".tar.gz"}') ; curl -L -o pchain_mainnet.tar.gz $LOCATION
mkdir -p pchain_main ; tar xzf pchain_mainnet.tar.gz --one-top-level=pchain_main --strip-components 1
mkdir -p pchain/log pchain/bin pchain/.pchain pchain/scripts
cp ~/pchain_main/pchain ~/pchain/bin/
cp ~/pchain_main/run.sh ~/pchain/
cd pchain
wget https://pchainblockdata.s3-us-west-2.amazonaws.com/blockDataWithChild.tar.gz
tar -xzf blockDataWithChild.tar.gz
~/pchain/run.sh

Start Auto-update Scripts:

sudo apt-get install jq -y
cd ~
cp ~/pchain_main/pchain.cron ~/pchain/scripts/
cp ~/pchain_main/scripts/* ~/pchain/scripts/
sudo crontab ~/pchain/scripts/pchain.cron 
crontab -l

Create New Address:

~/pchain/bin/pchain attach ~/pchain/.pchain/pchain/pchain.ipc

Then once that opens the console, generate a new address:

personal.newAccount()

Make sure to back this information up! Losing this is losing your rewards and balance.

Once that is complete, type exit to exit.

Then generate a BLS Key:

~/pchain/bin/pchain --datadir ~/pchain/.pchain gen_priv_validator your_address
cp ~/pchain/.pchain/priv_validator.json ~/pchain/.pchain/pchain/
cp ~/pchain/.pchain/priv_validator.json ~/pchain/.pchain/child_0/
kill $(pidof pchain)
~/pchain/run.sh

Make sure to backup this key as well! Losing this means you would have to reregister and potentially lose validation time.

You are now ready to Register and Vote!

Last updated