SUM Chain Native Protocol

Storage
Node
Interface
Protocol

$
Chunk Size
1 MB
Uniform blocks
Replication
3x
Per chunk
Hash
BLAKE3
256-bit
Identity
Ed25519
L1-linked
Encryption
XChaCha20
Poly1305
Transport
QUIC
libp2p
Scroll
// Architecture

Three-Layer Design

The chain acts strictly as the cryptographic source of truth. No actual file data touches the blockchain.

On-Chain State

L1 State Trie
[+]
{ NodeRegistry }
addressEd25519 Identity
roleStorageNode (staked Koppa)
statusActive | Challenged | Slashed
{ StorageMetadata }
merkle_rootBLAKE3 top hash of chunk DAG
file_sizeTotal bytes
access_listVec<Ed25519> (empty = public)
storage_fee_poolLocked Koppa rewards

L1 Bridge

JSON-RPC Interface
[+]
{ RPC Endpoints }
storage_getFundedFilesQuery funded entries
storage_getActiveChallengesPoR challenge poll
storage_getAccessListACL enforcement
storage_getActiveNodesNode discovery
send_raw_transactionProof submission

Off-Chain Mesh

P2P Storage Network
[+]
{ sum-net }
libp2pQUIC + Noise + mDNS + Gossipsub
identityEd25519 seed -> PeerId + L1 Address
/sum/storage/v1Custom chunk transfer protocol
{ sum-store }
chunker1 MB uniform binary slicer
merkleBLAKE3 DAG with L1-matched proofs
assignmentDeterministic 3x replication
mmapZero-copy memory-mapped I/O
// File Ingestion Pipeline

Client to Network

From raw bytes to replicated, verifiable, content-addressed storage across a decentralized mesh.

EncryptOptional

Private files encrypted locally via XChaCha20-Poly1305. The key never leaves the client.

XChaCha20-Poly1305 AEAD
Chunk & HashBLAKE3

Split into uniform 1 MB blocks. Each block hashed with BLAKE3 to create leaf nodes.

CHUNK_SIZE = 1_048_576 bytes
Merkle DAGTree Build

Build the binary Merkle tree. The resulting merkle_root becomes the file's absolute network identity.

blake3(left_32 || right_32)
0x0000000000000000000000000000000000000000000000000000000000000000
Allocate TXOn-Chain

Broadcast TxPayload::AllocateStorage to Validators with merkle_root, access_list, and storage_fee_pool.

TxPayload variant index 18
P2P PushOff-Chain

Push actual chunks to Storage Nodes via /sum/storage/v1 libp2p protocol with 3x combinatorial replication.

REPLICATION_FACTOR = 3
GossipAnnounce

Storage nodes use gossipsub to announce which chunks they have successfully acquired.

topic: /sum/storage/announce
// Workspace Crates

Rust Internals

Four crates. Zero Python. 100% native Rust — compiled directly into the SUM Chain node binary.

sum-types

Core Definitions

Shared types compiled into the SUM Chain node binary. These are the off-chain counterparts to the L1's StorageMetadata.

src/storage.rsPhase 1
[+]

Core storage primitives matching the L1 constants

Public API
pub CHUNK_SIZE: u64 = 1_048_576
pub REPLICATION_FACTOR: u32 = 3
pub ChunkDescriptor { chunk_index, offset, size, blake3_hash, cid }
pub DataManifest { file_name, file_hash, total_size_bytes, chunk_count, merkle_root, chunks }
src/config.rsPhase 1-2
[+]

Global configuration structs

Public API
pub NetConfig { listen_port: u16 }
pub StoreConfig { store_dir, max_chunk_msg_bytes }
pub RpcConfig { rpc_url, por_poll_interval_secs }
src/rpc_types.rsPhase 2
[+]

JSON-RPC response deserialization types

Public API
pub ChallengeInfo
pub NodeRecordInfo
pub StorageFileInfo
src/node.rsPhase 1
[+]

Node capability advertisement

Public API
pub NodeCapability { peer_id, ram_bytes, platform }
pub Platform { AppleSilicon, Linux, Windows }
// L1 Security Engine

Proof of Retrievability

Every N blocks, validators challenge storage nodes. Pass = rewards from the fee pool. Fail = stake slashed. No exceptions.

por_simulation.rs
$ ready. click "Run PoR" to simulate.
Challenge Lifecycle
1
Select Audit Target
2
Emit On-Chain Challenge
3
Generate Merkle Proof
4
L1 Verifies Proof
5
Settlement
Verification Formula
verify_merkle_proof(chunk_hash, index, sibling_path, root)
blake3(left_32 || right_32) walked bottom-up must equal merkle_root
// Phased Implementation

Mission Roadmap

Built ground-up by a core Rust blockchain engineering team without breaking consensus.

Phase 1: Cryptography & State Foundation

COMPLETEDWeeks 1-3
sum-typessum-netsum-store
Deliverables
  • +NodeRegistry and StorageMetadata state types
  • +BLAKE3 Merkle builder CLI/SDK (chunk, hash, tree)
  • +TxPayload::AllocateStorage + RegisterStorageNode
  • +Ed25519 L1 identity -> libp2p PeerId bridge
Anti-Features (Removed)
xRemoved omni-bridge & Python (no PyO3/NumPy)
xRemoved omni-pipeline (no GPipe)
xRemoved gguf.rs (raw bytes only)

Phase 2: L1 RPC Bridge, ACL & PoR Responder

IN PROGRESSWeeks 4-8
sum-node
Deliverables
  • >JSON-RPC client to L1 (reqwest) — 7 endpoints
  • >Persistent ManifestIndex (merkle_root -> DataManifest)
  • >bincode v1 mirror types for transaction signing
  • >Background PoR challenge poll, proof gen, TX submit
  • >ACL interceptor: PeerId -> L1 Address -> access_list check
  • >PeerId-to-Address via libp2p identify protocol

Phase 3: Combinatorial P2P Mesh

COMPLETEDWeeks 9-12
sum-storesum-node
Deliverables
  • +REPLICATION_FACTOR = 3 (L1 + off-chain)
  • +blake3(root ++ chunk_index ++ replica) assignment with linear probing
  • +L1 generate_challenge() targets assigned nodes only
  • +storage_getActiveNodes() RPC endpoint
  • +CBOR manifest exchange via serve.rs
  • +MarketSyncWorker: poll L1, compute assignment, fetch missing

Phase 4: Scale-Out Upgrade

UPCOMINGFuture
sum-store
Deliverables
  • -Reed-Solomon Erasure Coding replaces pure replication
  • -Hash shards (data + parity) instead of raw chunks
  • -On-chain metadata, ACL, and PoR unchanged
  • -60-80% reduction in network storage overhead