挖一挖
单车变摩托

0G.AI 存储节点 操作教程

存储节点

0G 系统由多个组件组成,每个组件都有自己的功能。提供了详细的步骤作为部署存储节点的指南。

先决条件

0G Storage 与链上合约交互,用于 blob 根确认和 PoRA 挖矿。

有关官方部署的合约地址,请访问此页面

存储节点
硬件要求

- Memory: 16 GB RAM
- CPU: 4 cores
- Disk: 500GB / 1T NVME SSD
- Bandwidth: 500 MBps for Download / Upload
部署步骤
  1. 安装依赖项

  • 对于 Linux

sudo apt-get update
sudo apt-get install clang cmake build-essential pkg-config libssl-dev
  • 对于 Mac

brew install llvm cmake
  1. 安装 rustup

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. 安装 Go

  • 对于 Linux

# Download the Go installer
wget https://go.dev/dl/go1.23.0.linux-amd64.tar.gz

# Extract the archive
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.23.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
  • 对于 Mac

brew install go

或者从 https://go.dev/dl/ 下载 Go 安装程序。 打开您下载的包文件,然后按照提示安装 Go。

  1. 然后下载源码

git clone -b v0.4.6 https://github.com/0glabs/0g-storage-node.git
  1. 构建源代码

cd 0g-storage-node

# Build in release mode
cargo build --release
  1. 如有必要,请检查并更新 。run/config.toml

# enr address, must fill your instance's public ip to support peer discovery
network_enr_address

# peer nodes, check the 0g-storage/run/config-tfor the official configurations
network_boot_nodes = []

# flow contract address
log_contract_address

# mine contract address
mine_contract_address

# layer one blockchain rpc endpoint
blockchain_rpc_endpoint

# block number to start the sync
log_sync_start_block_number

# your private key with 64 length
# do not include leading 0x
# do not omit leading 0
# must fill if you want to participate in the pora and get mining reward
miner_key

# The max number of chunk entries to store in db.
# Each entry is 256B, so the db size is roughly limited to
# `256 * db_max_num_chunks` Bytes.
# If this limit is reached, the node will update its `shard_position`
# and store only half data.
db_max_num_chunks
  1. 运行 storage service

使用zgs_node -h

我们提供了一个用于测试网的使用。run/config-testnet.toml

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>
你都准备好了!
赞(0)
未经允许不得转载:Qubic挖矿教程网 » 0G.AI 存储节点 操作教程
欧意OKX币安Binance芝麻开门GATE