v0.4.4

Previous version v0.4.1

Stop the Storage node

sudo systemctl stop zgs

Compile the new binaries



#Compile new Binary
cd $HOME
cd $HOME/0g-storage-node
git stash
git fetch --all --tags
git checkout v0.4.4
git submodule update --init
cargo build --release

Configure Config.toml

# Get RPC Endpoint and Miner Key from config
blockchain_rpc_endpoint=$(grep -oP 'blockchain_rpc_endpoint\s*=\s*"\K[^"]*' $HOME/0g-storage-node/run/config.toml)
miner_key=$(grep -oP 'miner_key\s*=\s*"\K[^"]*' $HOME/0g-storage-node/run/config.toml)

#Check if the values are correct
echo "blockchain_rpc_endpoint = $blockchain_rpc_endpoint"
echo "miner_key = $miner_key"

#remove existing config File
rm $HOME/0g-storage-node/run/config.toml

#replace with new file with new contract adresses
mv $HOME/0g-storage-node/run/config-testnet-turbo.toml $HOME/0g-storage-node/run/config.toml

# Update the new config file with your RPC and miner Key
sed -i "/^#\s*blockchain_rpc_endpoint/s/^#//;s|blockchain_rpc_endpoint\s*=.*|blockchain_rpc_endpoint = \"$blockchain_rpc_endpoint\"|" $HOME/0g-storage-node/run/config.toml
sed -i "/^#\s*miner_key/s/^#//;s|miner_key\s*=.*|miner_key = \"$miner_key\"|" $HOME/0g-storage-node/run/config.toml

#Check if values are correct
cat $HOME/0g-storage-node/run/config.toml | grep -E 'blockchain_rpc_endpoint|miner_key'

Start the node

sudo systemctl daemon-reload && \
sudo systemctl enable zgs && \
sudo systemctl start zgs 
  • check the logs file

ls -lt $ZGS_LOG_DIR
  • full logs command

tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d)
  • Check Storage Node Sync Height

curl -X POST http://localhost:5678 -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"zgs_getStatus","params":[],"id":1}'  | jq

Last updated