Skip to content

๐Ÿ› ๏ธ Troubleshooting Guide โ€‹

This guide covers common issues and how to solve them for Storage Nodes.


Issue: Local Block Not Increasing

Step 1: Check if your RPC endpoint is active

bash
curl -X POST <YOUR_RPC_ENDPOINT> \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Example with the official endpoint:

bash
curl -X POST https://evmrpc-testnet.0g.ai \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

expected output:

json
{"jsonrpc":"2.0","id":1,"result":"0x875dc"}

0x875dc represents the latest block number in hex format. You can convert it to decimal to get the actual block height.

Step 2: Try switching to a working RPC

bash
nano $HOME/0g-storage-node/run/config.toml

In your config.toml, locate and update the blockchain_rpc_endpoint.

Example configuration:

toml
#######################################################################
###                     Log Sync Config Options                     ###
#######################################################################

# RPC endpoint to sync event logs on EVM compatible blockchain.
blockchain_rpc_endpoint = "https://evmrpc-testnet.0g.ai"

# Flow contract address to sync event logs.
log_contract_address = "0xbD75117F80b4E22698D0Cd7612d92BDb8eaff628"

Once you've made the change, save the file and restart the service:

bash
systemctl restart zgs

Check Full Logs

bash
tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d)

Check Blocks and Peers

bash
source <(curl -s https://raw.githubusercontent.com/astrostake/0G-Labs-script/refs/heads/main/storage-node/check_block.sh)

Need a reliable option? You can find community RPC Endpoints at AstroStake RPC Dashboard.

Issue: No Transactions Received on Storage Node

Explanation:
0G Labs uses a mechanism called PoRA (Proof of Random Access). Your storage node competes with other nodes to respond to data requests. Only selected nodes will get transactions.

What You Should Know:

  • It is normal not to receive transactions right away.
  • Keep your node online and make sure it is storing data correctly.
  • Make sure your node is synced with the latest block height.
bash
source <(curl -s https://raw.githubusercontent.com/astrostake/0G-Labs-script/refs/heads/main/storage-node/check_block.sh)
  • Check logs using:
bash
tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d)

If everything is running correctly, there's nothing else you need to do โ€” just be patient and wait.

Recommended VPS Specs:

  • CPU: 8 cores minimum
  • RAM: 32 GB minimum
  • Disk: 500GB / 1TB Fast SSD

If your VPS is below these specs, consider upgrading.

Issue: Why are my peers 0?

Explanation:

This is a known issue and can often be ignored.

What You Should Do:

If you are concerned, you can try adding network boot nodes.

Step 1: Open your configuration file:

bash
nano $HOME/0g-storage-node/run/config.toml

Step 2: Locate the network_boot_nodes line and update it. An example is provided below:

toml
# List of nodes to bootstrap UDP discovery. Note, `network_enr_address` should be
# configured as well to enable UDP discovery.
network_boot_nodes = ["/ip4/47.251.117.133/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps","/ip4/47.76.61.226/udp/1234/p2p/16Uiu2HAm2k6ua2mGgvZ8rTMV8GhpW71aVzkQWy7D37TTDuLCpgmX","/ip4/47.251.79.83/udp/1234/p2p/16Uiu2HAkvJYQABP1MdvfWfUZUzGLx1sBSDZ2AT92EFKcMCCPVawV", "/ip4/47.238.87.44/udp/1234/p2p/16Uiu2HAmFGsLoajQdEds6tJqsLX7Dg8bYd2HWR4SbpJUut4QXqCj", "/ip4/47.251.78.104/udp/1234/p2p/16Uiu2HAmSe9UWdHrqkn2mKh99b9DwYZZcea6krfidtU3e5tiHiwN", "/ip4/47.76.30.235/udp/1234/p2p/16Uiu2HAm5tCqwGtXJemZqBhJ9JoQxdDgkWYavfCziaqaAYkGDSfU"] 

# List of libp2p nodes to initially connect to.

These are the network_boot_nodes that I am currently use:

toml
"/ip4/47.251.117.133/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps", "/ip4/47.76.61.226/udp/1234/p2p/16Uiu2HAm2k6ua2mGgvZ8rTMV8GhpW71aVzkQWy7D37TTDuLCpgmX", "/ip4/47.251.79.83/udp/1234/p2p/16Uiu2HAkvJYQABP1MdvfWfUZUzGLx1sBSDZ2AT92EFKcMCCPVawV", "/ip4/47.238.87.44/udp/1234/p2p/16Uiu2HAmFGsLoajQdEds6tJqsLX7Dg8bYd2HWR4SbpJUut4QXqCj", "/ip4/47.251.78.104/udp/1234/p2p/16Uiu2HAmSe9UWdHrqkn2mKh99b9DwYZZcea6krfidtU3e5tiHiwN", "/ip4/47.76.30.235/udp/1234/p2p/16Uiu2HAm5tCqwGtXJemZqBhJ9JoQxdDgkWYavfCziaqaAYkGDSfU"

Step 3: Once you've made the change, save the file and restart the service:

bash
systemctl restart zgs

Check Full Logs

bash
tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d)

Check Blocks and Peers

bash
source <(curl -s https://raw.githubusercontent.com/astrostake/0G-Labs-script/refs/heads/main/storage-node/check_block.sh)
Is My Storage Node Fully Synced?

Check your local block height:

bash
source <(curl -s https://raw.githubusercontent.com/astrostake/0G-Labs-script/refs/heads/main/storage-node/check_block.sh)

โœ… If the difference is less than 5 blocks, your node is fully synced.

Understanding Snapshot for Storage Node (flow_db vs data_db)

Snapshot Usage on Storage Node:

Unlike validator or RPC nodes, the storage node uses two different databases:

  • flow_db: Contains the block metadata and structure (such as block headers).
  • data_db: Contains the actual data that is required for PoRA (Proof of Random Access) mining.

โš ๏ธ Important Considerations: โ€‹

  • If you only use flow_db from a snapshot:

    • Your node will appear synced (in terms of block height).
    • But it will not have the actual data required for PoRA.
    • As a result, your node may struggle to earn rewards or pass PoRA challenges until it has re-synced the data_db.
  • If you use someone elseโ€™s data_db:

    • You might end up mining for their data instead of your own.
    • This can result in reward misattribution โ€” your node could help others earn rewards without benefitting you.

โœ… Best Practice: โ€‹

  • Do not use snapshots for storage nodes.
  • Always sync from scratch to ensure that your node has the correct and complete data_db.
  • This guarantees that your node will respond accurately to PoRA challenges and earn rewards for your own data.

๐Ÿ“– For more details, see the official 0G documentation on snapshots.


๐Ÿ“š Resources โ€‹

If you encounter an issue not listed here, contact AstroStake on Discord.

Or ask the community on Discord.