sudo systemctl stop 0gd && sudo systemctl daemon-reload && sudo systemctl enable 0gd && sudo systemctl start 0gd
sudo systemctl stop zgs && sudo systemctl daemon-reload && sudo systemctl enable zgs && sudo systemctl restart zgs
sudo systemctl stop 0gkv && sudo systemctl daemon-reload && sudo systemctl enable 0gkv && sudo systemctl start 0gkv
sudo systemctl stop 0gda && sudo systemctl daemon-reload && sudo systemctl enable 0gda && sudo systemctl start 0gda
docker restart daclient
System Check
source <(curl -s <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/Server_info.sh>) # system info
source <(curl -s <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/0g_version.sh>) # node info
0gchain
source <(curl -s <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/0gcahin_test.sh>) # Block Sync
Storage Node
source <(curl -s <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/zgs_test.sh>) # Block & peer
source <(curl -s <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/zgs_config_test.sh>) # Config.toml
cd $HOME/0g-storage-node && git log --decorate=short --oneline | grep "tag: v" | head -n 1 && git log -1 --pretty=oneline # zgs version
sudo systemctl stop zgs && sudo systemctl daemon-reload && sudo systemctl enable zgs && sudo systemctl restart zgs && tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d) | grep -E "Auto detect public|network:|discv5:"
DA-Node
grep -E "^(data_path|encoder_params_dir|grpc_listen_address|eth_rpc_endpoin|socket_address|da_entrance_address|start_block_number|enable_das)" $HOME/0g-da-node/config.toml
View various logs
tail -f $HOME/.0gchain/log/chain.log
tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d)
sudo journalctl -u 0gda -f -o cat
sudo journalctl -u 0gda -f -o cat | grep -E "success"
tail -f ~/0g-da-client/run/run.log
sudo journalctl -u 0gkv -f -o cat
RPC List
<https://rpc.ankr.com/0g_newton>
<https://0g-json-rpc-public.originstake.com>
<https://0g-rpc-evm01.validatorvn.com>
<https://og-testnet-jsonrpc.itrocket.net>
<https://evmrpc-testnet.0g.ai>
RPC test
curl -s -X POST <https://rpc.ankr.com/0g_newton> -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | jq -r '.result' | xargs printf "%d\\n"
ZGS RPC Change
sed -i 's|^blockchain_rpc_endpoint = .*|blockchain_rpc_endpoint = "<https://og-testnet-jsonrpc.itrocket.net>"|g' ~/0g-storage-node/run/config.toml && sudo systemctl stop zgs && sudo systemctl daemon-reload && sudo systemctl enable zgs && sudo systemctl restart zgs && tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d)
sed -i 's|^network_boot_nodes = .*|network_boot_nodes = ["/ip4/47.251.117.133/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps","/ip4/47.76.61.226/udp/1234/p2p/16Uiu2HAm2k6ua2mGgvZ8rTMV8GhpW71aVzkQWy7D37TTDuLCpgmX"]|g' ~/0g-storage-node/run/config.toml
0G-DA RPC Change
sed -i 's|^eth_rpc_endpoint = .*|eth_rpc_endpoint = "<https://og-testnet-jsonrpc.itrocket.net:443>"|g' ~/0g-da-node/config.toml && sudo systemctl stop 0gda && sudo systemctl daemon-reload && sudo systemctl enable 0gda && sudo systemctl start 0gda && sudo journalctl -u 0gda -f -o cat