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

Download URL for Import deals #115

Open
anjor opened this issue Apr 28, 2023 · 11 comments · Fixed by #118
Open

Download URL for Import deals #115

anjor opened this issue Apr 28, 2023 · 11 comments · Fixed by #118
Assignees
Labels
enhancement New feature or request

Comments

@anjor
Copy link
Contributor

anjor commented Apr 28, 2023

As a client making import deals I need to provide the SP with a url from where they can download the car files. That seems to be missing from the DealRequest struct?

@jcace
Copy link
Contributor

jcace commented Apr 28, 2023

minor point: I think this would be classified an "end to end" deal in our terms because Boost can automatically download it from the provided url. So the user doesn't have to import it.

+1 for this feature though- I think having the flexibility to set transfer params is useful for a lot of use cases 😃

@anjor
Copy link
Contributor Author

anjor commented Apr 28, 2023

My understanding was
end-to-end: client pushes the data when deal is accepted
import: SP pulls the data when they want

is that not correct?

@jcace
Copy link
Contributor

jcace commented Apr 28, 2023

if you provide a download URL (http, ftp, etc) in the transfer params, Boost will automatically try to download it as soon as the deal lands. So, the SP doesn't actually decide to pull the data when they want - in that regard it's not an import deal in the traditional sense, SP does not have to do any importing.

I'm thinking of Import deals as those with absolutely no transfer params, so the SP must perform some actions on their end to get the carfile into Boost out of band

At least, this is how it worked when I last tested this 4 months ago- could be different now!

@alvin-reyes
Copy link
Collaborator

I started working on this, there is actually a "source" field on the deal request and my intention is to use that as a source on where to get the file. The idea is to add a CID and the source (multiaddr or http or libp2p) then delta pulls it from the source, make an online deal etc.

there's going to be two modes here:

  • e2e deal - requires the file to be pulled by delta since it needs to compute for commp, transfer to SP.
  • import deal - we require pre-computed commp and just add the transfer params which will pull the data from a different source.

If it's an e2e deal:

  • delta needs to pulls the data from the source.
  • compute commp
  • make a deal.
  • The transfer here can be optional since we can set the transfer params to use the "source" field of the deal request and let the miner/sp pull it.

if it's an import deal:

  • pre-computed commp is required
  • delta just uses the source as transfer param
  • make a deal using the transfer param
  • The transfer params will use "source" field of the deal request and let the miner/sp pull it.

@alvin-reyes alvin-reyes self-assigned this Apr 29, 2023
@anjor
Copy link
Contributor Author

anjor commented Apr 29, 2023

Would be good to also support http url for source.

This issue is currently the blocker for me to be able to integrate data prep tools with delta.

@alvin-reyes
Copy link
Collaborator

#118

@alvin-reyes alvin-reyes linked a pull request May 2, 2023 that will close this issue
@alvin-reyes alvin-reyes added the enhancement New feature or request label May 3, 2023
@anjor anjor reopened this May 9, 2023
@anjor
Copy link
Contributor Author

anjor commented May 9, 2023

Given that delta uses boost under the hood, i don't think this actually supports the out-of-band/import deal flow. Even if this is set on the delta side, boost will never use it.

Which means it doesn't get sent to the SP.

@anjor
Copy link
Contributor Author

anjor commented May 9, 2023

@anjor
Copy link
Contributor Author

anjor commented May 9, 2023

So I think it does do the thing @jcace describes above for e2e deals, but it does not handle import deals.

@alvin-reyes
Copy link
Collaborator

the user can use the "label" field to include the source of the CAR file. So the flow would be

1 - create an import deal with a label - "https://myfile.car"
2 - send import deal to miner
3 - miner check the label and download the "https://myfile.car"

Does that make sense?

@anjor
Copy link
Contributor Author

anjor commented May 10, 2023

Hmm maybe, that's a bit hacky though. Also will need each SP to implement their own tooling to parse + handle this.

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

Successfully merging a pull request may close this issue.

3 participants