Skip to content

PDP: piece retrieval fallback to parked_pieces is OK, don't warn; or alternatively: look-up in PDP roots list #537

Open
@rvagg

Description

@rvagg

reader, size, err := cpr.getPieceReaderFromSector(readerCtx, pieceCid)
if err != nil {
log.Warnw("failed to get piece reader from sector", "piececid", pieceCid, "err", err)
serr := err
// Try getPieceReaderFromPiecePark
reader, size, err = cpr.getPieceReaderFromPiecePark(readerCtx, pieceCid)
if err != nil {

This leads to a WARN for PDP piece retrievals. This is going to get nosy for PDP pieces that are not also PoRep pieces. We should either ditch that warning, or perhaps better is to explicitly look it up in the PDP tables to make sure it's part of a proofset.

This would fix a gap between store and retrieval for PDP, if we make it so you can only retrieve if it's verified part of a proofset then we close that gap, it only becomes retrievable once you've started paying for it to be in a proofset.

So I think there should just be two SQL queries here - one for PoRep and one for PDP, it could be a fallback or even in parallel. If it hits one then it should be fine. I think pdp_proofset_roots would be the right place to look for actively proving pieces (and subpieces).

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