Skip to content

loadnetwork/load0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

load0 is Bundler's Large Bundle on steroids -- a cloud-like experience to upload and download data from Load Network using the Bundler's 0xbabe2 transaction format powered with SuperAccount & S3 under the hood.

Technical Architecture

First, the user sends data to the load0 REST API /upload endpoint -- the data is pushed to load0's S3 bucket and returns an optimistic hash (keccak hash) which allows the users to instantly retrieve the object data from load0.

After being added to the load0 bucket, the object gets added to the orchestrator queue that uploads the optimistic cached objects to Load Network. Using Large Bundle & SuperAccount, the S3 bucket objects get sequentially uploaded to Load and therefore, permanently stored while maintaining very fast uploads and downloads. Object size limit: 1 byte -> 2GB.

flowchart TB
    user[User] -->|1- Send data| api[REST API]
    api -->|2- Store| s3[S3 Bucket]
    api -->|3- Return hash| user
    s3 -->|4- Queue| queue[Orchestrator Queue]
    queue -->|5- Upload| load[Load Network]
    user -->|6- Retrieve| s3
    s3 -.->|7- Permanent storage| load
    style user fill:#2d3748,stroke:#1a202c,color:#fff
    style api fill:#1a365d,stroke:#2a4365,color:#fff
    style s3 fill:#22543d,stroke:#276749,color:#fff
    style queue fill:#3c366b,stroke:#4c51bf,color:#fff
    style load fill:#2b6cb0,stroke:#3182ce,color:#fff
Loading

REST API

1- Upload object

curl -X POST "https://load0.network/upload" \
     --data-binary "@./video.mp4" \
     -H "Content-Type: video/mp4"

2- Download object (browser)

GET https://load0.network/download/{optimistic_hash}

Also, to have endpoints similiarity as in bundler.load.rs, you can do:

GET https://load0.network/resolve/{optimistic_hash}

3- Retrieve Bundle metadata using optimistic hash or bundle txid (once settled)

GET https://load0.network/bundle/optimistic/{op_hash}
GET https://load0.network/bundle/load/{bundle_txid}

Returns:

pub struct Bundle {
    pub id: u32,
    pub optimistic_hash: String,
    pub bundle_txid: String,
    pub data_size: u32,
    pub is_settled: bool,
    pub content_type: String
}

An object data can be accessed via:

  • optimistic caching: https://load0.network/resolve/{Bundle.optimistic_hash}
  • from Load Network (once settled): https://bundler.load.rs/v2/resolve/{Bundle.bundle_txid}

License

This project is licensed under the MIT License

About

0xbabe2's Large Bundle on steroids

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages