Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Cumulo-pro/OKP4
https://github.com/Cumulo-pro/OKP4
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/Cumulo-pro/OKP4
- Owner: Cumulo-pro
- Created: 2022-12-18T21:14:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-20T16:13:12.000Z (almost 2 years ago)
- Last Synced: 2024-06-08T18:39:54.247Z (5 months ago)
- Language: HTML
- Size: 67.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ccamel - Cumulo-pro/OKP4 - (HTML)
README
Basic tools for a validator node in OKP4
OKP4, the Open Protocol for Knowledge
π Overview
OKP4 is a domain-specific, layer 1 blockchain dedicated to the exchange of data with minimal trust. Digital Territory for the Data Economy and the Next Generation of Data ApplicationsOKP4 is PoS and is based on Tendermint. Its validators participate in the consensus protocol by casting votes containing cryptographic signatures signed by each validatorβs private key.
The KNOW is the native token of OKP4.
Chain ID: okp4-nemeton-1 | Latest version Tag: v3.0.0
π Useful links
Website: https://okp4.networkGitHub: https://github.com/okp4/okp4d
OKP4 whitepaper and documentation: https://docs.okp4.network
Frequently Asked Questions: https://nemeton.okp4.network/faq#faq
Cumulo Spanish Resources: http://cumulo.pro/okp4.html
Social media:
β Twitter: https://twitter.com/OKP4_Protocolβ Telegram: https://t.me/okp4network
β Discord: https://discord.com/invite/okp4
β Medium: https://blog.okp4.network/
β LinkedIn: https://www.linkedin.com/company/okp4-open-knowledge-protocol-for/
β Youtube: https://www.youtube.com/@okp4351
Explorers:
β https://explore.okp4.network/β https://okp4.explorers.guru/
βοΈHardware requirements
β Memory: 8 GB RAMβ CPU: 2 core
β Disk: 200 GB of storage
π Manual installation
Updating packages and installing dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make gcc -yEnvironment variables
To set environment variables replace your wallet and moniker < YOUR_WALLET_NAME> < YOUR_MONIKER> without <> , and save and import the variables into the system.echo "export OKP4_WALLET=""" >> $HOME/.bash_profile
echo "export OKP4_MONIKER=""" >> $HOME/.bash_profile
echo "export OKP4_CHAIN_ID="okp4-nemeton-1"" >> $HOME/.bash_profile
source $HOME/.bash_profileInstall go
cd $HOME
VER="1.19.1"
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
go versionDownload and compile binaries
cd || return
rm -rf okp4d
git clone https://github.com/okp4/okp4d.git
cd okp4d || return
git checkout v3.0.0
make install
okp4d version # 3.0.0Configure and start the application
okp4d config chain-id okp4-nemeton-1
okp4d init $OKP4_MONIKER --chain-id $OKP4_CHAIN_IDDownload genesis
curl https://raw.githubusercontent.com/okp4/networks/main/chains/nemeton-1/genesis.json > $HOME/.okp4d/config/genesis.json
sha256sum $HOME/.okp4d/config/genesis.json #2ec25f81cc2abecbc0da3de45b052ea3314d0d658b1b7f4c7b6a48d09254c742Set seeds and peers
Seedssed -i -e "s|^seeds *=.*|seeds = \"3f472746f46493309650e5a033076689996c8881@okp4-testnet.rpc.kjnodes.com:36659\"|" $HOME/.okp4d/config/config.toml
Peers[email protected]:42656,[email protected]:61356,[email protected]:12656,[email protected]:43656,[email protected]:12233,[email protected]:36656,8d8fdad759361a57121903632adbd66ad072b1ab@okp4-testnet.nodejumper.io:29656,[email protected]:26656,[email protected]:36656,[email protected]:34656,a7f1dcf7441761b0e0e1f8c6fdc79d3904c22c01@[2a02:c206:2093:4875::1]:36656,[email protected]:36656,[email protected]:28656,[email protected]:26656,[email protected]:26616,[email protected]:26106,[email protected]:26656,[email protected]:28656,[email protected]:26656,[email protected]:21656,[email protected]:26157,[email protected]:26656,[email protected]:26646,[email protected]:17656,[email protected]:26656,[email protected]:51656,[email protected]:37656,[email protected]:31656,[email protected]:36656,[email protected]:31656,[email protected]:26656,[email protected]:26656,[email protected]:49656,[email protected]:26656,[email protected]:26657,[email protected]:36656,[email protected]:28656,[email protected]:26656,[email protected]:26656,[email protected]:36658,[email protected]:26656,[email protected]:36656,[email protected]:28656,[email protected]:36656,[email protected]:36656,[email protected]:26656,2f9e54645aca860f703e3f756fa7c472b829a9a9@tenderseed.ccvalidators.com:26009,[email protected]:26656sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.okp4d/config/config.tomlConfigure pruning
sed -i 's|pruning = "default"|pruning = "custom"|g' $HOME/.okp4d/config/app.toml
sed -i 's|pruning-keep-recent = "0"|pruning-keep-recent = "100"|g' $HOME/.okp4d/config/app.toml
sed -i 's|pruning-interval = "0"|pruning-interval = "17"|g' $HOME/.okp4d/config/app.toml
#Set the minimum gas price
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0001uknow"|g' $HOME/.okp4d/config/app.tomlActivate prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.okp4d/config/config.tomlClean up old data
okp4d tendermint unsafe-reset-all --home $HOME/.okp4d --keep-addr-book
β»οΈ Fast synchronisation with snapshot (Optional)
You can sync your OKP4 node quickly by downloading a recent snapshot from kjnodes (https://services.kjnodes.com/home/testnet/okp4/snapshot), Kolot (https://github.com/Kolot86/Snapshots-StateSync/blob/main/OKP4/Snapshot.md), β¦
sudo systemctl stop okp4d
cp $HOME/.okp4d/data/priv_validator_state.json $HOME/.okp4d/priv_validator_state.json.backup
rm -rf $HOME/.okp4d/data
cd $HOME
rm -rf $HOME/.okp4d/data
curl -L https://snapshots.kjnodes.com/okp4-testnet/snapshot_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.okp4d
mv $HOME/.okp4d/priv_validator_state.json.backup $HOME/.okp4d/data/priv_validator_state.jsonπ Service with SystemD
Create the service filesudo tee /etc/systemd/system/okp4d.service > /dev/null << EOF
[Unit]
Description=OKP4 Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which okp4d) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOFEnable, start service and check logs
sudo systemctl daemon-reload
sudo systemctl enable okp4d
sudo systemctl restart okp4d
sudo journalctl -u okp4d -f --no-hostname -o catπWallet
Create wallet
Donβt forget to save the mnemonic.
okp4d keys add $OKP4_WALLETRestore wallet
okp4d keys add $OKP4_WALLET --recoverDeposit funds into your wallet
Before creating a validator, you have to deposit funds in your wallet, go to the OKP4 discord server and request them in the faucet channel.
/reques <<-YOUR_WALLET_ADDRESS->>πValidator
Save the wallet and validator address
OKP4_WALLET_ADDRESS=$(okp4d keys show $OKP4_WALLET -a)
OKP4_VALOPER_ADDRESS=$(okp4d keys show $OKP4_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_profileCreate validator
Before creating a validator, you should make sure that the node is synchronised and check the balance of your wallet.
Check synchronisation status
Once your node is fully synchronised, the output will read false.
okp4d status 2>&1 | jq .SyncInfoCheck your balance
okp4d q bank balances $(okp4d keys show wallet -a)Create validator
okp4d tx staking create-validator \
--amount=1000000uknow \
--pubkey=$(okp4d tendermint show-validator) \
--moniker=$OKP4_MONIKER \
--chain-id=$OKP4_CHAIN_ID \
--commission-rate=0.05 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--from=wallet \
--gas-adjustment=1.4 \
--gas=auto \
-yYou can add the flags β website β security-contact β identity β details (optional)
--website \
--security-contact \
--identity \
--detailsπ Monitoring
If you want to set up a monitoring and alerting system use our guide to monitoring Cosmos nodes with tenderduty.
π SystemD commands
Stop the service
sudo systemctl stop okp4dStart service
sudo systemctl start okp4dRestart service
sudo systemctl restart okp4dCheck logs
sudo journalctl -u okp4d -f --no-hostname -o catCheck status
sudo systemctl status okp4dπ Node information
Synchronization information
okp4d status 2>&1 | jq .SyncInfoNode information
okp4d status 2>&1 | jq .NodeInfoValidator information
okp4d status 2>&1 | jq .ValidatorInfoGet peers
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/".*//')π Wallet operation
Check balance
okp4d query bank balances $OKP4_WALLET_ADDRESSWallet Key List
okp4d keys listCreate a new wallet
okp4d keys add $OKP4_WALLETWallet recovering
okp4d keys add $OKP4_WALLET --recoverDelete wallet
okp4d keys delete $OKP4_WALLETTransfer funds
okp4d tx bank send $OKP4_WALLET_ADDRESS 800000000uknow --gas auto --gas-adjustment 1.3 --fees 14uknow㪠Governance
List all proposals
okp4d query gov proposal 1Vote YES
okp4d tx gov vote 1 yes --from $OKP4_WALLET --chain-id $OKP4_CHAIN_ID --gas-adjustment 1.4 --gas auto -yVote NO
okp4d tx gov vote 1 no --from $OKP4_WALLET --chain-id $OKP4_CHAIN_ID --gas-adjustment 1.4 --gas auto -yRefrain
okp4d tx gov vote 1 abstain --from $OKP4_WALLET --chain-id $OKP4_CHAIN_ID --gas-adjustment 1.4 --gas auto -yπ° Staking, delegation and rewards
Withdraw all rewards
okp4d tx distribution withdraw-all-rewards --from $OKP4_WALLET --chain-id $OKP4_CHAIN_ID --gas auto --gas-adjustment 1.3Withdraw commission
okp4d tx distribution withdraw-rewards $OKP4_VALOPER_ADDRESS --from $OKP4_WALLET --commission --fees 20uknowDelegate Stake
okp4d tx staking delegate $OKP4_VALOPER_ADDRESS 10000000uknow --from $OKP4_WALLET --chain-id $OKP4_CHAIN_ID --gas=auto --gas-adjustment 1.3βοΈ Validator operation
Edit validator
okp4d tx staking edit-validator \
--moniker=$NODENAME \
--identity= \
--website="" \
--details="" \
--chain-id=$OKP4_CHAIN_ID \
--from=$OKP4_WALLET
Validator information
okp4d status 2>&1 | jq .ValidatorInfoJailing information
okp4d q slashing signing-info $(okp4d tendermint show-validator)Validator unjailing
okp4d tx slashing unjail --broadcast-mode=block --from $OKP4_WALLET --chain-id $OKP4_CHAIN_ID --gas auto --gas-adjustment 1.5π Delete node
sudo systemctl stop okp4d
sudo systemctl disable okp4d
sudo rm -rf /etc/systemd/system/okp4d*
sudo systemctl daemon-reload
sudo rm $(which okp4d)
sudo rm -rf $HOME/.okp4d
sudo rm -fr $HOME/ okp4d
sed -i "/OKP4_/d" $HOME/.bash_profileAuthors: Sami & Mon
http://cumulo.pro/