Plian
English
English
  • Overview
  • Links
  • Downloads
  • FAQ
    • Node Status
    • Full Balance
    • Flow and FAQ on Becoming a Validator
    • Delegation
    • Staking Rewards
    • Monitor
    • PIScan
    • PIWallet
    • Cross-Chain Transactions
    • DApps
  • About The Blockchain
    • Multichain Framework
    • PDBFT 2.0 Consensus Algorithm
    • Validator Nodes
    • Building with Plian
  • Using The Blockchain
    • Overview
    • Delegating or Staking PI
    • Validator Node Guides
      • Express Node Setup Guide
      • Setting Up a Validator Node
      • Registering Your Node as Validator
      • Submitting Your Vote as Validator
      • Revealing Your Vote
      • Removing Your Node From the Candidate List
      • Alternate Installation Instructions
        • Building From the Source
        • Running Pchain in Docker
        • Installation Instructions for Ubuntu
        • Installation Instructions for Mac OS X
        • Installation Instructions for Windows 10
      • What is FullBalance
    • Token Swaps
    • Plian Javascript Console
    • PIwallet
      • Desktop Wallet
        • Light Wallet Mode
        • Local Node Mode
      • Mobile Wallets
      • How to Deploy a Smart Contract
    • PMetamask
    • MetaMask
      • How to import PIwallet address to MetaMask?
      • How to connect Metamask to Plian
      • How to import wallet address from MetaMask into PIWallet
      • How to deploy smart contract on Plian via Metamask + Remix
    • Advanced Features
      • Command Line Options
      • Management APIs
      • JSON RPC API
      • How to Sync and Run Testnet
    • How to buy Plian $PI
  • For Developers
    • PWeb3 Javascript API
    • How to Create Your Own Subchain
    • Writing Smart Contracts With Solidity
      • Introduction to Smart Contracts
      • Installing the Solidity Compiler
      • Solidity by Example
      • Solidity in Depth
        • Layout of a Solidity Source File
        • Structure of a Contract
        • Types
        • Units and Globally Available Variables
        • Expressions and Control Structures
        • Contracts
        • Solidity Assembly
        • Miscellaneous
      • Security Considerations
      • Resources
      • Using the compiler
      • Contract Metadata
      • Contract ABI Specification
      • Yul
      • Style Guide
      • Common Patterns
      • List of Known Bugs
      • Contributing
      • Frequently Asked Questions
      • LLL
      • Index
Powered by GitBook
On this page

Was this helpful?

  1. Using The Blockchain
  2. Validator Node Guides

Express Node Setup Guide

PreviousValidator Node GuidesNextSetting Up a Validator Node

Last updated 4 years ago

Was this helpful?

This is for those that are familiar with the software. For a more in-depth guide, continue onto the 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!

Setting Up a Validator Node