Giter Site home page Giter Site logo

quazar-wnt-'s Introduction

Quazar-WingsNodeTeam

Quasar Node Setup for Testnet — qsr-questnet-04

Official documentation:

Explorer:

Hardware Requirements

Recommended Hardware Requirements

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

Set up your quasar node

Manual installation

Update packages and Install dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc -y

Replace your moniker <YOUR_MONIKER> without <>, save and import variables into system

QUASAR_PORT=34
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="<YOUR_MONIKER>"" >> $HOME/.bash_profile
echo "export QUASAR_CHAIN_ID="qsr-questnet-04"" >> $HOME/.bash_profile
echo "export QUASAR_PORT="${QUASAR_PORT}"" >> $HOME/.bash_profile
source $HOME/.bash_profile

install go

cd $HOME
if ! [ -x "$(command -v go)" ]; then
VER="1.19.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm -rf  "go$VER.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
fi

Download and build binaries

cd $HOME
wget https://github.com/quasar-finance/binary-release/raw/main/v0.0.2-alpha-11/quasarnoded-linux-amd64
chmod +x quasarnoded-linux-amd64
if [ ! -d "$HOME/go/bin" ]; then
mkdir $HOME/go/bin
fi
sudo mv quasarnoded-linux-amd64 $HOME/go/bin/quasarnoded
quasarnoded version

Config and init app

quasarnoded config node tcp://localhost:${QUASAR_PORT}657
quasarnoded config keyring-backend test
quasarnoded config chain-id $QUASAR_CHAIN_ID
quasarnoded init $MONIKER --chain-id $QUASAR_CHAIN_ID

Download genesis and addrbook

wget -O $HOME/.quasarnode/config/genesis.json https://files.itrocket.net/testnet/quasar/genesis.json

Set seeds and peers

SEEDS=""
PEERS="6ccfdbe91c06698f0a66cf95a249dbcd88b5aaa4@quasar-testnet-peer.itrocket.net:443,[email protected]:18256,[email protected]:2490,[email protected]:8080,[email protected]:26656,[email protected]:26656,[email protected]:27656,[email protected]:26656,[email protected]:18256,[email protected]:18256,[email protected]:18256"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.quasarnode/config/config.toml

Set gustom ports in app.toml file

sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${QUASAR_PORT}317\"%;
s%^address = \":8080\"%address = \":${QUASAR_PORT}080\"%;
s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${QUASAR_PORT}090\"%; 
s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${QUASAR_PORT}091\"%; 
s%^address = \"0.0.0.0:8545\"%address = \"0.0.0.0:${QUASAR_PORT}545\"%; 
s%^ws-address = \"0.0.0.0:8546\"%ws-address = \"0.0.0.0:${QUASAR_PORT}546\"%" $HOME/.quasarnode/config/app.toml

Set gustom ports in config.toml file

sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${QUASAR_PORT}658\"%; 
s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:${QUASAR_PORT}657\"%; 
s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${QUASAR_PORT}060\"%;
s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${QUASAR_PORT}656\"%;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${QUASAR_PORT}656\"%;
s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${QUASAR_PORT}660\"%" $HOME/.quasarnode/config/config.toml

Config pruning

sed -i -e "s/^pruning *=.*/pruning = \"nothing\"/" $HOME/.quasarnode/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.quasarnode/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.quasarnode/config/app.toml

Set minimum gas price, enable prometheus and disable indexing

sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0.0uqsr"/g' $HOME/.quasarnode/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.quasarnode/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.quasarnode/config/config.toml

Reset chain data

quasarnoded tendermint unsafe-reset-all --home $HOME/.quasarnode

Create Service file

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

[Service]
User=$USER
ExecStart=$(which quasarnoded) start --home $HOME/.quasarnode
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Enable and start service

sudo systemctl daemon-reload
sudo systemctl enable quasarnoded
sudo systemctl restart quasarnoded && sudo journalctl -u quasarnoded -f

Snapshot, State Sync (OPTIONAL)

In order not to wait for a long synchronization, you can use our guides:

https://itrocket.net/services/testnet/quasar/#snap
https://itrocket.net/services/testnet/quasar/#sync

Create wallet

To create a new wallet, use the following command. don’t forget to save the mnemonic

quasarnoded keys add $WALLET

(optional) To restore exexuting wallet, use the following command

quasarnoded keys add $WALLET --recover

Save wallet and validator address

WALLET_ADDRESS=$(quasarnoded keys show $WALLET -a)
VALOPER_ADDRESS=$(quasarnoded keys show $WALLET --bech val -a)
echo "export WALLET_ADDRESS="${WALLET_ADDRESS} >> $HOME/.bash_profile
echo "export VALOPER_ADDRESS="${VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile

Create validator

before creating a validator, you need to check the balance and make sure that the node is synched

Check Sync status, once your node is fully synced, the output from above will say false

quasarnoded status 2>&1 | jq .SyncInfo

Check your balance

quasarnoded query bank balances $WALLET_ADDRESS

Create validator

quasarnoded tx staking create-validator \
  --amount 1000000uqsr \
  --from $WALLET \
  --commission-max-change-rate "0.01" \
  --commission-max-rate "0.2" \
  --commission-rate "0.05" \
  --min-self-delegation "1" \
  --pubkey  $(quasarnoded tendermint show-validator) \
  --moniker $MONIKER \
  --chain-id $QUASAR_CHAIN_ID

Monitoring

If you want to have set up a monitoring and alert system use our cosmos nodes monitoring guide with tenderduty

Security

To protect you keys please don`t share your privkey, mnemonic and follow a basic security rules

Set up ssh keys for authentication

You can use this guide to configure ssh authentication and disable password authentication on your server


## Usefull commands
### Service commands
check logs

~~~bash
sudo journalctl -u quasarnoded -f

stop service

sudo systemctl stop quasarnoded

start service

sudo systemctl start quasarnoded

restart service

sudo systemctl restart quasarnoded

Wallet operation

check balance

quasarnoded query bank balances $WALLET_ADDRESS

transfer funds

quasarnoded tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uqsr --gas auto --gas-adjustment 1.3

lists of wallets

quasarnoded keys list

create a new wallet

quasarnoded keys add $WALLET

recover wallet

quasarnoded keys add $WALLET --recover

delete wallet

quasarnoded keys delete $WALLET

Node information

synch info

quasarnoded status 2>&1 | jq .SyncInfo

node status

curl -s localhost:${QUASAR_PORT}657/status

node info

quasarnoded status 2>&1 | jq .NodeInfo

validator info

quasarnoded status 2>&1 | jq .ValidatorInfo

your node peers

echo $(quasarnoded tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.quasarnode/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

get currently conected peers lis

curl -sS http://localhost:${QUASAR_PORT}657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'

Voting

quasarnoded tx gov vote 1 yes --from $WALLET --chain-id $QUASAR_CHAIN_ID

Staking, Delegation and Rewards

Withdraw all rewards

quasarnoded tx distribution withdraw-all-rewards --from $WALLET --chain-id $QUASAR_CHAIN_ID --gas auto --gas-adjustment 1.3

Withdraw rewards with commision

quasarnoded tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id $QUASAR_CHAIN_ID --gas auto --gas-adjustment 1.3

Check balance

quasarnoded query bank balances $WALLET_ADDRESS

Delegate stake

quasarnoded tx staking delegate $VALOPER_ADDRESS 1000000uqsr --from $WALLET --chain-id $QUASAR_CHAIN_ID --gas=auto --gas-adjustment 1.3

Redelegate stake to another validator

quasarnoded tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 1000000uqsr --from $WALLET --chain-id $QUASAR_CHAIN_ID --gas auto --gas-adjustment 1.3

Validator operation

Edit validator

quasarnoded tx staking edit-validator \
  --moniker=$NODENAME \
  --identity=<your_keybase_id> \
  --website="<your_website>" \
  --details="<your_validator_description>" \
  --chain-id=$QUASAR_CHAIN_ID \
  --from=$WALLET

Validator info

quasarnoded status 2>&1 | jq .ValidatorInfo

Jailing info

quasarnoded q slashing signing-info $(quasarnoded tendermint show-validator)

Unjail validator

quasarnoded tx slashing unjail --broadcast-mode=block --from $WALLET --chain-id $QUASAR_CHAIN_ID --gas auto --gas-adjustment 1.5

Consensus state

curl localhost:${QUASAR_PORT}657/consensus_state

Delete node

sudo systemctl stop quasarnoded
sudo systemctl disable quasarnoded
sudo rm -rf /etc/systemd/system/quasarnoded*
sudo rm $(which quasarnoded)
sudo rm -rf $HOME/.quasarnode
sed -i "/QUASAR_/d" $HOME/.bash_profile

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.