Skip to content

Give validateIPNIAdvertisement the ability to confirm a given SP is showing up as an IPNI provider #217

@BigLep

Description

@BigLep

Background

Currently, validateIPNIAdvertisement is checking for a 200 response from filecoinpin.contact. The response isn't inspected to confirm that a given SP is in the response.

Why this is potentially a problem

If I do filecoin-pin add foo.txt --provider-id A and then sometime later do filecoin-pin add foo.txt --provider-id B, the validateIPNIAdvertisement step will return very quickly becuase provider A will likely already exist as a provider for foo.txt's IPFS Root CID in filecoinpin.contact.

That's probably ok if foo.txt is retrievable from provider A still, but this is a bad experience if it isn't because we'd be showing a IPFS Mainnet retrieveable URL that isn't retrievable (yet).

As a result, we should give ourself the option to "validate IPNI advertisement has provider B". This means inspecting the response beyond the status code.

Notes

This kind of deeper response checking is happening in https://github.com/FilOzone/dealbot/blob/ae5619d0faf738baff524d8f9453d4c9a55dc281/src/deal-addons/strategies/ipni.strategy.ts#L341.

Metadata

Metadata

Assignees

No one assigned

    Labels

    team/filecoin-pin"Filecoin Pin" project is a stakeholder for this work.team/fs-wgFOC working group is a stakeholder for this work, and thus wants to track it on their project board.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions