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

Platform | DAG support | Stream support | Inclusion Proof | Reimbursment on failures | User payment |
---|---|---|---|---|---|

## Storage Proof for layer 1 deals

Note this is just to show reasoning.

**L1 Deals GFM - Layer 1 Inclusion proof**

**Storage**

- Take a DAG
- Turn it into a stream via Dag2Stream algorithm
- Generate CommP from the stream

**Inclusion Proof**

- 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**

- Take DAGs
- Join them into one DAG
- (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**

- Take a Dag turn it into a stream
- Pad it to the next power of two
- Take a SubPieceID hash
- Send it to broker
- Broker puts deals next to each other
- 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