Skip to content

IPFS fetches files via graphsync #6831

@Stebalien

Description

@Stebalien

Go-ipfs must be able to fetch files via graphsync. At the moment, the graphsync interface expects a peer with which to sync and a selector to fetch. It does not support automatically finding providers, splitting requests, etc.

Proposal: Add a (repeated) --from flag to instruct IPFS to fetch a file from a specific peer. When passed, go-ipfs should:

  1. Connect to the specified peers.
  2. Determine which protocols these peers support.
  3. Pick the best supported transport.
  4. Fetch the file with this transport.

For now, go-ipfs will not even try to split the request between multiple peers when --from is specified and at least one of the specified peers supports graphsync. As we improve graphsync/bitswap, we can add request splitting logic in future PRs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions