Git Product home page Git Product logo

0g-testnet's Introduction

image

Linkler

🟢 rol alma

  • Discord Roles kanalına gidin ve rolleri alın

image

🟢 Sistem özellikleri

  • 8 GB RAM

  • CPU: 4 cores

  • Disk: 500 GB SSD

  • Ubuntu 20.04

  • Bunlar max gereksinim daha düşükte çalıştırabilir !

🟢 Sistemi güncelleyelim

sudo apt update && \
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y

🟢 Go kuralım

cd $HOME && \
ver="1.21.3" && \
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" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

🟢 Evmosd Yapı oluşturalım

git clone https://github.com/0glabs/0g-evmos.git
cd 0g-evmos
git checkout v1.0.0-testnet
make install
evmosd version

🟢 Ayarları yapalım

echo 'export MONIKER="My_Node"' >> ~/.bash_profile
echo 'export CHAIN_ID="zgtendermint_9000-1"' >> ~/.bash_profile
echo 'export WALLET_NAME="wallet"' >> ~/.bash_profile
echo 'export RPC_PORT="26657"' >> ~/.bash_profile
source $HOME/.bash_profile

🟢 Değişkenleri Ayarlayalım

cd $HOME
evmosd init $MONIKER --chain-id $CHAIN_ID
evmosd config chain-id $CHAIN_ID
evmosd config node tcp://localhost:$RPC_PORT
evmosd config keyring-backend os 

🟢 Genesis dosyası oluşturalım

wget https://github.com/0glabs/0g-evmos/releases/download/v1.0.0-testnet/genesis.json -O $HOME/.evmosd/config/genesis.json

🟢 Seed ekleyelim

PEERS="1248487ea585730cdf5d3c32e0c2a43ad0cda973@peer-zero-gravity-testnet.trusted-point.com:26326" && \
SEEDS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656" && \
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.evmosd/config/config.toml

🟢 Port değiştirmek istiyorsanız ( Opsiyonel ) aşağıdaki portları değiştirip kullanabilirsiniz.

EXTERNAL_IP=$(wget -qO- eth0.me) \
PROXY_APP_PORT=26658 \
P2P_PORT=26656 \
PPROF_PORT=6060 \
API_PORT=1317 \
GRPC_PORT=9090 \
GRPC_WEB_PORT=9091
sed -i \
    -e "s/\(proxy_app = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$PROXY_APP_PORT\"/" \
    -e "s/\(laddr = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$RPC_PORT\"/" \
    -e "s/\(pprof_laddr = \"\)\([^:]*\):\([0-9]*\).*/\1localhost:$PPROF_PORT\"/" \
    -e "/\[p2p\]/,/^\[/{s/\(laddr = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$P2P_PORT\"/}" \
    -e "/\[p2p\]/,/^\[/{s/\(external_address = \"\)\([^:]*\):\([0-9]*\).*/\1${EXTERNAL_IP}:$P2P_PORT\"/; t; s/\(external_address = \"\).*/\1${EXTERNAL_IP}:$P2P_PORT\"/}" \
    $HOME/.evmosd/config/config.toml
sed -i \
    -e "/\[api\]/,/^\[/{s/\(address = \"tcp:\/\/\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$API_PORT\4/}" \
    -e "/\[grpc\]/,/^\[/{s/\(address = \"\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$GRPC_PORT\4/}" \
    -e "/\[grpc-web\]/,/^\[/{s/\(address = \"\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$GRPC_WEB_PORT\4/}" $HOME/.evmosd/config/app.toml

🟢 Gas price ayarlayalım

sed -i "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.00252aevmos\"/" $HOME/.evmosd/config/app.toml

🟢 Servis dosyası oluşturalım

sudo tee /etc/systemd/system/ogd.service > /dev/null <<EOF
[Unit]
Description=OG Node
After=network.target

[Service]
User=$USER
Type=simple
ExecStart=$(which evmosd) start --home $HOME/.evmosd
Restart=on-failure
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

🟢 Nodeyi çalıştırın

sudo systemctl daemon-reload && \
sudo systemctl enable ogd && \
sudo systemctl restart ogd && \
sudo journalctl -u ogd -f -o cat

🟢 Snap indirelim

sudo systemctl stop ogd
wget https://rpc-zero-gravity-testnet.trusted-point.com/latest_snapshot.tar.lz4
cp $HOME/.evmosd/data/priv_validator_state.json $HOME/.evmosd/priv_validator_state.json.backup
evmosd tendermint unsafe-reset-all --home $HOME/.evmosd --keep-addr-book
lz4 -d -c ./latest_snapshot.tar.lz4 | tar -xf - -C $HOME/.evmosd
mv $HOME/.evmosd/priv_validator_state.json.backup $HOME/.evmosd/data/priv_validator_state.json
sudo systemctl restart ogd && sudo journalctl -u ogd -f -o cat
evmosd status | jq .SyncInfo

image

False çıktısı alın. Kuruluma devam edelim

🟢 Validatör için cüzdan oluşturalım. Şifre isteyecek bir şifre belirleyin sonra size cüzdan adresi ve kelimeleri verecek onları kaydedin

evmosd keys add $WALLET_NAME

image

🟢 Şimdi cüzdanımızı dönüştürelim faucet için bu adresi kullanacağız

Aşağıdaki kod size 0x başlayan bir cüzdan adresi verecek kaydedin. Bununla faucetten token alın

echo "0x$(evmosd debug addr $(evmosd keys show $WALLET_NAME -a) | grep hex | awk '{print $3}')"

image

🟢 Private keyi çıkarma daha sonra bunu tilki cüzdanınıza aktarın. Çıkan soruya Y yazın

evmosd keys unsafe-export-eth-key $WALLET_NAME

image

🟢 Faucet token alın https://faucet.0g.ai/

  • Faucet sonrası cüzdan adresinize token gelmişmi kontrol edin resimdeki gibi olacak
evmosd q bank balances $(evmosd keys show $WALLET_NAME -a) 

image

🟢 Token geldikten sonra validatör oluşturalım

evmosd tx staking create-validator \
  --amount=10000000000000000aevmos \
  --pubkey=$(evmosd tendermint show-validator) \
  --moniker=$MONIKER \
  --chain-id=$CHAIN_ID \
  --commission-rate=0.05 \
  --commission-max-rate=0.10 \
  --commission-max-change-rate=0.01 \
  --min-self-delegation=1 \
  --from=$WALLET_NAME \
  --identity="" \
  --website="" \
  --details="HerculesNode community" \
  --gas=500000 --gas-prices=99999aevmos \
  -y

🟢 Doğrulayıcınıza Delege edin ( balance komutuyla bakın çıkanı AMOUNT yazan yere yazın

evmosd tx staking delegate $(evmosd keys show $WALLET_NAME --bech val -a)  <AMOUNT>aevmos --from $WALLET_NAME --gas=500000 --gas-prices=99999aevmos -y

🟢 Validatör oluşturduktan sonra aşağıdaki dosyayı kesinlikle bilgisayarınıza yedekleyin

Dosya: priv_validator_key.json Dizin: $HOME/.evmosd/config/

Explorer kontrol edin : * Explorer

🟢 0g ağını ekleme ve dosya yükleme

Bu adrese gidin : https://scan-testnet.0g.ai/

  • Private key çıkardığınız cüzdanı bağlayın
  • Tool bölümüne gelin
  • bir resim seçin yükleyin
  • Cüzdanınızdan onay verin

🟢 yararlı komutlar

Log kontrol

sudo journalctl -u ogd -f -o cat

syc kontrol

evmosd status | jq .SyncInfo

Nodeyi yeniden başlat

sudo systemctl restart ogd

Nodeyi durdur

sudo systemctl stop ogd

validatör güncelle

evmosd tx staking edit-validator --website="<WEBSITE>" --details="<DESCRIPTION>" --moniker="<NEW_MONIKER>" --identity="<KEY BASE PREFIX>" --from=$WALLET_NAME --gas=500000 --gas-prices=99999aevmos -y

Doğrulayıcınızın kaçırılan blok sayacını ve hapishane ayrıntılarını sorgulayın

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

Unjail kurtulma

evmosd tx slashing unjail --from $WALLET_NAME --gas=500000 --gas-prices=99999aevmos -y

Doğrulayıcınıza Delege edin

evmosd tx staking delegate $(evmosd keys show $WALLET_NAME --bech val -a)  <AMOUNT>aevmos --from $WALLET_NAME --gas=500000 --gas-prices=99999aevmos -y

Bakiye görüntüle

evmosd q bank balances $WALLET_NAME

Başka cüzdana token gönder

evmosd tx bank send $WALLET_NAME <TO_WALLET> <AMOUNT>aevmos --gas=500000 --gas-prices=99999aevmos -y

Nodeyi güncelle

cd 0g-evmos
git fetch
git checkout tags/<version>
make install
evmosd version
sudo systemctl restart ogd && sudo journalctl -u ogd -f -o cat

Nodeyi sil

sudo systemctl stop ogd
sudo systemctl disable ogd
sudo rm /etc/systemd/system/ogd.service
rm -rf $HOME/.evmosd $HOME/0g-evmos

0g-testnet's People

Contributors

herculesnode avatar

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.