-
Notifications
You must be signed in to change notification settings - Fork 4
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
CID for /deals/content endpoint might be incorrect #24
Comments
@anjor if you already have the commp (piece, padded size and size), you can add a metadata as part of the form request. https://github.com/application-research/delta#upload-a-file
|
yeah that's fine. But in the code you still recalculate payload cid by pinning the uploaded car file: Line 602 in 7b13079
which will now be the payload cid for the car file, and not for the original file. |
the recalculation here is ok since we want to make sure that the payload cid complies with how delta prepare deals. What we can do is add a new endpoint that accepts a pre-computed CID. I'll add to the next release. |
Will this payload cid be reported back to the user? Because that might make for weird UX, where the user will get back a car instead of the data they expect. |
For users who have already calculated commP and are passing it in to
/deals/content
endpoint, the payload cid we are calculating could be incorrect depending on whether the file being passed through is a car file or not (side note: I wasn't quite able to figure out if we check that anywhere in the code)Assuming it is a car file being passed through, then we are adding it to the local ipfs node and calculating the payload cid for the car file, as opposed to the original file.
At the end of the day I don't think it matters because payload cid is not really relevant for storage deals, but it does look like we are calculating it and passing it in the deal proposal.
The text was updated successfully, but these errors were encountered: