☁️
Zus Docs
  • About Züs
  • System
    • Providers and Services
      • Miner
      • Sharder
      • Blobber
      • Validator
      • Authorizer
      • Node Locator (0DNS)
    • Storage
      • Architecture and Data Management
      • Protocol
        • Allocations
        • Reference Objects
        • Challenges
        • Write Markers
          • Chain Hashing
          • Two Commit
        • Blobber Repair Protocol
      • ZS3 Server
        • Backup, Recovery and Replication
        • Encryption and Compression
        • S3FS Setup and Usage
        • Backup & Recovery with Restic on Blimp + ZS3 Server
        • Backup & Recovery with Veeam on Blimp + ZS3 Server
      • File Operations
        • Upload
        • Download
        • File Sharing
        • Partial Error Recovery
        • Streaming
        • Rent a Blobber
    • Smart Contracts
      • Storage S.C.
      • Miner S.C.
      • ZCN S.C.
      • ERC-20 S.C.s
      • Bridge Protocol
    • Blockchain & Consensus
      • Entities
    • User Authentication and Wallet Management System
      • OKTA Integration
      • Key Management System (KMS)
  • APIs
    • 0DNS API
    • JS API
    • Mobile API
  • CLIs
    • Storage CLI
      • Quickstart
      • Configuring the tool
    • Wallet CLI
      • Wallet Configuration
      • Quickstart
      • Configuring the tool
  • SDKs
    • Go SDK
      • GO SDK Microservices
    • JS SDK
  • Tokenomics
    • Staking
    • Reward & Penalty
  • ✨Züs Apps
    • 🗝️Vult
      • Getting Started
        • Web
        • Mobile
      • Vult AI
        • Batch Processing
        • Memory Retention
        • Technical Implementation
        • Architecture Overview
      • Login / Register
      • File Management Pages
      • File Sharing
      • Storage Management Dashboard
      • Storage Maintenance and Troubleshooting
      • Züs Subscription
      • Wallet Management
      • Refer a friend
      • Settings
    • 🏗️Blimp
      • Getting Started
      • Login / Register
      • Configure Storage
        • Create Standard Storage Allocation
        • Create Enterprise Allocation
        • Create S3 Server Allocation
        • Create Cloud Migration Allocation
        • Allocation Maintenance and Troubleshooting
      • File Management Pages
      • File Sharing
      • Manage Allocations
      • Upgrade Storage
      • Blimp Vault
      • Refer a friend
      • Settings
      • Launching ZS3 Server
      • Using CLI to backup files into Blimp + ZS3 Server
    • 🏠Chimney
      • Getting Started
      • Login / Register
      • Create New Deployment
      • Manage Your Deployments
      • Homepage
      • Staking Dashboard
      • Rank Dashboard
      • Monitor Dashboard
      • Stats Dashboard
      • Logs Dashboard
      • Wallet Dashboard
      • Operations on your Deployments
      • Restricted Blobbers
      • Settings
        • Manage Profile
        • Wallet Settings
        • Update Blobber Settings
        • Update Blobber Version
        • Refer a friend
        • Help
    • 🌐Atlus
      • Getting Started
      • Home page
      • Service Providers Page
      • Charts Page
        • Market Charts
        • Network Charts
        • Storage Charts
      • Blockchain Page
      • Server Map Page
      • Storage Explainer Page
      • Details Pages
        • Block Details Page
        • Transaction Details Page
        • Wallet Details Page
        • Miner Details Page
        • Sharder Details Page
        • Blobber Details Page
        • Validator Details Page
        • Authorizer Details Page
        • Allocation Details Page
      • Appendix: Common Components
    • ⚡Bolt
      • Getting Started
        • Web
        • Mobile
      • Login / Register
      • Sign In with external wallet
      • Staking Dashboard
      • Staking/Unstaking a provider
      • Claiming Rewards
      • Send/Receive ZCN tokens
      • Buy ZCN
      • Deposit/Withdraw ZCN tokens
      • Activity Dashboard
      • Refer a friend
      • Settings
  • Releases
    • Hardfork
Powered by GitBook
On this page
  1. System
  2. Storage
  3. File Operations

Download

PreviousUploadNextFile Sharing

Last updated 2 months ago

In a decentralized storage network, downloading a file efficiently while ensuring data integrity, security, and performance presents several challenges:

  • Consensus on file correctness: Data is distributed across multiple blobbers, requiring consensus on the correct file hash before reconstruction.

  • Efficient data retrieval: Downloading from multiple sources must be optimized for speed and reliability.

  • Integrity verification: Ensuring downloaded data is correct and unmodified using cryptographic proofs.

  • Handling encrypted files: Securely decrypting data while preserving access control.

  • Erasure coding reconstruction: Recovering the original file from distributed data shards.

Process

To overcome these challenges, the download process follows a structured approach:

1. Consensus on File Hash

  • Before downloading, consensus is reached on the actual file hash across all blobbers.

  • A subset of blobbers is selected based on successful validation of stored data.

  • The consensus threshold is set to data_shards, as this is the minimum required to decode erasure-encoded data.

2. Parallel Block-Based Download

  • Data is downloaded in blocks of 64KB * data_shards, ensuring efficient retrieval.

  • Each blobber is requested to send 100 blocks per request by default.

  • Performance tracking: The first request is timed, and a subset of blobbers is selected based on response time to optimize speed.

  • Downloading occurs in parallel from multiple blobbers, significantly improving speed compared to a single-provider approach.

3. Erasure Decoding and Decryption

Erasure Coding Reconstruction

  • The system uses Reed-Solomon erasure coding to reconstruct the original file from data_shards out of data_shards + parity_shards.

  • Missing or slow blobbers do not impact file recovery as long as the threshold is met.

Decryption (If Encrypted)

  • Each block is decrypted using the user's private key.

  • Decryption follows AES-GCM (Authenticated Encryption with Associated Data) to ensure both confidentiality and authenticity.

  • If the file was shared using Proxy Re-Encryption (PRE), the downloaded data is re-encrypted by blobbers for the recipient, and the recipient decrypts it using their private key.

4. Integrity Verification

Validation Merkle Proofs

  • Each block’s correctness is verified using Merkle Proofs provided by blobbers.

  • Blobbers generate a Validation Merkle Proof for each block, which is verified against the Validation Merkle Root Hash calculated during the upload.

  • This ensures that data integrity is maintained and that no blobber has modified or provided incorrect data.

File Hash Verification

  • Once all blocks are retrieved and decoded, the final reconstructed file hash is computed.

  • The computed hash is compared against the consensus-agreed file hash to ensure correctness.

  • Any mismatch results in rejection of the downloaded data.

5. Authorization for Shared Files

  • Users can download shared files using an Auth Ticket, which ensures proper access control.

  • The Auth Ticket contains the necessary metadata and cryptographic permissions for the recipient.

  • If the file was encrypted, Proxy Re-Encryption (PRE) enables blobbers to re-encrypt data without exposing plaintext.

Fig1: Download Process