v0.4.1

Previous version v0.3.4

Stop the Storage node

sudo systemctl stop zgs

Compile the new binaries

#Remove DB directory
rm -r $HOME/0g-storage-node/run/db
rm -r $HOME/0g-storage-node/run/log
rm -r $HOME/0g-storage-node/run/network

#Compile new Binary
cd $HOME
cd $HOME/0g-storage-node
git fetch --all --tags
git checkout 302aa88
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)

Last updated