Giter Site home page Giter Site logo

0g-newton's Introduction

image

Linkler

🟢 rol alma

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

image

🟢 Sistem özellikleri

Ram cpu disk
8GB 4Core 500+ SSD
  • 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

🟢 Dosyaları indirin v0.2.3

git clone -b v0.2.3 https://github.com/0glabs/0g-chain.git
./0g-chain/networks/testnet/install.sh
source .profile
mkdir -p $HOME/.0gchain/cosmovisor/genesis/bin
mv /root/go/bin/0gchaind $HOME/.0gchain/cosmovisor/genesis/bin/

🟢 System

sudo ln -s $HOME/.0gchain/cosmovisor/genesis $HOME/.0gchain/cosmovisor/current -f
sudo ln -s $HOME/.0gchain/cosmovisor/current/bin/0gchaind /usr/local/bin/0gchaind -f
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]

🟢 Servis oluşturun

sudo tee /etc/systemd/system/0gchaind.service > /dev/null << EOF
[Unit]
Description=0gchaind node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.0gchain"
Environment="DAEMON_NAME=0gchaind"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.0gchain/cosmovisor/current/bin"

[Install]
WantedBy=multi-user.target
EOF
sudo ln -s $HOME/.0gchain/cosmovisor/genesis $HOME/.0gchain/cosmovisor/current -f
sudo ln -s $HOME/.0gchain/cosmovisor/current/bin/0gchaind /usr/local/bin/0gchaind -f
sudo systemctl daemon-reload
sudo systemctl enable 0gchaind.service

🟢 Node Ayarları

0gchaind config chain-id zgtendermint_16600-2
0gchaind config keyring-backend os
0gchaind config node tcp://localhost:16657
0gchaind init NODE-ISMINI-YAZ --chain-id zgtendermint_16600-2

🟢 Genesis dosyası

rm ~/.0gchain/config/genesis.json
wget -P ~/.0gchain/config https://github.com/0glabs/0g-chain/releases/download/v0.2.3/genesis.json
0gchaind validate-genesis

🟢 PEER VE SEED

PEERS="[email protected]:34656,[email protected]:26646,[email protected]:26646,[email protected]:26646,[email protected]:13456,bf8f850598d3d52ee176296f07c10212e0d334ca@testnet-v2-0g-rpc.emberstake.xyz:34140,[email protected]:36656" && \
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.0gchain/config/config.toml

🟢 Prune

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

sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0ua0gi"|g' $HOME/.0gchain/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.0gchain/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.0gchain/config/config.toml

🟢 Port Ayarları ( eğer başka bir proje çalışıyorsa kullanın )

echo "export G_PORT="16"" >> $HOME/.bash_profile
source $HOME/.bash_profile
sed -i.bak -e "s%:1317%:${G_PORT}317%g;
s%:8080%:${G_PORT}080%g;
s%:9090%:${G_PORT}090%g;
s%:9091%:${G_PORT}091%g;
s%:8545%:${G_PORT}545%g;
s%:8546%:${G_PORT}546%g;
s%:6065%:${G_PORT}065%g" $HOME/.0gchain/config/app.toml
sed -i.bak -e "s%:26658%:${G_PORT}658%g;
s%:26657%:${G_PORT}657%g;
s%:6060%:${G_PORT}060%g;
s%:26656%:${G_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${G_PORT}656\"%;
s%:26660%:${G_PORT}660%g" $HOME/.0gchain/config/config.toml
sed -i \
    -e 's/address = "127.0.0.1:8545"/address = "0.0.0.0:8545"/' \
    -e 's|^api = ".*"|api = "eth,txpool,personal,net,debug,web3"|' \
    $HOME/.0gchain/config/app.toml

🟢 Başlatalım

sudo systemctl daemon-reload
sudo systemctl restart 0gchaind

🟢 Log

sudo journalctl -u 0gchaind.service -f --no-hostname -o cat

🟢 Cüzdan oluşturma ( Eğer daha önceki testnete katıldıysanız aynı cüzdanı recover edin. İlk defa kuruyorsanız recover olan kodu kullanmayın.

  • recover kodu : Bu kod eski memoricler ile recover yapar.
0gchaind keys add CÜZDAN-ADI --eth --recover
  • Yeni cüzdan oluşturma
0gchaind keys add cuzdan-adini-yaz --eth

🟢 Evm adresi alma recover ettiyseniz aynısını verecek. Yeni oluşturduysanız onunla alakalı olanı verecek

echo "0x$(0gchaind debug addr $(0gchaind keys show CÜZDAN-ADINI-YAZ -a) | grep hex | awk '{print $3}')"
0gchaind keys unsafe-export-eth-key cüzdan-adi-yaz

🟢 senk Kontrol eğer senk olduysa FALSE çıktısı alırsınız daha sonra validatör oluşturun

0gchaind status | jq

image

🟢 Faucet

🟢 Validatör oluşturun ( Moniker yani görünen isminizi yazın ve cüzdan ismini yazın

0gchaind tx staking create-validator \
  --amount=1000000ua0gi \
  --pubkey=$(0gchaind tendermint show-validator) \
  --moniker=MONİKER-YAZ \
  --chain-id=zgtendermint_16600-2 \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation=1 \
  --from=CUZDAN-ADI-YAZ \
  --identity="" \
  --website="https://herculesnode.com" \
  --details="HerculesNode community" \
  --gas=auto \
  --gas-adjustment=1.4 \
  -y

🟢 validator check edelim

  • Daha önce validator çalıştırdıysanız validatör oluşturma kodunu girdiğinizde eğer eski cüzdanı recovery yaptıysanız eski validator bilgileriniz gelecek. Şimdi /root/.0gchain/config/priv_validator_key.json dosyasını yedekleyin !!!

  • Eğer yeni kurduysanız yeni validatör adresi verecek yine bu dosyayı yedekleyin.

  • check etmek istiyorsanız bu adrese gidin ve validator adresini sonuna ekleyin ve açın https://explorer.herculesnode.com/0G-Testnet/staking/VALIDATOR-ADRESINIZ

  • Daha sonra yedekledğiniz priv_validator_key.json dosyasını bir nor defteri ile açın explorer üzerinden bilgiler aynımı kontrol edin örnek resimdeki gibi açtığınız dosyadaki bilgiler ile explorer üzerindeki bilgiler aynı olmalı

image

🟢 Delege işlemi

0gchaind tx staking delegate $(0gchaind keys show cüzdanadınıyaz --bech val -a) 1000000ua0gi --from cüzdanadınızyaz -y

🟢 Unjail işlemi

0gchaind tx slashing unjail --from CÜZDAN-ADINIZ --from CÜZDAN-İSMİ --gas=500000 --gas-prices=99999ua0gi -y

🟢 Aktif listeye bakma

0gchaind q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl

🟢 inAktif listeye bakma

0gchaind q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl

🟢 Bakiyeye bakma

0gchaind q bank balances $(0gchaind keys show CUZDAN-ADINIZ -a)

🟢 VAlidatör bilgilerine bakma duruma bakma

0gchaind q staking validator $(0gchaind keys show CUZDAN-ADINIZ --bech val -a)

🟢 Nodu silme

sudo systemctl stop 0gchaind.service
sudo systemctl disable 0gchaind.service
sudo rm /etc/systemd/system/0gchaind.service
rm -rf $HOME/.0gchain $HOME/0g-chain

0g-newton's People

Contributors

herculesnode avatar aksamlan avatar

Stargazers

 avatar oibek avatar  avatar

Forkers

bozdemir52

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.