Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/BccNodes/okp4-nemeton-testnet


https://github.com/BccNodes/okp4-nemeton-testnet

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        




Twitter






Website






BccNodes Explorer






# OKP4 Manuel node kurulumu



Orijinal Döküman:
>- [Doğrulayıcı kurulum talimatları](https://docs.okp4.network/docs/nodes/installation)

Explorer:
>- https://explorer.bccnodes.com/okp4

## Gerekli güncellemeleri ve araçları kurunuz
```
sudo apt update && sudo apt upgrade -y
```
```
sudo apt install curl build-essential git wget jq make gcc tmux chrony -y
```
## Go yükleyin (tek komut)
```
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
```
## Moniker ismimizi atayalım
```
NODENAME=
```

## Github reposunun bir kopyasını oluşturun ve kurun
```
cd $HOME
git clone https://github.com/okp4/okp4d.git
cd okp4d
make install
```

## Versiyonu kontrol edelim; v2.2.0 olmalı
```
okp4d version
```

## Nodeu çalıştırmaya hazırlanalım
```
okp4d config chain-id okp4-nemeton
okp4d config keyring-backend file
okp4d config node tcp://localhost:26657
okp4d init $NODENAME --chain-id okp4-nemeton

```
Cüzdan oluşturalım veya var olan cüzdanı geri getirelim

```okp4d keys add CÜZDANİSMİ``` #Yeni oluşturmak için

``` okp4d keys add CÜZDANİSMİ --recover ``` #Cüzdan kelimlerinizi kullanarak geri getirmek için

## Genesis ve addrbook yükleyelim
```
wget -qO $HOME/.okp4d/config/genesis.json "https://raw.githubusercontent.com/okp4/networks/main/chains/nemeton/genesis.json"
```

## Peers ayarlayalım
```
[email protected]:2280,[email protected]:26656,[email protected]:26656,[email protected]:26706,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:36656,[email protected]:16656,[email protected]:26656,[email protected]:53656,[email protected]:26656,[email protected]:6040,[email protected]:26656,[email protected]:26656

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.okp4d/config/config.toml
```

## Pruning Yapılandıralım
```
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="50"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.okp4d/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.okp4d/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.okp4d/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.okp4d/config/app.toml
```

## Zincir verilerini sıfırlayalım
```
okp4d tendermint unsafe-reset-all --home $HOME/.okp4d
```

## Servis Oluşturalım
```
sudo tee /etc/systemd/system/okp4d.service > /dev/null <- [BccNodes API endpoint](https://okp4.api.bccnodes.com/)

>- [BccNodes RPC endpoint](https://okp4.rpc.bccnodes.com/)

### State Sync
Aşağıdaki komutları çalıştırarak düğümünüzü dakikalar içinde senkronize edebilirsiniz.
```
sudo systemctl stop okp4d
okp4d tendermint unsafe-reset-all --home $HOME/.okp4d --keep-addr-book

SNAP_RPC="https://okp4-testnet-rpc.polkachu.com:443"

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

peers="[email protected]:17656"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.okp4d/config/config.toml

sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.okp4d/config/config.toml

sudo systemctl restart okp4d
sudo journalctl -fu okp4d -o cat
```