Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/appieasahbie/okp4


https://github.com/appieasahbie/okp4

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# Okp4 Node Setup :

![download](https://user-images.githubusercontent.com/108979536/198153396-8bc7304c-a5d2-4b10-a9bb-13e52ba5afd0.jpg)

### OKP4 Protocol
OKP4 is a domain-specific layer-1 dedicated to trust-minimized data sharing.
The blockchain orchestrates assets shared by participants into the Dataverse: data, algorithms, software, storage and computation to enable a new generation of applications.
Any contributor earns rewards thanks to these new value chains.

# Official links :

+ Discord : [link](https://discord.gg/d6QfUzHR)

+ Website : [link](https://okp4.network/)

+ Twitter : [link](https://twitter.com/OKP4_Protocol)

+ Github : [link](https://github.com/okp4)

# Hardware Requirements

### Minimum Hardware Requirements

+ 4x CPUs; the faster clock speed the better

+ 8GB RAM

+ 100GB of storage (SSD or NVME)

### Recommended Hardware Requirements

+ 8x CPUs; the faster clock speed the better

+ 64GB RAM

+ 1TB of storage (SSD or NVME)

### 1-ɪɴᴛᴀʟʟᴀᴛɪᴏɴ ᴏɴᴇ ᴛɪᴍᴇ (ꜱᴄʀɪᴘᴛ ᴀᴜᴛᴏᴍᴀᴛɪᴄ ɪɴꜱᴛᴀʟʟᴀᴛɪᴏɴ)

wget -O okp4.sh https://raw.githubusercontent.com/appieasahbie/okp4/main/okp4.sh && chmod +x okp4.sh && ./okp4.sh

### Post installation

source $HOME/.bash_profile

### (Check the status of your node)

okp4d status 2>&1 | jq .SyncInfo

### open ports and active the firewall

sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh/tcp
sudo ufw limit ssh/tcp
sudo ufw allow ${OKP4_PORT}656,${OKP4_PORT}660/tcp
sudo ufw enable

### Create wallet

+ (Please save all keys on your notepad)

okp4d keys add $WALLET

+ To recover your old wallet use this command

okp4d keys add $WALLET --recover

+ show keys

okp4d keys list

### Add wallet and valoper address and load variables into the system

OKP4_WALLET_ADDRESS=$(okp4d keys show $WALLET -a)
OKP4_VALOPER_ADDRESS=$(okp4d keys show $WALLET --bech val -a)
echo 'export OKP4_WALLET_ADDRESS='${OKP4_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export OKP4_VALOPER_ADDRESS='${OKP4_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile


### Fund your wallet (to create validator) [link faucet](https://faucet.okp4.network)

### Create validator (after recieving of tokens and must important sync is false)

+ replace with your wallet name and with your validator name

okp4d tx staking create-validator \
--amount 100000uknow \
--from WALLETNAME \
--commission-max-change-rate "0.01" \
--commission-max-rate "0.2" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--pubkey $(okp4d tendermint show-validator) \
--moniker NODENAME \
--chain-id okp4-nemeton


# Snapchot optional (PPNV)

### install dependencies, if needed

sudo systemctl stop okp4d
cp $HOME/.okp4d/data/priv_validator_state.json $HOME/.okp4d/priv_validator_state.json.backup
okp4d tendermint unsafe-reset-all --home $HOME/.okp4d
STATE_SYNC_RPC=http://rpc.okp.ppnv.space:36657
STATE_SYNC_PEER=be9841ace1d71a4c7681918ee39f5e00d8e96a82@rpc.okp.ppnv.space:36656
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 1000))
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)
sed -i.bak -e "s|^enable *=.*|enable = true|" $HOME/.okp4d/config/config.toml
sed -i.bak -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
$HOME/.okp4d/config/config.toml
sed -i.bak -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
$HOME/.okp4d/config/config.toml
sed -i.bak -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
$HOME/.okp4d/config/config.toml
sed -i.bak -e "s|^persistent_peers *=.*|persistent_peers = \"$STATE_SYNC_PEER\"|" \
$HOME/.okp4d/config/config.toml
mv $HOME/.okp4d/priv_validator_state.json.backup $HOME/.okp4d/data/priv_validator_state.json
sudo systemctl restart okp4d && journalctl -u okp4d -f --no-hostname -o cat

### Delegate to yourself

okp4d tx staking delegate $(okp4d keys show wallet --bech val -a) 1000000uknow --from wallet --chain-id okp4-nemeton --gas-prices 0.1uknow --gas-adjustment 1.5 --gas auto -y


### Redelegate

okp4d tx staking redelegate $(okp4d keys show wallet --bech val -a) 1000000uknow --from wallet --chain-id okp4-nemeton --gas-prices 0.1uknow --gas-adjustment 1.5 --gas auto -y

### Get Validator Info

okp4d status 2>&1 | jq .ValidatorInfo

### Get Catching Up

okp4d status 2>&1 | jq .SyncInfo.catching_up

### Get Latest Height

okp4d status 2>&1 | jq .SyncInfo.latest_block_height

## Get Peer

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

### Reset Node

okp4d tendermint unsafe-reset-all --home $HOME/.okp4d --keep-addr-book

### Remove Node

sudo systemctl stop okp4d && sudo systemctl disable okp4d && sudo rm /etc/systemd/system/okp4d.servi

### Run Service

sudo systemctl start okp4d

### Stop Service

sudo systemctl stop okp4d

### Restart Service

sudo systemctl restart okp4d

### Check Service Status

sudo systemctl status okp4d

### Check Service Logs

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

### Delete the node

sudo systemctl stop okp4d
sudo systemctl disable okp4d
sudo rm /etc/systemd/system/okp4* -rf
sudo rm $(which okp4d) -rf
sudo rm $HOME/.okp4d* -rf
sudo rm $HOME/okp4 -rf
sed -i '/OKP4_/d' ~/.bash_profile


[buy me a cup of coffe ](https://www.paypal.com/paypalme/AbdelAkridi?country.x=NL&locale.x=en_US)