Skip to content

Latest commit

 

History

History
101 lines (80 loc) · 3.04 KB

README.md

File metadata and controls

101 lines (80 loc) · 3.04 KB

0g-storage-install-guide


Hardware Requirement

KEY VALUE
RAM 16 GB
CPU 4 cores
Disk 1 TB NVME SSD
Bandwidth 500 Mbps

Install for linux

Install dependencies

sudo apt-get update
sudo apt-get install clang cmake build-essential
  1. Install rustup
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Install Go
     # Download the Go installer
     wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
    
     # Extract the archive
     sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz
    
     # Add /usr/local/go/bin to the PATH environment variable by adding the following line to your ~/.profile.
     export PATH=$PATH:/usr/local/go/bin

Download the source code

git clone -b v0.3.3 https://github.com/0glabs/0g-storage-node.git

Build

cd 0g-storage-node
git submodule update --init

# Build in release mode
cargo build --release

Configure the run/config.toml

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 The storage Node

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>

The end!

If you liked this guide, please go to all my social networks)