MCPcopy Index your code
hub / github.com/0gfoundation/0g-storage-node

github.com/0gfoundation/0g-storage-node @v1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.0 ↗ · + Follow
3,215 symbols 11,262 edges 287 files 901 documented · 28%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

0G Storage

Overview

0G Storage is a decentralized data storage system designed to address the challenges of high-throughput and low-latency data storage and retrieval, particularly for areas such as AI.

System Architecture

0G Storage consists of two main components:

  1. Data Publishing Lane: Ensures fast Merkle tree data root commitment and verification through 0G Chain.
  2. Data Storage Lane: Manages large data transfers and storage using an erasure-coding mechanism for redundancy and sharding for parallel processing.

Across the two lanes, 0G Storage supports the following features:

  • General Purpose Design: Supports atomic transactions, mutable key-value stores, and archive log systems, enabling a wide range of applications with various data types.
  • Validated Incentivization: Utilizes the PoRA (Proof of Random Access) mining algorithm to mitigate the data outsourcing issue and to ensure rewards are distributed to nodes who contribute to the storage network.

For in-depth technical details about 0G Storage, please read our Intro to 0G Storage.

Documentation

  • If you want to run a node, please refer to the Running a Node guide.
  • If you want to conduct local testing, please refer to Onebox Testing guide.
  • If you want to build a project using 0G storage, please refer to the 0G Storage SDK guide.

Support and Additional Resources

We want to do everything we can to help you be successful while working on your contribution and projects. Here you'll find various resources and communities that may help you complete a project or contribute to 0G.

Communities

Extension points exported contracts — how you extend this code

Hashable (Interface)
A hashable type. Types implementing `Hashable` are able to be [`hash`]ed with an instance of [`Hasher`]. ## Implementi [11 …
common/merkle_light/src/hash.rs
Encode (Interface)
Provides SSZ encoding (serialization) via the `as_ssz_bytes(&self)` method. See `examples/` for manual implementations [16 …
version-meld/eth2_ssz/src/encode.rs
EnrKey (Interface)
The trait required for a key to sign and modify an ENR record. [4 implementers]
version-meld/enr/src/keys/mod.rs
TruncateBitmap (Interface)
(no doc) [5 implementers]
node/storage/src/log_store/load_chunk/bitmap.rs
Filter (Interface)
(no doc) [3 implementers]
version-meld/discv5/src/kbucket/filter.rs
ReqId (Interface)
Composite trait for a request id. [1 implementers]
node/network/src/rpc/mod.rs
HashElement (Interface)
(no doc) [2 implementers]
common/append_merkle/src/merkle_tree.rs
PoraLoader (Interface)
(no doc) [1 implementers]
node/miner/src/loader.rs

Core symbols most depended-on inside this repo

unwrap
called by 561
common/append_merkle/src/merkle_tree.rs
clone
called by 393
version-meld/enr/src/lib.rs
wait_until
called by 171
tests/utility/utils.py
write
called by 146
common/merkle_tree/src/lib.rs
iter
called by 133
version-meld/enr/src/lib.rs
len
called by 121
node/file_location_cache/src/file_location_cache.rs
zgs_get_file_info
called by 120
tests/test_framework/zgs_node.py
clone
called by 111
version-meld/discv5/src/kbucket/filter.rs

Shape

Method 1,956
Function 689
Class 393
Enum 131
Interface 46

Languages

Rust89%
Python11%

Modules by API surface

node/storage/src/log_store/log_manager.rs76 symbols
node/network/src/peer_manager/peerdb.rs73 symbols
tests/utility/signature_utils.py69 symbols
version-meld/enr/src/lib.rs62 symbols
version-meld/discv5/src/kbucket/bucket.rs60 symbols
node/router/src/libp2p_event_handler.rs57 symbols
node/sync/src/service.rs54 symbols
common/append_merkle/src/lib.rs53 symbols
node/sync/src/controllers/serial.rs47 symbols
node/storage/src/log_store/flow_store.rs45 symbols
node/network/src/peer_manager/peerdb/peer_info.rs43 symbols
node/network/src/peer_manager/mod.rs39 symbols

For agents

$ claude mcp add 0g-storage-node \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page