Webhash Documentation
  • About WebHash
    • What is Webhash Protocol?
    • Digital Decay & Illusion of Decentralization
    • 3 Layer Solution
  • The three layers
    • Hosting Layer
      • Replication Algorithm
      • Technical Specification & Node Setup
      • Incentives and Penalty Mechanism
      • On Chain Content Registry
    • Gateway Layer
      • Content Retrival
      • Integrated Caching
      • Technical Specification
    • Application Layer
      • Developer-focused (like Vercel)
      • No-Code community (like Webflow)
      • AI Agent for complete beginners (prompt-to-website)
      • Web2 → WebHash
    • Website Permanance
      • Storage Pool
      • Inflationary Token Issuance
      • Self-Replication
      • Reputation
      • Community Archival Efforts
  • WebHash Token - $HASH
    • WebHash Token - $HASH
  • Eco-System Products
    • Modly AI
    • Hash Dweb Gateway: Chrome Extension
    • Eth.cd
    • Write.link
    • Widecanvas AI
    • Hash.is
    • eth.lk – Ethereum Gateway
    • arb.qa – Arbitrum Gateway
    • bnb.qa – Binance Smart Chain Gateway
    • HashVault
  • Token Trails
  • Governance
    • WebHash DAO
    • Governance Structure
    • Key Functions of the DAO
    • Content Moderation & Protection
    • Governance Process & Voting
    • The Future of WebHash DAO
Powered by GitBook
On this page
  1. The three layers
  2. Hosting Layer

On Chain Content Registry

The On-Chain Content Registry in the WebHash Protocol ensures permanent, verifiable, and decentralized storage tracking. It utilizes EVM-compatible smart contracts to register, verify, and audit content stored by participating nodes.

Key Features:

✅ Tracks which nodes store which Content Identifiers (CIDs) ✅ Enforces transparency and trust using cryptographic proofs ✅ Maintains accurate storage usage tracking per node ✅ Enables decentralized content pinning verification

The smart contracts that govern the On-Chain Content Registry are modular and interoperable with other components of the WebHash ecosystem.


1. Smart Contract Architecture Overview

The registry is composed of the following smart contracts:

2. Node Registration & Identity Management

A. NodeRegistry Contract

Maintains a verifiable, decentralized list of participating nodes.

Data Structure:

struct Node {
    address nodeAddress;     // EVM-compatible address
    bytes peerId;            // Unique IPFS node identifier
    uint256 storageCapacity; // Declared max storage
    bool isActive;           // Node status
    uint256 storageUsed;     // Current storage usage
    uint256 pinnedCIDsCount; // Number of CIDs pinned
}

Key Functions:

  • registerNode(bytes memory peerId, uint256 storageCapacity)

  • updateNodeMetadata(bytes memory peerId, uint256 storageCapacity)

  • getNodeInfo(address node)

  • deactivateNode(address node)

  • reactivateNode()

B. Security & Verification

✅ Verifies node identity by linking IPFS Peer ID with an on-chain Ethereum address ✅ Ensures public traceability of all node activities ✅ Tracks storage usage to prevent overcommitment


3. Content Storage Tracking & Pinning Verification

A. ContentRegistry Contract

Logs which nodes pin which CID, ensuring verifiable, decentralized content storage.

Data Structure:

struct Content {
    bytes CID;           // Content Identifier (IPFS CID)
    uint256 size;        // Content size (bytes)
    address uploader;    // User who uploaded the content
    uint256 pinnedCount; // Number of nodes pinning this content
}

Key Functions:

  • registerContent(bytes calldata CID, uint256 size, address uploader)

  • confirmPin(bytes calldata CID)

  • getContentInfo(bytes calldata CID)

B. On-Chain Storage Verification Process

1️⃣ Content Registration: • Content is registered with its CID and size • System tracks metadata on-chain

2️⃣ Storage Confirmation: • Nodes confirm pinning specific CIDs • Storage usage is tracked and verified • Prevents exceeding declared capacity

3️⃣ Verification: • Publicly verifiable pinning status • Accurate per-node storage accounting • Content counts and usage are updated live

✅ Ensures traceability of all stored content ✅ Prevents false claims ✅ Enables decentralized auditing of Web3 content

WebHash’s registry architecture ensures reliability and auditability in decentralized content storage.

PreviousIncentives and Penalty MechanismNextGateway Layer

Last updated 14 days ago