Skip to main content

Overview

Filehub is a scalable, reliable, and secure storage platform that Chromia's relational blockchain powers. It provides developers with a decentralized solution for storing and accessing files, ensuring data integrity and availability even when faced with external disruptions.

Components

Filehub consists of two fundamental components:

  • Filehub blockchain: This acts as the central index, tracking files and managing references to data chunks distributed across multiple Filechains.
  • Filechain blockchain(s): These function as the actual blob storage, responsible for persisting file data

Filehub

The Filehub blockchain serves as the central indexing system, responsible for:

  • Managing the administration and availability of Filechains.
  • Selecting the appropriate Filechains for distributing and storing each file chunk.
  • Maintaining a comprehensive index of file chunks and their corresponding Filechain locations.
  • Handling the billing system for file storage, ensuring proper payment for services.

Filehub’s architecture is modular and scalable. It starts with a single Filehub and two Filechains, with the flexibility to expand incrementally by adding more Filechains as storage requirements grow. This design supports unlimited horizontal scaling, increasing both storage capacity and file distribution efficiency.

Filechain

The Filechain Blockchain(s) function as blob storage, handling the following tasks:

  • Storing file chunks in a secure and decentralized manner.
  • Validating payments made to Filehub using ICCF (Interchain Confirmation Facility)-proofs.
  • Hashing incoming data and verifying it against expected hashes to ensure data integrity.
  • Accepting transactions and persisting file chunks on the Filechain blockchain.

Filechain serves strictly as a blob storage solution. It operates without knowledge of file metadata or the relationships between chunks. Its sole responsibility is to store data chunks and validate their integrity.

ICCF and anchoring chain

The ICCF (Interchain Confirmation Facility) facilitates communication between Filehub and Filechains. This framework ensures that file chunks are only stored on Filechains after payment has been confirmed.

Here's how the process works:

  1. Payment and allocation: When a user uploads a file to Filehub, the platform allocates storage on a suitable Filechain and processes the payment.

  2. ICCF proof generation: Filehub generates an ICCF proof, which is a cryptographic signature verifying that the file has been allocated and paid for.

  3. Proof submission: The ICCF proof is submitted to the target Filechain.

  4. Proof verification: The Filechain independently verifies the ICCF proof to confirm that the payment for the corresponding file chunk has been completed.

This indirect communication mechanism, facilitated by the ICCF and the anchoring chain, ensures the security and integrity of the file storage process. By verifying payments before storing file chunks, Filehub prevents unauthorized access and ensures that users only pay for the storage they use.