Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieval Discovery and Payload CIDs #689

Closed
hannahhoward opened this issue Dec 2, 2019 · 4 comments
Closed

Retrieval Discovery and Payload CIDs #689

hannahhoward opened this issue Dec 2, 2019 · 4 comments

Comments

@hannahhoward
Copy link
Contributor

hannahhoward commented Dec 2, 2019

The existing retrieval spec defines an interface for discovering retrieval miners with the following interface:

type RetrievalPeerResolver struct {
    GetPeers(PieceCID piece.PieceCID) [RetrievalPeer]
}

Because deals are on chain, we can query chain history to identify which miners have a given piece CID. However, soon a piece CID will simply be CommP, while most likely people are going to be interested in a given payload CID. CommP / PieceCID cannot be calculated without underlying data, so how does a client find a miner who can serve a given payload CID? Some options to consider:

  1. Defer this question to after main net and address in a future version of the retrieval protocol
  2. Defer this question to outside the spec -- a third party service could establish itself to maintain a registry of PayloadCID -> pieceCID
  3. Maintain some sort of light DHT or other decentralized mechanism to map PayloadCID -> PieceCid (doesn't even need to track peers who have pieceCID -- cause the chain can be queried to retriev that -- though it might be a useful optimization)

Option 1 or 2 may limit the ability to use filecoin as a store for apps seeking faster retrievals. Though alternatively an app could keep a piece CID onhand to query as needed.

@anorth
Copy link
Member

anorth commented Dec 3, 2019

Thanks. I think this is ok for now, and we're pursuing option 1 or 2 (both of which mean no immediate work in this spec). cc @jbenet

@hannahhoward
Copy link
Contributor Author

closing for now then.

@hannahhoward
Copy link
Contributor Author

Hi, I'm going to reopen this issue because @pooja has raised it as a priority.

@hannahhoward hannahhoward reopened this Jan 28, 2020
@mishmosh
Copy link
Contributor

mishmosh commented Feb 4, 2020

Synced live with @pooja, and clarified that she's interested in the ability to retrieve by payloadCID (#853) rather than blind discovery. Closing this again as a nice-to-have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants