Skip to content

Announce PieceCID to IPNI #542

Open
Open
@rvagg

Description

@rvagg

For piece discovery, there's a desire to announce PieceCID to IPNI and it would make sense (particularly for markets v2) that this is done for both PoRep and PDP pieces and that it's just done in the process of onboarding a piece. Ideally the second step of doing the full piece indexing (CAR & PoSDI indexing) is available too but is an optional step. But this means two different types of advertisement I think. We are registering a new piece transport codec for this purpose (Curio currently uses just metadata.IpfsGatewayHttp{} but we'll also make a metadata.FilecoinPieceHttp{} for the pieces).

Curio is now using the piece & size in the context ID for the advertisement of the IPLD blocks, this is to enable Spark to fetch piece lists for providers for retrieval sampling.

In talking to @LexLuthr we were in a quandary as to how to support both of these things at the same time. Ideally we always want to report PieceCID to IPNI, with IPLD block reporting is an optional extra.

  1. Do they have to be separate advertisements? I assume we can't bundle them into one advertisement?
  2. What ContextID do we use for piece reporting? Do we need to have something different to the IPLD block reporting, should it be the same, or...?
  3. Alternatively, since we have PieceCID (CommPv2 compatible too) in the ContextID for existing advertisements, can we do a reverse mapping lookup via IPNI? i.e. the reverse of what Spark is doing now so we can go from PieceCID (it'd have to be CommPv2 since the size is in there) to provider(s) with an IPNI query?

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