Skip to content

rizkim2/Planq

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Planq Mainnet Setup

Minimum Requirements

  • 4 or more physical CPU cores
  • At least 500GB of SSD disk storage
  • At least 16GB of memory (RAM)
  • At least 120mbps network bandwidth

Update packages

sudo apt update && sudo apt upgrade -y

Install dependencies

sudo apt install curl build-essential git wget jq make gcc tmux net-tools ccze -y

Install go

if ! [ -x "$(command -v go)" ]; then
  ver="1.18.2"
  cd $HOME
  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"
  echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
  source ~/.bash_profile
fi

Download and build binaries

cd $HOME
git clone https://github.com/planq-network/planq.git
cd planq
git fetch
git checkout v1.0.3
make install

Config app

planqd config chain-id planq_7070-2

Init app

planqd init YOUR_MONIKER --chain-id planq_7070-2

Download Genesis

wget -qO $HOME/.planqd/config/genesis.json "https://raw.githubusercontent.com/planq-network/networks/main/mainnet/genesis.json"

Set seeds and peers

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0aplanq\"/;" ~/.planqd/config/app.toml
seeds=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/seeds.txt | awk '{print $1}' | paste -s -d, -`
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" ~/.planqd/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 100/g' $HOME/.planqd/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 100/g' $HOME/.planqd/config/config.toml

Indexing

If want to create RPC, you must enable indexing

indexer="kv" && \
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.planqd/config/config.toml

but if you won't

indexer="null" && \
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.planqd/config/config.toml

Config pruning

pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.planqd/config/app.toml

Create service

sudo tee /etc/systemd/system/planqd.service > /dev/null <<EOF
[Unit]
Description=planqd
After=network-online.target

[Service]
User=$USER
ExecStart=$(which planqd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Register and start service

sudo systemctl daemon-reload
sudo systemctl enable planqd
sudo systemctl restart planqd && sudo journalctl -u planqd -f -o cat

Create wallet

To create new wallet use

planqd keys add wallet

Change wallet to your wallet name

To recover existing keys use

planqd keys add wallet --recover

Change wallet to your wallet name

To see current keys

planqd keys list

Create validator

After your node is synced, create validator

To check if your node is synced simply run

planqd status 2>&1 | jq .SyncInfo

make sure you have status "catching_up": false

Creating validator with 10 Planq change the value as you like

planqd tx staking create-validator \
  --amount 10000000000000000000aplanq \
  --from wallet \
  --commission-max-change-rate "0.01" \
  --commission-max-rate "0.2" \
  --commission-rate "0.07" \
  --min-self-delegation "1000000" \
  --pubkey $(planqd tendermint show-validator) \
  --moniker YOUR_MONIKER \
  --chain-id planq_7070-2 \
  --identity=  \
  --website="" \
  --details=" " \
  --gas="1000000" \
  --gas-prices="30000000000aplanq" \
  --gas-adjustment="1.15" \
  -y

Usefull commands

Service management

Check logs

journalctl -fu planqd -o cat

Start service

sudo systemctl start planqd

Stop service

sudo systemctl stop planqd

Restart service

sudo systemctl restart planqd

Node info

Synchronization info

planqd status 2>&1 | jq .SyncInfo

Validator info

planqd status 2>&1 | jq .ValidatorInfo

Node info

planqd status 2>&1 | jq .NodeInfo

Show node id

planqd tendermint show-node-id

Wallet operations

List of wallets

planqd keys list

Recover wallet

planqd keys add wallet --recover

Delete wallet

planqd keys delete wallet

Get wallet balance

planqd query bank balances <address>

Transfer funds

planqd tx bank send <FROM ADDRESS> <TO_planq_WALLET_ADDRESS> 10000000aplanq

Voting

planqd tx gov vote 1 yes --from wallet --chain-id=planq_7070-2

Staking, Delegation and Rewards

Delegate stake

planqd tx staking delegate $(planqd keys show <wallet_name> --bech val -a) <AMOUNT>aplanq --gas="1000000" --gas-prices="30000000000aplanq" --gas-adjustment="1.15" --chain-id=planq_7070-2 --from <wallet_name>

Redelegate stake from validator to another validator

planqd tx staking redelegate <Your_validator_address> <Destination_Validator_Address> <AMOUNT>aplanq --gas="1000000" --gas-prices="30000000000aplanq" --gas-adjustment="1.15" --chain-id planq_7070-2 --from <wallet_name>

Withdraw all rewards

planqd tx distribution withdraw-all-rewards --gas="1000000" --gas-adjustment="1.15" --gas-prices="30000000000aplanq" --chain-id planq_7070-2 --from <wallet_name>

Withdraw rewards with commision

planqd tx distribution withdraw-rewards $(planqd keys show <wallet_name> --bech val -a) --commission --gas="1000000" --gas-adjustment="1.15" --gas-prices="30000000000aplanq" --chain-id planq_7070-2 --from <wallet_name>

Validator management

Edit validator

Syntax :

planqd tx staking edit-validator commands --gas="1000000" --gas-adjustment="1.15" --gas-prices="30000000000aplanq" --chain-id planq_7070-2 --from wallet_name

Replace command with these Available commands:

--commission-rate=<your_new_commission_rate>
--details=<your_validator_description>
--identity=<your_keybase_id>
--min-self-delegation=<your_new_minimum_self_delegation>
--new-moniker=<your_new_moniker_name>
--website=<your_website>
--security-contact=<your_security_contact>

Example:
If you want to change Identity, you can use this command:

planqd tx staking edit-validator --identity=<your_keybase_id>  --gas="1000000" --gas-adjustment="1.15" --gas-prices="30000000000aplanq" --chain-id planq_7070-2 --from your_wallet_name

Unjail validator

planqd tx slashing unjail \
  --chain-id=planq_7070-2 \
  --gas="1000000" \
  --gas-adjustment="1.15" \
  --gas-prices="30000000000aplanq" \
  --from=wallet 

Delete node

sudo systemctl stop planqd && \
sudo systemctl disable planqd && \
rm /etc/systemd/system/planqd.service && \
sudo systemctl daemon-reload && \
cd $HOME && \
rm -rf .planqd && \
rm -rf $(which planqd)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors