Storage KV

Detailed steps are provided as a guideline to deploy the Storage KV Client, which is a KV runtime built on top of the log layer.

Prerequisite

0G KV interact with on-chain contracts and storage nodes to simulate the KV data streams.

For official deployed contract addresses, visit this page.

Storage KV

Hardware Requirement

- Memory: 16 GB RAM
- CPU: 4 cores
- Disk: 500GB / 1T NVME SSD
- Bandwidth: 500 MBps for Download / Upload

Storage KV

  1. Follow the same steps to install dependencies and rust in storage node

  2. Download the source code

git clone -b v1.1.0-testnet https://github.com/0glabs/0g-storage-kv.git
  1. Build the source code

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

# Build in release mode
cargo build --release
  1. Copy the config_example.toml to config.toml and update the parameters

# rpc endpoint
rpc_listen_address
# ips of storage service, separated by ","
zgs_node_urls = "http://ip1:port1,http://ip2:port2,..."

# layer one blockchain rpc endpoint
blockchain_rpc_endpoint

# flow contract address
log_contract_address

# block number to start the sync, better to align with the config in storage service
log_sync_start_block_number

# storage nodes to download data from, separated by ","
# the provided nodes should cover full data in the storage network
zgs_node_urls
  1. Run the kv service

cd run

# consider using tmux in order to run in background
../target/release/zgs_kv --config config.toml

Note: The recommended system configuration is the same as the storage node.

You are all set !

Last updated