Install 0GDA Node & Client di Ubuntu-Linux
Spec vps
CPU 8 core
RAM 16 GB
Contabo spec VPS-3
#Buat Wallet EVM (buat di OKX simpan pharse/mnemonic dan privatekye nya)
#RPC 0G
https://chainlist.org/chain/16600
#Claim faucet (minimal harus 31 A0GI, syarat run node)
https://faucet.0g.ai/
#Staking ke validator (wajib minimal 31 A0GI)
Note-1: disarankan menjalankan skrip di tmux atau screen, untuk menghindari vps terputus dari laptop/pc anda.
Note-2: jalankan tutorial ini secara berurut, dari atas ke bawah.
=====VPS AREA (UNTUK STAKING)=====
#Update dan install dependencies
sudo su
apt update && apt install git make build-essential gcc -y
#Install 0g binary (Copy paste saja)
cd $HOME
rm -rf 0g-chain
git clone https://github.com/0glabs/0g-chain.git
cd 0g-chain
git checkout v0.4.0
git submodule update --init
make install
0gchaind version
#Add wallet (ubah nama wallet, jangan ada spasi)
0gchaind keys add "wallet_name" --eth --recover
#Enter your bip39 mnemonic (masukkan mnemonic anda, yg ada faucet 0g nya ya)
#Enter keyring passphrase (attempt 1/3): (buat password baru)
#Re-enter keyring passphrase: (ulangi ketik password)
#Simpan hasilnya yakk
#Staking /delegate (jangan lupa ubah walllet_name, ketik password)
0gchaind tx staking delegate "0gvaloper1arf2rfrsx4pu9kpzxj06ydces6ptn8jwvth73n" 30000000ua0gi --from "wallet_name" --chain-id zgtendermint_16600-2 --gas-adjustment 1.5 --gas auto --gas-prices 0.00252ua0gi --node https://rpc-0gchain.josephtran.xyz:443 -y
=====END VPS AREA (UNTUK STAKING)======
=====VPS AREA (INSTALL DA NODE)=========
Install 0G DA Node di Ubuntu-Linux
#Install dependencies
sudo apt-get update
sudo apt-get install clang cmake build-essential pkg-config libssl-dev protobuf-compiler llvm llvm-dev cargo git -y
#Install go (Copy paste saja)
cd $HOME && \
ver="1.22.0" && \
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 && \
go version
#Install rust (enter saja, copy paste perbaris)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustc --version
#Download & build binary (pastikan compiling tidak ada yg error)
git clone -b v1.1.3 https://github.com/0glabs/0g-da-node.git
cd $HOME/0g-da-node
git stash
git fetch --all --tags
git checkout 43499a2
git submodule update --init
cargo build --release
#Download params (pastikan verified successfully)
./dev_support/download_params.sh
#Generate BLS private key (Simpan BLS private key Anda)
cargo run --bin key-gen
#Setup config.toml (edit socket_address = VPS_Public_IP_Anda:34000 | signer_bls_private_key = BLS_Private_Key_Anda | signer_eth_private_key = Private_key_wallet_Anda | miner_eth_private_key = Private_key_wallet_Anda | save config, ctrl x, y enter)
rm -rf $HOME/0g-da-node/config.toml && curl -o $HOME/0g-da-node/config.toml https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/0g_da_config.toml && nano $HOME/0g-da-node/config.toml
#Create service (untuk run otomatis, copy paste saja)
sudo tee /etc/systemd/system/0gda.service > /dev/null <<EOF
[Unit]
Description=0G-DA Node
After=network.target
[Service]
User=$USER
WorkingDirectory=$HOME/0g-da-node
ExecStart=$HOME/0g-da-node/target/release/server --config $HOME/0g-da-node/config.toml
Restart=always
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
#Start Service (run node)
sudo systemctl daemon-reload && sudo systemctl enable 0gda && sudo systemctl start 0gda
#Cek Logs (pastikan signer registered dan tidak ada error | stop, ctrl c)
sudo journalctl -u 0gda -f -o cat
#DONE
=====END VPS AREA (INSTALL DA NODE)=========
=====VPS AREA (INSTALL 0GDA CLIENT)==========
Install 0GDA Client di Ubuntu-Linux
#Install dependencies
cd
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker $USER && newgrp docker
sudo systemctl enable docker.service && sudo systemctl enable containerd.service
#Download & Update node
git clone -b v1.0.1-testnet https://github.com/0glabs/0g-da-client.git
cd $HOME/0g-da-client
git stash
git fetch --all --tags
git checkout 0847084
git submodule update --init
#Build node
cd $HOME/0g-da-client && make build
docker build -t 0gclient -f $HOME/0g-da-client/Dockerfile .
#Setup run.sh (ikuti/lanjut ke instruksi #Edit run.sh)
rm -rf $HOME/0g-da-client/run/run.sh && nano $HOME/0g-da-client/run/run.sh
#Edit run.sh (pastekan skrip di bawah ini | edit YOUR_PRIVATE_KEY | VPS_IP_ANDA:34000 | save, ctrl x, y enter)
/bin/combined \
--chain.rpc https://evmrpc-testnet.0g.ai \
--chain.private-key YOUR_PRIVATE_KEY \
--chain.receipt-wait-rounds 180 \
--chain.receipt-wait-interval 1s \
--chain.gas-limit 2000000 \
--combined-server.use-memory-db \
--combined-server.storage.kv-db-path /runtime/ \
--combined-server.storage.time-to-expire 2592000 \
--disperser-server.grpc-port 51001 \
--batcher.da-entrance-contract 0x857C0A28A8634614BB2C96039Cf4a20AFF709Aa9 \
--batcher.da-signers-contract 0x0000000000000000000000000000000000001000 \
--batcher.finalizer-interval 20s \
--batcher.confirmer-num 3 \
--batcher.max-num-retries-for-sign 3 \
--batcher.finalized-block-count 50 \
--batcher.batch-size-limit 500 \
--batcher.encoding-interval 3s \
--batcher.encoding-request-queue-size 1 \
--batcher.pull-interval 10s \
--batcher.signing-interval 3s \
--batcher.signed-pull-interval 20s \
--batcher.expiration-poll-interval 3600 \
--encoder-socket VPS_IP_ANDA:34000 \
--encoding-timeout 600s \
--signing-timeout 600s \
--chain-read-timeout 12s \
--chain-write-timeout 13s \
--combined-server.log.level-file trace \
--combined-server.log.level-std trace \
--combined-server.log.path /runtime/run.log
#Da Client Service Start (run node)
cd run && chmod +x ./start.sh && chmod +x ./run.sh
./start.sh
#Cek logs (pastikan block number bertambah | stop, ctrl c)
tail -f ~/0g-da-client/run/run.log
#DONE (cek BLS sign tx)
https://chainscan-newton.0g.ai/
=====END VPS AREA (INSTALL 0GDA CLIENT)======
REF
https://service.josephtran.xyz/testnet/zero-gravity-0g/0g-da-client
https://zstake.notion.site/DA-Client-Install-Guide-e309000566c14a64944863144b71ae47
https://zstake.notion.site/DA-Node-Install-Guide-5a3e217550af46ab9e12ad2998ad9de4
0 komentar:
Posting Komentar