Skip to content

PDP: Uploaded piece should only be "temporary" until a successful AddRoots #539

Open
@rvagg

Description

@rvagg

Current workflow with PDP is that a piece is uploaded and parked and even available for retrieval before an AddRoots is called. It's not even necessary to call AddRoots, you just park your piece and it's available for retrieval.

We should switch that around so that it's something like this:

  1. Negotiate piece upload: if the CommP already exists in the parked pieces then all, good, proceed to AddRoots and there's nothing else to do
  2. Upload new piece, Curio parks it in some temporary location. It's not processed any further, it's not available for retrieval, but it's in a waiting state.
  3. Client does a signed AddRoots that successfully lands on chain and only at that point does the piece get moved into permanent storage and is available for retrieval.
  4. Pieces that are in temporary storage are candidates for GC, some period of time (hours, a day?) later if a piece has been uploaded but no successful AddRoots call was made for it, then it can just be deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions