Best practice to save files in blockchain

穿精又带淫゛_ 提交于 2019-11-30 09:42:28
Lucas Hendren

You do not want to directly use a traditional blockchain. Blockchains are good for transactional information/state changes, large data storage is generally a bad idea. This is due to the high cost of storing data and security. I would advise to look at another decentralized storage mechanism. The hashing link is something that has been trialed out by a group called MedRec you can look at.

https://viral.media.mit.edu/pub/medrec

Otherwise, IPFS is an option, along with Sia and StorJ. Distributed Hashtables is an area to look into.

https://www.ipfs.io/

https://storj.io/storj.pdf

https://sia.tech/

This field is still new and rapidly developing so standards and the tech are still being set. I would advice reading each option individually and coming to figure out what solution fits your problem the best.

It depends (of course!) on what your objectives are. If all the participants in the blockchain have access to something like Dropbox, or the access is provided by the blockchain, then storing the data is fine there. You would simply store a hash of the file in the blockchain such that anyone retrieving the file will be able to verify that the file is valid. You could use IPFS or Google Drive or any other mechanism to share the data as long as the access control mechanisms are adequate for your use case. If additional privacy is needed you could store the file in encrypted form and use the blockchain to provide decryption keys to authorized users on demand. This is often referred to as off chain storage and is a common design pattern.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!