July 18
0g Storage Node User Guide
This article is a direct continuation of the previous article on the 0g_labs project, so if someone has not seen it, then be sure to follow this link and get acquainted with it, and then go here.
Hardware Requirements
Check Dependencies
Make sure that you have all the necessary modules installed, namely Golang, rustup.
Clone and Build the source code
git clone -b v0.3.3 https://github.com/0glabs/0g-storage-node.git
Build the source code:
cd 0g-storage-node git submodule update --init # Build in release mode cargo build --release
Configure
After that, we need to check and put down all the missing values in the run/config.toml
file
network_enr_address network_boot_nodes = ["/ip4/54.219.26.22/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps","/ip4/52.52.127.117/udp/1234/p2p/16Uiu2HAkzRjxK2gorngB1Xq84qDrT4hSVznYDHj6BkbaE4SGx9oS","/ip4/18.167.69.68/udp/1234/p2p/16Uiu2HAm2k6ua2mGgvZ8rTMV8GhpW71aVzkQWy7D37TTDuLCpgmX"] log_contract_address mine_contract_address blockchain_rpc_endpoint log_sync_start_block_number miner_key db_max_num_chunks
Run Storage Node
After we have changed all the parameters necessary to run the node, we can run it. This is done with the following command:
cd run # consider using tmux in order to run in background ../target/release/zgs_node --config config-testnet.toml --miner-key <your_private_key> --blockchain-rpc-endpoint <blockchain_rpc> --db-max-num-chunks <max_chunk_num>