Logo

    Layer 2 Deals

    Assign
    Protocol Opps
    Category
    Storage Market improvements
    DRI
    Dependency
    Description

    Goal
    Impact
    high
    Priority (Nicola)
    Unclear
    Size
    large
    Solution?
    yes
    Status
    people
    who requested it

    Problem

    Use case of a website (index.html + images in the same folder)

    • User makes IPFS dag
    • User sends it to the broker
    • Broker collects more dags
    • Broker stores the dags when ready
    • Broker sends a proof of inclusion of their users dags to their users

    Current solutions

    Untitled

    Platform
    DAG support
    Stream support
    Inclusion Proof
    Reimbursment on failures
    User payment
    L2 - Web3.Storage
    L2 - Estuary
    L2 - Simple Merkle Deals
    L1 - Deals (GFM)
    L1 - Deals (Raw)
    L1 - Deals (Boost)

    Storage Proof for layer 1 deals

    Note this is just to show reasoning.

    L1 Deals GFM - Layer 1 Inclusion proof

    Storage

    1. Take a DAG
    2. Turn it into a stream via Dag2Stream algorithm
    3. Generate CommP from the stream

    Inclusion Proof

    1. CommP is self sufficient (chain uses it to generate CommD)

    Storage Proof for layer 2 deals

    Layer 2 Inclusion proof for Estuary

    Principle: there is a dag around all the deals

    If we have this principle, then making inclusion proofs is more complex

    Storage

    1. Take DAGs
    2. Join them into one DAG
    3. (repeat process for L1 Deals GFM)

    Inclusion Proof

    • Simple Merkle tree range inclusion proof won't work

    Algorithm Dag2Stream

    [header, depth-first left-first, skip if a node exists twice]

    Proposals

    1: Layer 2 Simple Merkle Tree Deals

    Principle: dags ONLY at the leaves

    If we have this principles in mind, we are guaranteed simple merkle tree inclusion proofs.

    Storage

    1. Take a Dag turn it into a stream
    2. Pad it to the next power of two
    3. Take a SubPieceID hash
    4. Send it to broker
    5. Broker puts deals next to each other
    6. Broker sends the inclusion proof from PieceCID to SubPieceCID

    Inclusion Proof

    • Merkle tree inclusion proof from SubPieceCID to PieceCID

    See

    2: Layer 2 Interactive Protocol (Holy Grail)

    Maps any subset of the CommD into an IPFS hash.

    3: Layer 2 Complex Dag2Stream inclusion

    A specific algorithm that results into several merkle tree inclusion proofs that prove to the user that their file is embeded across CommD

    CryptoNet is a Protocol Labs initiative.