filecoin-project / boost

Boost is a tool for Filecoin storage providers to manage data storage and retrievals on Filecoin.
Other
111 stars 67 forks source link

Remove boost assumptions that pieces are CARs #1878

Open Gozala opened 7 months ago

Gozala commented 7 months ago

Checklist

Boost component

Boost Version

n/a

Describe the Bug

At the moment boost assumes that first piece in the aggregate is CAR

https://github.com/filecoin-project/boost/blob/baf26c6dc883dade04947ff4632eb1e664fb55b9/storagemarket/deal_commp.go#L148-L154

This is problematic for aggregators like web3.storage as doing this verification has non-negligible cost, please see https://github.com/web3-storage/w3up/issues/1304.

Please note that wrapping a single block raw files in a CAR is impractical, it introduces (negligible) size overhead, but lot more complex processing pipeline for the aggregators and incur added operational costs.

Also please note that aggregate piece specification FRC-0058 does not require pieces to be CARs. In fact it breaks down assumption that filecoin piece is the CAR, because it's built up from segments which are in most cases CARs. Having to unpack and concatenate those CARs would defeat the purpose of aggregates.

Logging Information

n/a

Repo Steps

n/a

LexLuthr commented 7 months ago

@willscott @masih Can you please chime in here? We have had multiple discussions around this in Singapore and IIRC, Juan wants everything to be car for retrievals. There was a discussion involving Juan and Alex about this with differing views.

LexLuthr commented 7 months ago

@Gozala Without cars we cannot serve partial retrievals. Every SP needs to run booster-http which they don't and serve back the whole piece with padded bytes. It would be upto the aggregators to deal with the client retrievals.

willscott commented 7 months ago

Boost, as a PL project, continues to push for content addressed formatting of deals. This is part of broader ecosystem alignment as well - while you correctly note that there is a packing overhead incurred, it's worth noting that in the world where this requirement is relaxed in boost and you begin making deals in a non-car form, they would not pass fil+ compliance checks, which attempt and would fail at retrieval validation.

More relevant will be the question of whether boost is the right place to build out the full podsi market. In particular, boost retrieval today doesn't fully implement the partial retrieval api defined in the FRC of http retrieval of individual segments. It should be evaluated if this would be faster implemented as a special purpose, simpler, DDO market pathway.

Gozala commented 7 months ago

I am sorry but I'm not able to follow most of this as I'm not familiar with details mentioned. I do want to however call out few things:

  1. Operating aggregator that has to turn segments into a CAR segments in order to make the whole piece be a valid CAR is financially not viable.
  2. Content addressing does not imply CARs, you could have content addressed files (like raw codec ones).

Given the lack of domain knowledge I'm unable to propose anything actionable, so perhaps expects in the domain could propose path forward that is financially viable for the aggregators ?

willscott commented 7 months ago

The padding implied by PODSI packing is a significantly higher overhead and financial issue to work through than CAR overhead.