Skip to main content

Pell Network

Endpoints

APIRPC
https://pell-testnet-api.kgnodes.xyz/https://pell-testnet-rpc.kgnodes.xyz/

Explorer: https://explorer.kgnodes.xyz/pell

Installation

Update OS

sudo apt update && sudo apt upgrade -y

Installing Dependencies

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

Installing GO

cd $HOME
VER="1.22.6"
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin

Setting up environment variables

echo "export PELL_PORT="58"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Initializing and configuring the node

Download Binary

wget -O pellcored https://github.com/0xPellNetwork/network-config/releases/download/v1.1.1-ignite/pellcored-v1.1.1-linux-amd64
chmod +x pellcored
mv pellcored ~/go/bin/
WASMVM_VERSION=v2.1.2
export LD_LIBRARY_PATH=~/.pellcored/lib
mkdir -p $LD_LIBRARY_PATH
wget "https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm.$(uname -m).so" -O "$LD_LIBRARY_PATH/libwasmvm.$(uname -m).so"
echo "export LD_LIBRARY_PATH=$HOME/.pellcored/lib:$LD_LIBRARY_PATH" >> $HOME/.bash_profile
source ~/.bash_profile

Node Settings

pellcored config set client chain-id ignite_186-1
pellcored config set client keyring-backend test
pellcored config set client node tcp://localhost:${PELL_PORT}657

Initializing the Node

pellcored init "your-moniker" --chain-id ignite_186-1

Downloading genesis and addressbook

wget -O $HOME/.pellcored/config/genesis.json https://snapshot.kgnodes.xyz/snapshot/pellcored/genesis.json
wget -O $HOME/.pellcored/config/addrbook.json  https://snapshot.kgnodes.xyz/snapshot/pellcored/addrbook.json

Setting seeds and peers

SEEDS=""
PEERS="35a89ec3d10cd7a2d4fcaaaabfed66be396c051e@65.109.49.98:57656,1bcc2348282d98636bb73eff3fc39f5f06d4a3c2@65.109.53.24:58656,7b3794f267f5a873146f7623d025b9864b7d4dfa@23.88.106.91:26656,9b98b3d59cd6cdb46d99b65c989b108544bdde63@188.40.85.207:26656,85ae72fe4ab8b669299f6da1baaaba8a6c664ec3@185.232.70.33:17656,c9a5d341547e06441e30e07db289fc337ec36f79@152.53.87.97:26656,af2c373f34d2a4ea312b638eb21bb07f2812f734@152.53.51.67:57656,9c06bf4fb7ae124e3e3fcf70dec9aebffeddf8b1@100.42.188.246:57656,d1dd899a5174ee33c30a4cdf78a57d0e8a24e417@185.148.241.23:26656,48c48532950e51fba80a1031d5a58c627737ed84@65.109.82.111:25656,6acaeb73550facc3f8cc6f67134f7f5afed7f714@184.107.169.193:26656,103b755578215a240d2e70a4294643e35ecfd6fa@152.53.66.0:21656,f9decf3cb78d88581d6c3c14828cb906a75fd060@95.216.97.238:26656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.pellcored/config/config.toml

Updating ports in app.toml

sed -i.bak -e "s%:1317%:${PELL_PORT}317%g;
s%:8080%:${PELL_PORT}080%g;
s%:9090%:${PELL_PORT}090%g;
s%:9091%:${PELL_PORT}091%g;
s%:8545%:${PELL_PORT}545%g;
s%:8546%:${PELL_PORT}546%g;
s%:6065%:${PELL_PORT}065%g" $HOME/.pellcored/config/app.toml

Updating ports in config.toml

sed -i.bak -e "s%:26658%:${PELL_PORT}658%g;
s%:26657%:${PELL_PORT}657%g;
s%:6060%:${PELL_PORT}060%g;
s%:26656%:${PELL_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${PELL_PORT}656\"%;
s%:26660%:${PELL_PORT}660%g" $HOME/.pellcored/config/config.toml

Configuring pruning settings

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.pellcored/config/app.toml 
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.pellcored/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.pellcored/config/app.toml

Setting gas and other configurations

sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0apell"|g' $HOME/.pellcored/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.pellcored/config/config.toml

Creating service file

sudo tee /etc/systemd/system/pellcored.service > /dev/null <<EOF
[Unit]
Description=Pell node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.pellcored
ExecStart=$(which pellcored) start --home $HOME/.pellcored
Environment=LD_LIBRARY_PATH=$HOME/.pellcored/lib/
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

Enabling and starting the service

sudo systemctl daemon-reload
sudo systemctl enable pellcored

Downloading latest snap

Latest Snapshot:

SizeHeigtTimeIndexer
4.6G2387452024-12-22 11:47 UTCcustom: 100/0/10
sudo systemctl stop pellcored

cp $HOME/.pellcored/data/priv_validator_state.json $HOME/.pellcored/priv_validator_state.json.backup

pellcored tendermint unsafe-reset-all --home $HOME/.pellcored --keep-addr-book
curl https://snapshot.kgnodes.xyz/snapshot/pellcored/snap_pellcored.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.pellcored


mv $HOME/.pellcored/priv_validator_state.json.backup $HOME/.pellcored/data/priv_validator_state.json

sudo systemctl restart pellcored
sudo journalctl -u pellcored -f --no-hostname -o cat

Checking logs

sudo journalctl -u pellcored -f --no-hostname -o cat

Wallet

Creating a New Wallet

pellcored keys add wallet-name --keyring-backend=test

Importing existing wallet

pellcored keys add wallet-name --recover --keyring-backend=test

Creating Validator

rm -rf /root/validator.json
cat > ./validator.json << EOF
{
"pubkey": $(pellcored tendermint show-validator),
"amount": "1000000000000000000apell",
"moniker": "<your_node_name>",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
EOF

#Now Create a Validator according to that file

pellcored tx staking create-validator ./validator.json --chain-id=ignite_186-1 --fees=0.000001pell --gas=1000000 --from=wallet-name --keyring-backend=test -y

Self-Delegating

pellcored tx staking delegate $(pellcored keys show wallet-name --bech val -a) 1000000000000000000apell --from wallet-name --chain-id ignite_186-1 --fees=0.000001pell --gas=1000000 --keyring-backend=test -y 

Edit Validator

pellcored tx staking edit-validator \
--chain-id ignite_186-1 \
--commission-rate 0.05 \
--new-moniker "validator-name" \
--identity "" \
--details "" \
--website "" \
--security-contact "" \
--from "wallet-name" \
--node http://localhost:${PELL_PORT}657 \
--fees=0.000001pell \
--gas=1000000 \
--keyring-backend=test
-y

Unjail Validator

pellcored tx slashing unjail --from wallet-name --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y 

Deleting the Node

cd $HOME
sudo systemctl stop pellcored
sudo systemctl disable pellcored
sudo rm -rf /etc/systemd/system/pellcored.service
sudo rm $(which pellcored)
sudo rm -rf $HOME/.pellcored
sed -i "/PELL_/d" $HOME/.bash_profile