πŸ’‘ About Filecoin Onchain Cloud

Filecoin Onchain Cloud makes decentralized storage simple and programmable by providing a verifiable, sovereign, and content addressable cloud infrastructure. Filecoin Onchain Cloud modular architecture enables the creation of various services with different payment models and storage assurances between storage providers and clients. These services are built on a foundation of cryptographic storage proofs powered by PDP and automated payments powered by Filecoin Pay.

In this document, we'll explore the underlying stack of Filecoin Onchain Cloud - beginning with the foundational cryptographic storage layer, progressing through the economic infrastructure, and culminating in a complete service implementation with its developer SDK.


Let's explore each layer, starting from the PDP protocol:

πŸ”’ PDP Protocol

Provable Data Possession (PDP) is a protocol that allows storage providers to prove they possess specific data without revealing the data itself. The system operates through a set of smart contracts that manage data sets, verification, and fault reporting. PDP serves as the backbone of Filecoin Onchain Cloud.

How PDP Works

  1. Challenge Generation - Every proving period, the system generates a random seed from the Filecoin blockchain randomness precompile contract
  2. Proof Requirement - Storage providers must prove they possess specific data locations within the dataset's Merkle tree (determined by the random seed)
  3. On-Chain Verification - Cryptographic merkle inclusion proofs are verified on-chain.

PDP exposes the PDPListener interface, enabling external services and contracts to define custom handlers for proof success and failure events. This modularity allows different storage services to implement their own penalty and reward mechanisms based on proof outcomes.

Learn more about PDP

PDP Explorer (PDP Scan)


πŸ’° Filecoin Pay

The Filecoin Pay smart contract provides flexible streaming payment infrastructure that can be used by any service implementation. It creates payment rails between payers and payees with automated processing and customizable validation logic.

Payment Rails

Each service can create multiple payment rails with different configurations:

Filecoin Pay contract exposes the IValidator interface, enabling external services and contracts to define custom handlers that validate payment settlement requests and handle payment rail termination notifications. This enables custom payment arbitration logic:

Learn more about FilecoinPay


πŸ”₯ FilecoinWarmStorageService

FilecoinWarmStorageService represents a complete implementation of the Filecoin Onchain Cloud stack, demonstrating how to combine PDP and the FilecoinPay contracts to create a marketplace for warm storage with instant retrieval guarantees powered by FilBeam.

Purpose and Role

Stack Integration

1. PDP Integration (PDPListener)

2. FilecoinPay Integration (IValidator)

3. Service-Specific Logic

Technical Specifications

Key Benefits

FilecoinWarmStorageService Architecture Overview

graph LR
    A[FilecoinWarmStorage<br/>Service]
    B[PDP Verifier]
    C[FilecoinPay]
    D[Storage Providers]

    A <--> B
    A <--> C
    B <--> D
    C --> D

This implementation represents one SLA model - the Filecoin Onchain Cloud ecosystem enables countless other service level agreements yet to be discovered.

Learn more about FilecoinWarmStorage


πŸ› οΈ Synapse SDK

Synapse SDK provides a developer-friendly TypeScript interface that abstracts the complexity of interacting with FilecoinWarmStorage contracts and the underlying Filecoin Onchain Cloud stack, enabling rapid integration while providing fine-grained control when needed for specific functionalities.

Architecture

graph TB
    subgraph "Developer Applications"
        WebApp[Web Applications]
        NodeApp[Node.js Applications]
        CLI[CLI Tools]
    end

    subgraph "Synapse SDK"
        MainAPI[High-level APIs]
        DatasetAPI[createDataset]
        StorageAPI[upload/download]
        PaymentAPI[managePayments]
    end

    WebApp --> MainAPI
    NodeApp --> MainAPI
    CLI --> MainAPI

    MainAPI --> DatasetAPI
    MainAPI --> StorageAPI
    MainAPI --> PaymentAPI

Learn more about SynapseSDK


πŸ§ͺ Filecoin Onchain Cloud Development Resources

Core Repositories

πŸ“ŒΒ Additional Documentation

πŸ† Synapse SDK Example dApp

FS-Upload-dApp demonstrates complete integration with the Synapse SDK

Additional Filecoin Resources