Giter Site home page Giter Site logo

gitshock's Introduction

Sistem gereksinimleri (tavsiye edilen):

  • 4CPU 4GB RAM 250-500 GB SSD

Sunucu Güncellemesi

sudo apt-get update && sudo apt-get upgrade -y

Kütüphaneler

sudo apt install curl tar wget tmux htop net-tools clang  libssl-dev jq micro build-essential git screen gcc g++ cmake pkg-config llvm-dev libclang-dev clang protobuf-compiler make ncdu -y 

Go

cd
wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile

Geth

sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt update -y
sudo apt install ethereum -y
sudo apt install jq
go install github.com/protolambda/eth2-testnet-genesis@latest
go install github.com/protolambda/eth2-val-tools@latest

Rust

cd 
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"

Lighthouse

wget https://github.com/sigp/lighthouse/releases/v.4.0.1/lighthouse-v4.0.1-x86_64-unknown-linux-gnu-portable.tar.gz
tar -xvf lighthouse-v4.0.1-x86-unknown-linux-gnu-portable.tar.gz
sudo cp lighthouse /usr/local/bin
lighthouse --version

İsim ve cüzdan adresinizi bash_profile kaydedin

Cüzdan adresi için metamasktan yeni bir cüzdan oluşturabilirsiniz

echo "export ISIM="<isminiz>"" >> $HOME/.bash_profile
echo "export CUZDAN="<cüzdanadresi>"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Cartenz Chain kaynak dosyaları

cd
git clone https://github.com/gitshock-labs/testnet-list

Loglar ve data için klasörler

Komutları tek tek girin.

cd testnet-list
git checkout master
mkdir beacon-1
mkdir beacon-2 
mkdir validator
mkdir logs
cd logs
touch geth.log
touch beacon_1.log
touch beacon_2.log
touch validator.log
cd ..

Staking-cli

git clone https://github.com/gitshock-labs/staking-cli.git
cd staking-cli
git checkout main
sudo apt install python3-pip -y
pip3 install -r requirements.txt
sudo python3 setup.py install
./deposit.sh install

Validatör keyleri oluşturun

./deposit.sh new-mnemonic

Komutu girdikten sonra

  • İlk soruya 3 yazın
  • İkinci soruya 4
  • Sonraki soru kaç validatör çalıştıracaksınız, 1 yazın
  • Hangi zincirde çalıştıracağınızı soruyor, cartenz yazıp enter.
  • Son olarak şifre oluşturmanızı isteyecek image

Şifrenizi girdikten sonra mnemonicler görünecek. Bunları kaydedip bir yere saklayın. Ardından bir tuşa basın mnemonicleri tekrar girmenizi isteyecek. Ve validatör keyleri oluşturulacak.

  • image

JWT Secret oluşturun

openssl rand -hex 32 | tr -d "\n" > "jwt.hex"

İnitalize

geth --datadir /root/testnet-list/cartenz-data init /root/testnet-list/execution/genesis.json

Execution Layerde hesap oluşturun

Şifre oluşturmanızı isteyecek

geth account new --datadir "cartenz-data"

Execution Layer çalıştırın

nohup geth \
--http --http.api="admin,eth,net,web3,txpool" \
--http.port 8545 \
--authrpc.port 8551 \
--discovery.port 30303 \
--port 30303 \
--http.addr 0.0.0.0 \
--authrpc.addr 0.0.0.0 \
--authrpc.jwtsecret /root/testnet-list/jwt.hex \
--datadir /root/testnet-list/cartenz-data \
--http.corsdomain=* \
--http.vhosts=* \
--networkid=1881 \
--syncmode=full \
--identity "$ISIM" \
--cache 1024 \
--bootnodes "enode://0e2b41699b95e8c915f4f5d18962c0d2db35dc22d3abbebbd25fc48221d1039943240ad37a6e9d853c0b4ea45da7b6b5203a7127b5858c946fc040cace8d2d63@147.75.71.217:30303,enode://45b4fff6ab970e1e490deea8a5f960d806522fafdb33c8eaa38bc0ae970efc2256fc5746f0ecfec770af24c44864a3e6772a64f2e9f031f96fd4af7fd0483110@147.75.71.217:30304" \
> /root/testnet-list/logs/geth.log &

Konsola giriş yapın

geth attach http://localhost:8545

Peer adresini öğrenmek için

  • admin.nodeInfo.enode

Bağlandığınız peerleri görmek için

  • admin.peers

Bağlandığınız peerlar arasında bu sitedeki isimlerde bir veya birkaçı varsa sonraki adıma geçebilirsiniz.

  • Örnek image image

Peer eklemeniz gerekirse;

  • admin.addPeer("enode://0e2b41699b95e8c915f4f5d18962c0d2db35dc22d3abbebbd25fc48221d1039943240ad37a6e9d853c0b4ea45da7b6b5203a7127b5858c946fc040cace8d2d63@147.75.71.217:30303")
  • admin.addTrustedPeer("enode://0e2b41699b95e8c915f4f5d18962c0d2db35dc22d3abbebbd25fc48221d1039943240ad37a6e9d853c0b4ea45da7b6b5203a7127b5858c946fc040cace8d2d63@147.75.71.217:30303")
  • exit ile konsoldan çıkış yapın.

Consensus Layer başlatın

 nohup lighthouse \
--testnet-dir="/root/testnet-list/consensus" \
--datadir /root/testnet-list/beacon-1 \
--eth1 \
--http \
--gui \
--http-address 127.0.0.1 \
--http-allow-origin="*" \
--http-allow-sync-stalled \
--execution-endpoints http://127.0.0.1:8551 \
--http-port 5052 \
--enr-udp-port=9000 \
--enr-tcp-port=9000 \
--discovery-port=9000 \
--jwt-secrets="/root/testnet-list/jwt.hex" \
--graffiti "$ISIM" \
--suggested-fee-recipient=$CUZDAN \
> /root/testnet-list/logs/beacon_1.log &

ENR Key

Çıktısını kaydedin.

curl http://localhost:5052/eth/v1/node/identity | jq

image

İkinci Consensus Layer başlatın

<SizinENRKey> yazan yazan yere bir önceki komutta elde ettiğiniz ENR keyi girin

nohup lighthouse beacon \
--testnet-dir="/root/testnet-list/consensus" \
@@ -212,7 +215,7 @@ nohup lighthouse beacon \
--jwt-secrets="/root/testnet-list/jwt.hex" \
--graffiti "$ISIM" \
--suggested-fee-recipient="$CUZDAN" \
--boot-nodes="$(curl http://localhost:5052/eth/v1/node/identity | jq .data.enr),enr:-MS4QHXShZPtKwtexK2p9yCxMxDwQ-EvdH_VemoxyVyweuaBLOC_8cmOzyx7Gy-q6-X8KGT1d_rhAn_ekXnhpCkA_REHh2F0dG5ldHOIAAAAAAAAAACEZXRoMpBMfxReAmd2k___________gmlkgnY0gmlwhJNLR9mJc2VjcDI1NmsxoQJB10N42nK6rr7Q_NIJNkJFi2uo6itMTOQlPZDcCy09T4hzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIyiDdWRwgiMo,enr:-MS4QEw_RpORuoXgJ0279QuVLLFAiXevNdYtU7vR8S1CY7X9CS6tceMbaxdIIJYRmHN43ClqHtE2b0H0maSb18cm9D0Hh2F0dG5ldHOIAAAAAAAAAACEZXRoMpBMfxReAmd2k___________gmlkgnY0gmlwhJNLR9mJc2VjcDI1NmsxoQOkQIyCVHLbLjIFMjqNSJEUsbYMe4Tsv9blUWvN6Rsft4hzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIymDdWRwgiMp" \
--boot-nodes="<SizinENRKey>,enr:-MS4QHXShZPtKwtexK2p9yCxMxDwQ-EvdH_VemoxyVyweuaBLOC_8cmOzyx7Gy-q6-X8KGT1d_rhAn_ekXnhpCkA_REHh2F0dG5ldHOIAAAAAAAAAACEZXRoMpBMfxReAmd2k___________gmlkgnY0gmlwhJNLR9mJc2VjcDI1NmsxoQJB10N42nK6rr7Q_NIJNkJFi2uo6itMTOQlPZDcCy09T4hzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIyiDdWRwgiMo,enr:-MS4QEw_RpORuoXgJ0279QuVLLFAiXevNdYtU7vR8S1CY7X9CS6tceMbaxdIIJYRmHN43ClqHtE2b0H0maSb18cm9D0Hh2F0dG5ldHOIAAAAAAAAAACEZXRoMpBMfxReAmd2k___________gmlkgnY0gmlwhJNLR9mJc2VjcDI1NmsxoQOkQIyCVHLbLjIFMjqNSJEUsbYMe4Tsv9blUWvN6Rsft4hzeW5jbmV0c4gAAAAAAAAAAIN0Y3CCIymDdWRwgiMp" \
> /root/testnet-list/logs/beacon_2.log

Buraya kadar hata almadan yaptıysanız

Geth logları önce böyle görünecek

tail -f /root/testnet-list/logs/geth.log

image

Ardından böyle görünecek

image

Beacon_1 logları

tail -f /root/testnet-list/logs/beacon_1.log

image

Beacon_2 logları

tail -f /root/testnet-list/logs/beacon_2.log

image

Son olarak ip adresinizi discordda #cartenz-testnet-serverkanalına gönderin. Nodeniz nodemoonda görünmeye başlayacak.

gitshock's People

Contributors

dacyxs avatar

Watchers

 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.