NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 440 forks source link

Feature Request: Transfer ownership of file #2972

Open chrsch opened 6 years ago

chrsch commented 6 years ago

Once we get to the point sia is able to share files by passing over .sia files it will be necessary to also be able to pass over ownership of a file in a next step. Just think of a subcontractor generating data and transferring it to you using sia. Of course you would want to own that data and don't depend on the sia instance of respective subcontractor. You want the subcontractor to transfer ownership to you.

Assumptions

Requirements

lukechampine commented 6 years ago

I'm not sure this requires much special handling. Sia uses content addressing, so transferring a file just means telling the recipient which content hashes constitute the file (as well as the decryption key). If the uploader "changes" the file after transfer, it doesn't affect the new owner's copy of the file, because the content hashes will change.

Unfortunately this all breaks down if we introduce deletions. The new owner can't prevent the old owner from requesting that a file be deleted. So we probably will need a way of transferring ownership of the contract itself. Alternatively, we could provide a mechanism for renters to say, "keep storing that file, I'll pay for it."

I think the latter option is preferable. It fits your requirements better, and I don't think it would be too difficult to implement.

chrsch commented 6 years ago

From my point of view the payment-channel-option is not a feasible solution as the receiving instance is not in control over the data (e. g. can't delete it from the network). This is critical in terms of legal requirements in B2B scenarios.

If we move contract ownership this might have other side effects - what about other chunks stored on that host from other files belonging to the same contract? Maybe we can do it the other way arround: The receiver needs a contract with the host anyway (he needs to form one if he has no contract with the host from what I did understand). So why not move the chunk from the contract belonging to the sharing sia instance to the (new) contract belonging to the receiving sia instance? This might have implications if you share a .sia file with multiple instances though... basically a .sia file will become one-time-sharable only and for sharing with another instance you'll have to export a new .sia file.