Skip to content

Separate Storage Operators from Consensus Validators #1478

@cryptoAtwill

Description

@cryptoAtwill

Overview

This refactoring separates blob storage responsibilities from consensus validators, practically removing vote tally, enabling independent scaling of storage capacity and consensus nodes. The key idea is to shift validator vote tally to user gateway that handle temporary data storage and quorum certs for storage inclusion.

Architecture Diagram

  ┌─────────────────────────────────────────────────────────────────────┐
  │                         User / Client                                │
  └────────┬────────────────────────────────────┬────────────────────────┘
           │                                    │
           │ 1. Upload blob                     │ 2. Call addBlob + pay
           │                                    │
           ▼                                    ▼
  ┌─────────────────────┐              ┌──────────────────────┐
  │      Gateway        │              │   Smart Contract     │
  │   (HTTP + Iroh)     │              │   (BlobsActor)       │
  │                     │              │                      │
  │ - Receives uploads  │              │ - Accepts payment    │
  │ - Erasure codes     │              │ - Emits BlobAdded    │
  │ - Stores in Iroh    │              │ - Tracks operators   │
  │ - Collects sigs     │              │ - Verifies certs     │
  │ - Submits certs     │              │                      │
  └──────┬──────────────┘              └───────┬──────────────┘
         │                                     │
         │ 3. Listen to                        │ 3. Emit BlobAdded event
         │    BlobAdded                        │    (hash, gateway_node_id)
         │                                     │
         └─────────────────┬───────────────────┴─────────────────┐
                           │                                     │
                           ▼                                     ▼
           ┌──────────────────────────────────────────────────────────┐
           │              Storage Operators (3+ instances)            │
           │                                                          │
           │  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐    │
           │  │ Operator 1   │  │ Operator 2   │  │ Operator 3   │    │
           │  │ (Iroh node)  │  │ (Iroh node)  │  │ (Iroh node)  │    │
           │  │              │  │              │  │              │    │
           │  │ - Listen evt │  │ - Listen evt │  │ - Listen evt │    │
           │  │ - Download   │  │ - Download   │  │ - Download   │    │
           │  │ - Sign hash  │  │ - Sign hash  │  │ - Sign hash  │    │
           │  │ - Submit sig │  │ - Submit sig │  │ - Submit sig │    │
           │  └──────┬───────┘  └──────┬───────┘  └──────┬───────┘    │
           └─────────┼──────────────────┼──────────────────┼──────────┘
                     │                  │                  │
                     │ 4. Download blob from gateway Iroh  │
                     │                  │                  │
                     └──────────────────┴──────────────────┘
                              │
                              │ 5. Submit signatures
                              ▼
                     ┌─────────────────┐
                     │     Gateway     │
                     │ Sig Collector   │
                     │                 │
                     │ Count: 1/3      │
                     │ Count: 2/3      │
                     │ Count: 3/3 ✓    │
                     └────────┬────────┘
                              │
                              │ 6. Submit certificate
                              │    (when quorum reached)
                              ▼
                     ┌──────────────────────┐
                     │   Smart Contract     │
                     │                      │
                     │ - Verify signatures  │
                     │ - Mark as Finalized  │
                     │ - Emit BlobFinalized │
                     └──────────────────────┘

Tasks

  • Add operator registry and availability certificate verification
    Goal: Minimal contract changes to support operator signatures
  • Gateway tracks BlobAdded events to coordinate signature collection
    Goal: Gateway knows which blobs need certification
  • Create standalone storage-operator process (separate from validators)
    Goal: New independent service that doesn't require validator code
  • Operator listens to events, downloads blobs, and submits signatures
    Goal: Operators automatically handle blob storage when events are emitted
  • Gateway aggregates operator signatures and submits certificates to contract
    Goal: Automatic certificate submission when quorum reached
  • Remove Iroh and blob resolution dependencies from validators
  • End-to-end testing of separated architecture
    Goal: Verify complete system works with separated components

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions